Merge pull request #21601 from FranckInfans/modifTicket
Module Tickets - modification select
This commit is contained in:
commit
a5282af145
@ -315,7 +315,7 @@ class FormTicket
|
|||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
|
print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
|
||||||
$this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, 0, 0, 0, 'minwidth200');
|
$this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, 1, 0, 0, 'minwidth200');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Group
|
// Group
|
||||||
@ -324,12 +324,12 @@ class FormTicket
|
|||||||
if ($public) {
|
if ($public) {
|
||||||
$filter = 'public=1';
|
$filter = 'public=1';
|
||||||
}
|
}
|
||||||
$this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 0, 0, 0, 'minwidth200');
|
$this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 1, 0, 0, 'minwidth200');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Severity
|
// Severity
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
|
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
|
||||||
$this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 0);
|
$this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
|
|||||||
@ -1,27 +0,0 @@
|
|||||||
# DOLIBARR ERP & CRM custom directory for external modules
|
|
||||||
|
|
||||||
This directory is dedicated to store external modules.
|
|
||||||
To use it, just copy here the directory of the module into this directory.
|
|
||||||
|
|
||||||
Note: On linux or MAC systems, it is better to unzip/store the external module directory into
|
|
||||||
a different place than this directory and just adding a symbolic link here to the htdocs directory
|
|
||||||
of the module.
|
|
||||||
|
|
||||||
For example on Linux OS: Get the module from the command
|
|
||||||
|
|
||||||
`mkdir ~/git; cd ~/git`
|
|
||||||
|
|
||||||
`git clone https://git.framasoft.org/p/newmodule/newmodule.git`
|
|
||||||
|
|
||||||
Then create the symbolic link
|
|
||||||
|
|
||||||
`ln -fs ~/git/newmodule/htdocs /path_to_dolibarr/htdocs/custom/newmodule`
|
|
||||||
|
|
||||||
WARNING !!!
|
|
||||||
Check also that the /custom directory is active by adding into dolibarr `conf/conf.php` file the following
|
|
||||||
two lines, so dolibarr will also scan /custom directory to find external external modules:
|
|
||||||
|
|
||||||
```php
|
|
||||||
$dolibarr_main_url_root_alt='/custom';
|
|
||||||
$dolibarr_main_document_root_alt='/path_to_dolibarr/htdocs/custom/';
|
|
||||||
```
|
|
||||||
@ -172,7 +172,19 @@ if (empty($reshook)) {
|
|||||||
if (GETPOST('save', 'alpha') && !empty($user->rights->ticket->write)) {
|
if (GETPOST('save', 'alpha') && !empty($user->rights->ticket->write)) {
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST("subject", 'alphanohtml')) {
|
if (!GETPOST("type_code", 'alpha')) {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTypeRequest")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
|
} elseif (!GETPOST("category_code", 'alpha')) {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketCategory")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
|
} elseif (!GETPOST("severity_code", 'alpha')) {
|
||||||
|
$error++;
|
||||||
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketSeverity")), null, 'errors');
|
||||||
|
$action = 'create';
|
||||||
|
} elseif (!GETPOST("subject", 'alphanohtml')) {
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors');
|
||||||
$action = 'create';
|
$action = 'create';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user