From ebed09fd16b76ed679f7d08e2ebcfffff77bfbd3 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2022 15:04:10 +0200 Subject: [PATCH 1/6] Modification des gitignore" --- htdocs/.gitignore | 3 +++ htdocs/custom/.gitignore | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/.gitignore b/htdocs/.gitignore index ef87c0455d6..e29dfb9c5f9 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -26,3 +26,6 @@ /of/ /workstation/ /oblyon* + + +/custom diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore index 9420e8c61eb..e69de29bb2d 100644 --- a/htdocs/custom/.gitignore +++ b/htdocs/custom/.gitignore @@ -1,4 +0,0 @@ -/* -!.gitignore -!README.md -!index.html From a5148243427208c041489ae9c59a71487ab2c9ce Mon Sep 17 00:00:00 2001 From: Franck Lauby Date: Mon, 20 Jun 2022 14:55:07 +0200 Subject: [PATCH 2/6] =?UTF-8?q?pr=C3=A9pa=20des=20d=C3=A9pots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/custom/.gitignore | 1 + htdocs/custom/README.md | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 htdocs/custom/README.md diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore index e69de29bb2d..cd95745c140 100644 --- a/htdocs/custom/.gitignore +++ b/htdocs/custom/.gitignore @@ -0,0 +1 @@ +moduleFormation/ diff --git a/htdocs/custom/README.md b/htdocs/custom/README.md deleted file mode 100644 index 2fc3067f204..00000000000 --- a/htdocs/custom/README.md +++ /dev/null @@ -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/'; -``` From 209db182b3c0a2c09f9bc69de21c539bf8332732 Mon Sep 17 00:00:00 2001 From: Franck Lauby Date: Wed, 27 Jul 2022 17:03:45 +0200 Subject: [PATCH 3/6] give the possibility to leave the "Request type", "Ticket categorization" and "Severity" selectors empty --- htdocs/core/class/html.formticket.class.php | 6 +++--- htdocs/ticket/card.php | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 6866bfa8356..05ecdf3a005 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -210,7 +210,7 @@ class FormTicket // Type print ''; - $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, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION, 0, 0, 'minwidth200'); print ''; // Group @@ -219,12 +219,12 @@ class FormTicket if ($public) { $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, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION, 0, 0, 'minwidth200'); print ''; // Severity print ''; - $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, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION); print ''; // Subject diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7decdeadd7b..8754c40ac99 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -171,7 +171,19 @@ if (empty($reshook)) { if (GETPOST('save', 'alpha') && !empty($user->rights->ticket->write)) { $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++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors'); $action = 'create'; From e742ba45e8ef988dce57d9e061a9c337fa0951a2 Mon Sep 17 00:00:00 2001 From: Franck Lauby Date: Thu, 4 Aug 2022 09:45:00 +0200 Subject: [PATCH 4/6] Eldy's suggestion: replace hidden option with hardcoded '1' --- htdocs/core/class/html.formticket.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 05ecdf3a005..d523fa83953 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -210,7 +210,7 @@ class FormTicket // Type print ''; - $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION, 0, 0, 'minwidth200'); + $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, 1, 0, 0, 'minwidth200'); print ''; // Group @@ -219,12 +219,12 @@ class FormTicket if ($public) { $filter = 'public=1'; } - $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION, 0, 0, 'minwidth200'); + $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', $filter, 2, 1, 0, 0, 'minwidth200'); print ''; // Severity print ''; - $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, $conf->global->TICKET_FORCE_DISPLAY_EMPTY_OPTION); + $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 1); print ''; // Subject From f91cdf9cecb78d4a696a8a96cfa53949e2a769eb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Aug 2022 01:39:33 +0200 Subject: [PATCH 5/6] Update .gitignore --- htdocs/.gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/.gitignore b/htdocs/.gitignore index e29dfb9c5f9..ef87c0455d6 100644 --- a/htdocs/.gitignore +++ b/htdocs/.gitignore @@ -26,6 +26,3 @@ /of/ /workstation/ /oblyon* - - -/custom From 49319cc0b5f3cc7cec86d4f153aa70598a45c0d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 11 Aug 2022 01:40:46 +0200 Subject: [PATCH 6/6] Update .gitignore --- htdocs/custom/.gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore index cd95745c140..9420e8c61eb 100644 --- a/htdocs/custom/.gitignore +++ b/htdocs/custom/.gitignore @@ -1 +1,4 @@ -moduleFormation/ +/* +!.gitignore +!README.md +!index.html