diff --git a/.gitignore b/.gitignore index 75589687..996c8271 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /.gitattributes node_modules package-lock.json +/.idea diff --git a/README.md b/README.md index 5104fbd8..d7e9ba77 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Informations - Numéro du module : 436318 -- Dernière mise à jour : 19/01/2024 +- Dernière mise à jour : 02/04/2024 - Éditeur : [Evarisk](https://evarisk.com) - Thème : Eldy Menu - Licence : GPLv3 @@ -11,9 +11,9 @@ ### Version -- Version : 1.2.1 +- Version : 1.3.0 - PHP : 7.4.33 -- Compatibilité : Dolibarr 16.0.0 - 18.0.4 +- Compatibilité : Dolibarr 16.0.0 - 19.0.1 ## Liens diff --git a/admin/documents.php b/admin/documents.php index 3f824b5b..8bd6c970 100644 --- a/admin/documents.php +++ b/admin/documents.php @@ -18,10 +18,10 @@ /** * \file admin/documents.php * \ingroup saturne - * \brief Saturne documents page. + * \brief Saturne documents page */ -// Load Saturne environment. +// Load Saturne environment if (file_exists('../saturne.main.inc.php')) { require_once __DIR__ . '/../saturne.main.inc.php'; } elseif (file_exists('../../saturne.main.inc.php')) { @@ -30,37 +30,37 @@ die('Include of saturne main fails'); } -// Get module parameters. +// Get module parameters $moduleName = GETPOST('module_name', 'alpha'); $moduleNameLowerCase = strtolower($moduleName); -// Load Dolibarr libraries. +// Load Dolibarr libraries require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; -// Load Module libraries. +// Load Module libraries require_once __DIR__ . '/../../' . $moduleNameLowerCase . '/lib/' . $moduleNameLowerCase . '.lib.php'; -// Global variables definitions. +// Global variables definitions global $conf, $db, $hookmanager, $langs, $user; -// Load translation files required by the page. +// Load translation files required by the page saturne_load_langs(['admin']); -// Initialize view objects. +// Initialize view objects $form = new Form($db); -// Get parameters. +// Get parameters $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); $type = GETPOST('type', 'alpha'); $const = GETPOST('const', 'alpha'); $label = GETPOST('label', 'alpha'); -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php. +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php -$hookmanager->initHooks([$moduleNameLowerCase . 'admindocuments']); // Note that conf->hooks_modules contains array. +$hookmanager->initHooks([$moduleNameLowerCase . 'admindocuments']); // Note that conf->hooks_modules contains array -// Security check - Protection if external user. +// Security check - Protection if external user $permissiontoread = $user->rights->$moduleNameLowerCase->adminpage->read; saturne_check_access($permissiontoread); @@ -68,33 +68,26 @@ * Actions */ -// Activate a model. +// Actions set_mod, update_mask +require_once __DIR__ . '/../core/tpl/actions/admin_conf_actions.tpl.php'; + +// Activate a model if ($action == 'set') { addDocumentModel($value, $type, $label, $const); - header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName . '#' . $type); + exit; } elseif ($action == 'del') { delDocumentModel($value, $type); - header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName . '#' . $type); + exit; } -// Set default model. +// Set default model if ($action == 'setdoc') { - $constforval = strtoupper($moduleName) . '_' . strtoupper($type) . '_DEFAULT_MODEL'; - $label = ''; - - if (dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity)) { - $conf->global->$constforval = $value; - } - - // Active model. - $ret = delDocumentModel($value, $type); - - if ($ret > 0) { - $ret = addDocumentModel($value, $type, $label); - } -} elseif ($action == 'setmod') { - $constforval = strtoupper($moduleName) . '_' . strtoupper($type) . '_ADDON'; - dolibarr_set_const($db, $constforval, $value, 'chaine', 0, '', $conf->entity); + $confName = dol_strtoupper($moduleName . '_' . $type) . '_DEFAULT_MODEL'; + dolibarr_set_const($db, $confName, $value, 'chaine', 0, '', $conf->entity); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName . '#' . $type); + exit; } if ($action == 'deletefile' && $modulepart == 'ecm' && !empty($user->admin)) { @@ -123,7 +116,8 @@ $result = dol_delete_file($filetodelete); if ($result > 0) { setEventMessages($langs->trans('FileWasRemoved', GETPOST('file')), null); - header('Location: ' . $_SERVER['PHP_SELF']); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName . '#' . $type); + exit; } } @@ -166,9 +160,9 @@ setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('File')), null, 'errors'); } } - if (preg_match('/__.*__/', $_FILES['userfile']['name'][$key])) { + if (pathinfo($_FILES['userfile']['name'], PATHINFO_EXTENSION) != 'odt') { $error++; - setEventMessages($langs->trans('ErrorWrongFileName'), null, 'errors'); + setEventMessages($langs->trans('ErrorWrongFileNameExtension', $_FILES['userfile']['name']), [], 'errors'); } } @@ -179,7 +173,6 @@ } } } - } if ($action == 'update_documents_config') { @@ -227,6 +220,16 @@ } } +if ($action == 'download_template') { + $fileName = GETPOST('filename'); + dol_copy(DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/doctemplates/' . $type . '/' . $fileName, DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/' . $fileName); +} + +if ($action == 'remove_file') { + $fileName = GETPOST('filename'); + dol_delete_file(DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/' . $fileName); +} + /* * View */ @@ -245,7 +248,7 @@ // Subheader $selectorAnchor = ''; @@ -346,7 +349,7 @@ $object = new $type($db); - print load_fiche_titre($langs->trans($type), '', $documentData['picto'], 0, $langs->trans($type)); + print load_fiche_titre($langs->trans($type), '', $documentData['picto'], 0, dol_strtolower($type)); $documentPath = true; diff --git a/admin/setup.php b/admin/setup.php index 0644c1de..cdad8c1a 100644 --- a/admin/setup.php +++ b/admin/setup.php @@ -114,6 +114,15 @@ print ''; print ajax_constantonoff('SATURNE_USE_ALL_EMAIL_MODE'); print ''; + +// Use fast upload improvement +print ''; +print $langs->trans('UseFastUploadImprovement'); +print ''; +print $langs->transnoentities('UseFastUploadImprovementDescription'); +print ''; +print ajax_constantonoff('SATURNE_USE_FAST_UPLOAD_IMPROVEMENT'); +print ''; print ''; // Page end diff --git a/class/actions_saturne.class.php b/class/actions_saturne.class.php index fc0f0be3..80a53830 100644 --- a/class/actions_saturne.class.php +++ b/class/actions_saturne.class.php @@ -89,11 +89,10 @@ public function printMainArea(array $parameters): int } // Output html code for logo if ($urllogo) { - print ''; ?> results = array('myreturn' => 999); - return 0; // or return 1 to replace standard code - } else { - $this->errors[] = 'Error message'; - return -1; - } - } - - /** - * Overloading the doActions function : replacing the parent's function with the one below - * - * @param array $parameters Hook metadata (context, etc...) - * @param object $object The object to process - * @param string $action Current action (if set). Generally create or edit or null - * @return int 0 < on error, 0 on success, 1 to replace standard code - */ - public function doActions(array $parameters, $object, string $action): int - { - global $db, $user; - - if ($parameters['currentcontext'] == 'usercard' && GETPOST('action') == 'add_signature') { - require_once __DIR__ . '/saturnesignature.class.php'; - $signatory = new SaturneSignature($db); - $data = json_decode(file_get_contents('php://input'), true); - - $signatoryID = GETPOST('signatoryID'); - - if ($signatoryID > 0) { - $signatory->fetch($signatoryID); - - $signatory->signature = $data['signature']; - $signatory->signature_date = dol_now(); - - $error = 0; - - if (!$error) { - $result = $signatory->update($user, true); - if ($result > 0) { - // Creation signature OK. - $signatory->setSigned($user, false, 'public'); - exit; - } elseif (!empty($signatory->errors)) { // Creation signature KO. - setEventMessages('', $signatory->errors, 'errors'); - } else { - setEventMessages($signatory->error, [], 'errors'); - } - } - } + return 0; // or return 1 to replace standard code + } + + /** + * Overloading the doActions function : replacing the parent's function with the one below + * + * @param array $parameters Hook metadata (context, etc...) + * @param object $object The object to process + * @param string $action Current action (if set). Generally create or edit or null + * @return int 0 < on error, 0 on success, 1 to replace standard code + * @throws Exception + */ + public function doActions(array $parameters, $object, string $action): int + { + global $user; + + if (strpos($parameters['context'], 'usercard') !== false && $action == 'add_signature') { + $id = GETPOST('id'); + + require_once __DIR__ . '/saturnesignature.class.php'; + + $signatory = new SaturneSignature($this->db); + $data = json_decode(file_get_contents('php://input'), true); + + $result = $signatory->fetch(0, '', ' AND fk_object = ' . $id . ' AND status > 0 AND object_type = "user" AND role = "UserSignature"'); + if ($result <= 0) { + $signatory->setSignatory($id, $user->element, 'user', [$id], 'UserSignature'); + } + + $signatory->signature = $data['signature']; + $signatory->signature_date = dol_now(); + + $result = $signatory->update($user, true); + if ($result > 0) { + // Creation signature OK + $signatory->setSigned($user, false); + exit; + } elseif (!empty($signatory->errors)) { // Creation signature KO + setEventMessages('', $signatory->errors, 'errors'); + } else { + setEventMessages($signatory->error, [], 'errors'); + } } elseif (preg_match('/categorycard/', $parameters['context'])) { global $langs; @@ -392,6 +290,7 @@ public function doActions(array $parameters, $object, string $action): int $action = ''; } } - return 0; - } + + return 0; // or return 1 to replace standard code + } } diff --git a/class/saturnecertificate.class.php b/class/saturnecertificate.class.php index 81688366..c2d4539c 100644 --- a/class/saturnecertificate.class.php +++ b/class/saturnecertificate.class.php @@ -271,12 +271,12 @@ class SaturneCertificate extends SaturneObject /** * @var int User ID. */ - public int $fk_user_creat; + public $fk_user_creat; /** * @var int|null User ID. */ - public ?int $fk_user_modif; + public $fk_user_modif; /** * Constructor. diff --git a/class/saturnedashboard.class.php b/class/saturnedashboard.class.php index c1736d79..e0d9ab1a 100644 --- a/class/saturnedashboard.class.php +++ b/class/saturnedashboard.class.php @@ -55,11 +55,11 @@ public function __construct(DoliDB $db, string $moduleNameLowerCase = 'saturne') /** * Load dashboard info * - * @param array $moreParams Parameters for load dashboard info + * @param array|null $moreParams Parameters for load dashboard info * * @return array */ - public function load_dashboard(array $moreParams = []): array + public function load_dashboard(?array $moreParams = []): array { require_once __DIR__ . '/../../' . $this->module . '/class/' . $this->module . 'dashboard.class.php'; @@ -88,12 +88,12 @@ public function load_dashboard(array $moreParams = []): array /** * Show dashboard * - * @param array $moreParams Parameters for load dashboard info + * @param array|null $moreParams Parameters for load dashboard info * * @return void * @throws Exception */ - public function show_dashboard(array $moreParams = []) + public function show_dashboard(?array $moreParams = []) { global $conf, $form, $langs, $moduleNameLowerCase, $user; @@ -128,7 +128,6 @@ public function show_dashboard(array $moreParams = []) print ajax_combobox('boxcombo'); } print ''; - print '
'; if (is_array($dashboards['widgets']) && !empty($dashboards['widgets'])) { $widget = ''; @@ -149,11 +148,31 @@ public function show_dashboard(array $moreParams = []) for ($i = 0; $i < count($dashboardWidget['label']); $i++) { if (!empty($dashboardWidget['label'][$i])) { $widget .= '' . $dashboardWidget['label'][$i] . ' : ' . ''; - $widget .= '' . $dashboardWidget['content'][$i] . ''; - $widget .= (!empty($dashboardWidget['tooltip'][$i]) ? $form->textwithpicto('', $langs->transnoentities($dashboardWidget['tooltip'][$i])) : '') . ''; + if (!empty($dashboardWidget['content'][$i])) { + $widget .= '' . $dashboardWidget['content'][$i] . ''; + $widget .= (!empty($dashboardWidget['tooltip'][$i]) ? $form->textwithpicto('', $langs->transnoentities($dashboardWidget['tooltip'][$i])) : '') . ''; + } else { + $widget .= $dashboardWidget['customContent'][$i]; + } $widget .= '
'; } } + if (is_array($dashboardWidget['moreParams']) && (!empty($dashboardWidget['moreParams']))) { + foreach ($dashboardWidget['moreParams'] as $dashboardWidgetMoreParamsKey => $dashboardWidgetMoreParams) { + switch ($dashboardWidgetMoreParamsKey) { + case 'links' : + if (is_array($dashboardWidget['moreParams']['links']) && (!empty($dashboardWidget['moreParams']['links']))) { + foreach ($dashboardWidget['moreParams']['links'] as $dashboardWidgetMoreParamsLink) { + $widget .= '' . img_picto($langs->trans('Url'), 'globe', 'class="paddingrightonly"') . $langs->transnoentities($dashboardWidgetMoreParamsLink['linkName']) . '
'; + } + } + break; + default : + $widget .= $dashboardWidgetMoreParams; + break; + } + } + } $widget .= '
'; $widget .= ''; $widget .= ''; @@ -261,7 +280,6 @@ public function show_dashboard(array $moreParams = []) } } - print ''; print ''; } } diff --git a/class/saturnedocuments.class.php b/class/saturnedocuments.class.php index 03f6cbb3..b452cae4 100644 --- a/class/saturnedocuments.class.php +++ b/class/saturnedocuments.class.php @@ -166,7 +166,7 @@ class SaturneDocuments extends SaturneObject /** * @var int User ID. */ - public int $fk_user_creat; + public $fk_user_creat; /** * Constructor. @@ -250,8 +250,9 @@ public function generateDocument(string $modele, Translate $outputlangs, int $hi } $result = $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - - $this->call_trigger(strtoupper($this->type) . '_GENERATE', $moreparams['user']); + if ($result > 0) { + $this->call_trigger(strtoupper($this->type) . '_GENERATE', $moreparams['user']); + } return $result; } diff --git a/class/saturnemail.class.php b/class/saturnemail.class.php new file mode 100644 index 00000000..b08bed05 --- /dev/null +++ b/class/saturnemail.class.php @@ -0,0 +1,239 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file class/saturnemail.class.php + * \ingroup saturne + * \brief This file is a CRUD class file for SaturneMail (Create/Read/Update/Delete) + */ + +// Load Saturne libraries +require_once __DIR__ . '/saturneobject.class.php'; + +/** + * Class for SaturneMail + */ +class SaturneMail extends SaturneObject +{ + /** + * @var DoliDB Database handler + */ + public $db; + + /** + * @var string Element type of object + */ + public $element = 'saturne_mail'; + + /** + * @var string Name of table without prefix where object is stored. This is also the key used for extrafields management + */ + public $table_element = 'c_email_templates'; + + /** + * @var int Does this object support multicompany module ? + * 0 = No test on entity, 1 = Test with field entity, 'field@table' = Test with link by field@table + */ + public $ismultientitymanaged = 1; + + /** + * @var int Does object support extrafields ? 0 = No, 1 = Yes + */ + public int $isextrafieldmanaged = 0; + + /** + * 'type' field format: + * 'integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', + * 'select' (list of values are in 'options'), + * 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', + * 'chkbxlst:...', + * 'varchar(x)', + * 'text', 'text:none', 'html', + * 'double(24,8)', 'real', 'price', + * 'date', 'datetime', 'timestamp', 'duration', + * 'boolean', 'checkbox', 'radio', 'array', + * 'mail', 'phone', 'url', 'password', 'ip' + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'picto' is code of a picto to show before value in forms + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM' or '!empty($conf->multicurrency->enabled)' ...) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty '' or 0. + * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwroted by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'index' if we want an index in database. + * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). + * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. + * 'isameasure' must be set to 1 or 2 if field can be used for measure. Field type must be summable like integer or double(24,8). Use 1 in most cases, or 2 if you don't want to see the column total into list (for example for percentage) + * 'css' and 'cssview' and 'csslist' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. 'csslist' is used for columns in lists. For example: 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'cssview'=>'wordbreak', 'csslist'=>'tdoverflowmax200' + * 'help' is a 'TranslationString' to use to show a tooltip on field. You can also use 'TranslationString:keyfortooltiponlick' for a tooltip on click. + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arrayofkeyval' to set a list of values if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel"). Note that type can be 'integer' or 'varchar' + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * 'validate' is 1 if you need to validate with $this->validateField() + * 'copytoclipboard' is 1 or 2 to allow to add a picto to copy value into clipboard (1=picto after label, 2=picto after value) + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor + */ + + /** + * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor + */ + public $fields = [ + 'rowid' => ['type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => 1, 'index' => 1, 'comment' => 'Id'], + 'entity' => ['type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'visible' => 0, 'default' => 1, 'index' => 1], + 'module' => ['type' => 'varchar(32)', 'label' => 'Module', 'enabled' => 1, 'position' => 20, 'notnull' => 0, 'visible' => 0], + 'type_template' => ['type' => 'varchar(32)', 'label' => 'TypeTemplate', 'enabled' => 1, 'position' => 30, 'notnull' => 0, 'visible' => 0, 'index' => 1], + 'lang' => ['type' => 'varchar(6)', 'label' => 'Lang', 'enabled' => 1, 'position' => 40, 'notnull' => 0, 'visible' => 0, 'default' => '', 'index' => 1], + 'private' => ['type' => 'smallint', 'label' => 'Private', 'enabled' => 1, 'position' => 50, 'notnull' => 1, 'visible' => 0, 'default' => 0], + 'datec' => ['type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => 0], + 'tms' => ['type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'position' => 70, 'notnull' => 0, 'visible' => 0], + 'label' => ['type' => 'varchar(180)', 'label' => 'Label', 'enabled' => 1, 'position' => 80, 'notnull' => 0, 'visible' => 0], + 'position' => ['type' => 'smallint', 'label' => 'Position', 'enabled' => 1, 'position' => 90, 'notnull' => 0, 'visible' => 0], + 'enabled' => ['type' => 'varchar(255)', 'label' => 'Enabled', 'enabled' => 1, 'position' => 100, 'notnull' => 0, 'visible' => 0, 'default' => 1], + 'active' => ['type' => 'tinyint', 'label' => 'Active', 'enabled' => 1, 'position' => 110, 'notnull' => 1, 'visible' => 0, 'default' => 1], + 'email_from' => ['type' => 'varchar(255)', 'label' => 'EmailFrom', 'enabled' => 1, 'position' => 120, 'notnull' => 0, 'visible' => 0], + 'email_to' => ['type' => 'varchar(255)', 'label' => 'EmailTo', 'enabled' => 1, 'position' => 130, 'notnull' => 0, 'visible' => 0], + 'email_tocc' => ['type' => 'varchar(255)', 'label' => 'EmailToCC', 'enabled' => 1, 'position' => 140, 'notnull' => 0, 'visible' => 0], + 'email_tobcc' => ['type' => 'varchar(255)', 'label' => 'EmailToBCC', 'enabled' => 1, 'position' => 150, 'notnull' => 0, 'visible' => 0], + 'topic' => ['type' => 'text', 'label' => 'Topic', 'enabled' => 1, 'position' => 160, 'notnull' => 0, 'visible' => 0], + 'joinfiles' => ['type' => 'text', 'label' => 'JoinFiles', 'enabled' => 1, 'position' => 170, 'notnull' => 0, 'visible' => 0], + 'content' => ['type' => 'mediumtext', 'label' => 'Content', 'enabled' => 1, 'position' => 180, 'notnull' => 0, 'visible' => 0], + 'content_lines' => ['type' => 'text', 'label' => 'ContentLines', 'enabled' => 1, 'position' => 190, 'notnull' => 0, 'visible' => 0], + 'fk_user' => ['type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'picto' => 'user', 'enabled' => 1, 'position' => 200, 'notnull' => 0, 'visible' => 0, 'foreignkey' => 'user.rowid'] + ]; + + /** + * @var int ID + */ + public int $rowid; + + /** + * @var int Entity + */ + public $entity; + + /** + * @var string Module name + */ + public $module; + + /** + * @var string Template type + */ + public string $type_template; + + /** + * @var string|null Lang + */ + public ?string $lang = ''; + + /** + * @var int private + */ + public int $private = 0; + + /** + * @var int|string|null Creation date + */ + public $datec; + + /** + * @var int|string Timestamp + */ + public $tms; + + /** + * @var string|null Label + */ + public ?string $label; + + /** + * @var int Position + */ + public int $position; + + /** + * @var int|string Enabled + */ + public $enabled; + + /** + * @var int Active + */ + public int $active = 1; + + /** + * @var string|null Email from + */ + public ?string $email_from = null; + + /** + * @var string|null Email to + */ + public ?string $email_to = null; + + /** + * @var string|null Email CC + */ + public ?string $email_tocc = null; + + /** + * @var string|null Email BCC + */ + public ?string $email_tobcc = null; + + /** + * @var string|null Topic + */ + public ?string $topic; + + /** + * @var int|string|null Join files + */ + public $joinfiles; + + /** + * @var string|null Content + */ + public ?string $content; + + /** + * @var string|null Content lines + */ + public ?string $content_lines = null; + + /** + * @var int|null User ID + */ + public ?int $fk_user = null; + + /** + * Constructor + * + * @param DoliDb $db Database handler + * @param string $moduleNameLowerCase Module name + * @param string $objectType Object element type + */ + public function __construct(DoliDB $db, string $moduleNameLowerCase = 'saturne', string $objectType = 'saturne_mail') + { + parent::__construct($db, $moduleNameLowerCase, $objectType); + } +} diff --git a/class/saturneschedules.class.php b/class/saturneschedules.class.php index 674d3fb3..22bed3e2 100644 --- a/class/saturneschedules.class.php +++ b/class/saturneschedules.class.php @@ -150,12 +150,12 @@ class SaturneSchedules extends SaturneObject /** * @var int User ID */ - public int $fk_user_creat; + public $fk_user_creat; /** * @var int|null User ID */ - public ?int $fk_user_modif; + public $fk_user_modif; /** * Constructor. diff --git a/class/task/saturnetask.class.php b/class/task/saturnetask.class.php index 398d70a8..1cf72aef 100644 --- a/class/task/saturnetask.class.php +++ b/class/task/saturnetask.class.php @@ -267,6 +267,7 @@ public function fetchAllTimeSpentAllUsers($morewherefilter = '', $sortfield = '' $sql .= " ptt.element_datehour AS element_datehour,"; $sql .= " ptt.element_date_withhour AS element_date_withhour,"; $sql .= " ptt.element_duration AS element_duration,"; + $sql .= " ptt.elementtype AS elementtype,"; } else { $sql .= " ptt.fk_task AS fk_element,"; $sql .= " ptt.task_date AS element_date,"; diff --git a/core/modules/modSaturne.class.php b/core/modules/modSaturne.class.php index b43ae9f8..e9ff562f 100644 --- a/core/modules/modSaturne.class.php +++ b/core/modules/modSaturne.class.php @@ -75,7 +75,7 @@ public function __construct($db) $this->editor_url = 'https://evarisk.com/'; // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated' or a version string like 'x.y.z' - $this->version = '1.2.1'; + $this->version = '1.3.0'; // Url to the file with your last numberversion of this module //$this->url_last_version = 'http://www.example.com/versionmodule.txt'; diff --git a/core/modules/saturne/index.php b/core/modules/saturne/index.php new file mode 100644 index 00000000..eea59b98 --- /dev/null +++ b/core/modules/saturne/index.php @@ -0,0 +1,2 @@ +trans('GenericNumRefModelDesc')."
\n"; - $texte .= '
'; + $texte .= ''; $texte .= ''; - $texte .= ''; + $texte .= ''; $texte .= ''; $texte .= ''; @@ -340,6 +340,25 @@ public function getNextValue(object $object): string dol_syslog(get_class($this) . '::getNextValue return ' . $this->prefix . $yymm . '-' . $num); return $this->prefix . $num; } + + /** + * Set prefix and suffix for custom value + * + * @param string $moduleNameLowerCase Module name + * @param string $objectType Object element type + */ + public function setCustomValue(string $moduleNameLowerCase, string $objectType) + { + $refMod = getDolGlobalString(dol_strtoupper($moduleNameLowerCase . '_' . $objectType . '_' . $this->name) . '_ADDON'); + if (dol_strlen($refMod)) { + $refModSplitted = preg_split('/\{/', $refMod); + if (is_array($refModSplitted) && !empty($refModSplitted)) { + $suffix = preg_replace('/}/', '', $refModSplitted[1]); + $this->prefix = $refModSplitted[0]; + $this->suffix = $suffix; + } + } + } } require_once DOL_DOCUMENT_ROOT . '/core/class/commondocgenerator.class.php'; @@ -349,6 +368,17 @@ public function getNextValue(object $object): string */ class SaturneDocumentModel extends CommonDocGenerator { + /** + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.5 = array(5, 5) + */ + public $phpmin = [7, 4]; + + /** + * @var string Dolibarr version of the loaded document. + */ + public $version = 'dolibarr'; + /** * @var string Module. */ @@ -372,11 +402,14 @@ public function __construct(DoliDB $db, string $moduleNameLowerCase = 'saturne', parent::__construct($db); - $this->module = $moduleNameLowerCase; - $this->document_type = $objectDocumentType; - $this->name = $langs->trans('ODTDefaultTemplateName'); - $this->description = $langs->trans('DocumentModelOdt'); - $this->scandir = dol_strtoupper($this->module) . '_' . dol_strtoupper($this->document_type) . '_ADDON_ODT_PATH'; // Name of constant that is used to save list of directories to scan. + $this->module = $moduleNameLowerCase; + $this->document_type = $objectDocumentType; + $this->name = $langs->transnoentities('ODTDefaultTemplateName'); + $this->custom_name = $langs->transnoentities('CustomODT'); + $this->description = $langs->transnoentities('DocumentModelOdt'); + $this->custom_info = false; //@todo remove info method in doc class for better management of custom_info + $this->scandir = dol_strtoupper($this->module) . '_' . dol_strtoupper($this->document_type) . '_ADDON_ODT_PATH'; // Name of constant that is used to save list of directories to scan. + $this->custom_scandir = dol_strtoupper($this->module) . '_' . dol_strtoupper($this->document_type) . '_CUSTOM_ADDON_ODT_PATH'; // Page size for A4 format. $this->type = 'odt'; @@ -393,46 +426,41 @@ public function __construct(DoliDB $db, string $moduleNameLowerCase = 'saturne', } /** - * Return list of active generation modules. + * Return list of active generation modules * - * @param DoliDB $db Database handler. - * @param string $type Document type. - * @param int $maxfilenamelength Max length of value to show. + * @param DoliDB $db Database handler + * @param string $type Document type + * @param int $maxfilenamelength Max length of value to show * - * @return array List of templates. + * @return array|int List of templates * @throws Exception */ - public static function liste_modeles(DoliDB $db, string $type, int $maxfilenamelength = 0): array + public static function liste_modeles(DoliDB $db, string $type, int $maxfilenamelength = 0) { require_once __DIR__ . '/../../../lib/saturne_functions.lib.php'; return saturne_get_list_of_models($db, $type, $maxfilenamelength); } /** - * Return description of a module. + * Return description of document model * - * @param Translate $langs Lang object to use for output. + * @param Translate $langs Lang object to use for output * - * @return string Description. + * @return string Description */ public function info(Translate $langs): string { global $conf; - // Load translation files required by the page. - $langs->loadLangs(['errors', 'companies']); - - $confName = $this->scandir; + $confName = (!$this->custom_info ? $this->scandir : $this->custom_scandir); $info = $this->description . ' .
'; - $info .= ''; + $info .= 'custom_info ? ' enctype="multipart/form-data"' : '') . '>'; $info .= ''; $info .= ''; - $info .= ''; - $info .= '
'; + $info .= ''; - // List of directories area. - $info .= ''; - $info .= '
'; + // List of directories area $infoTitle = $langs->trans('ListOfDirectories'); $listOfDir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->$confName))); $listOfFiles = []; @@ -455,7 +483,7 @@ public function info(Translate $langs): string } } - // Scan directories. + // Scan directories $nbFiles = count($listOfFiles); if (!empty($conf->global->$confName)) { $info .= $langs->trans('NumberOfModelFilesFound') . ': '; @@ -464,15 +492,32 @@ public function info(Translate $langs): string } if ($nbFiles) { - $info .= '
'; + if ($this->custom_info) { + // Add input to upload a new template file + $info .= '
' . $langs->trans('UploadNewTemplate') . ' '; + $info .= ''; + $info .= '
'; + } + $info .= '
'; return $info; @@ -549,7 +594,7 @@ public function setAttendantsSegment(Odf $odfHandler, Translate $outputLangs, ar try { $segment = (!empty($moreParam['segmentName']) ? $moreParam['segmentName'] : 'attendant'); $listLines = $odfHandler->setSegment($segment); - } catch (OdfException $e) { + } catch (OdfException|OdfExceptionSegmentNotFound $e) { // We may arrive here if tags for lines not present into template $foundTagForLines = 0; $listLines = ''; @@ -784,8 +829,12 @@ public function write_file(SaturneDocuments $objectDocument, Translate $outputLa $fileName = $newFileTmp . '.' . $newFileFormat; $file = $dir . '/' . $fileName; - $objectDocument->last_main_doc = $fileName; - $objectDocument->update($moreParam['user'], true); + $objectDocument->setValueFrom('last_main_doc', $fileName, '', null, '', '', $moreParam['user'], '', ''); + if (!empty($objectDocument->error)) { + $objectDocument->errors[] = $objectDocument->ref; + setEventMessages($objectDocument->error, $objectDocument->errors, 'errors'); + return -1; + } dol_mkdir($conf->$moduleNameLowerCase->dir_temp); diff --git a/core/substitutions/functions_saturne.lib.php b/core/substitutions/functions_saturne.lib.php index 1d7f4a58..10794df7 100644 --- a/core/substitutions/functions_saturne.lib.php +++ b/core/substitutions/functions_saturne.lib.php @@ -55,7 +55,7 @@ function saturne_completesubstitutionarray(array &$substitutionarray, Translate $signatory->fetch($signatoryID); - $url = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $signatory->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType . '&modal_to_open=modal-signature' . $signatory->id, 3); + $url = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $signatory->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType, 3); $substitutionarray['__SATURNE_SIGNATORY_URL__'] = '' . $langs->transnoentities('SignatureEmailURL') . ''; } diff --git a/core/tpl/actions/admin_conf_actions.tpl.php b/core/tpl/actions/admin_conf_actions.tpl.php new file mode 100644 index 00000000..dfd300f8 --- /dev/null +++ b/core/tpl/actions/admin_conf_actions.tpl.php @@ -0,0 +1,51 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/tpl/actions/admin_conf_actions.tpl.php + * \ingroup saturne + * \brief Template page for admin conf actions + */ + +/** + * The following vars must be defined : + * Global : $conf, $db, $langs + * Parameters : $action + * Variable : $moduleName, $permissiontoread + */ + +if ($action == 'set_mod' && $permissiontoread) { + $value = GETPOST('value'); + $objectType = GETPOST('object_type'); + + $confName = dol_strtoupper($moduleName . '_' . $objectType) . '_ADDON'; + dolibarr_set_const($db, $confName, $value, 'chaine', 0, '', $conf->entity); +} + +if ($action == 'update_mask' && $permissiontoread) { + $documentMaskConst = GETPOST('mask', 'alpha'); + $documentMask = GETPOST('addon_value', 'alpha'); + + if (dol_strlen($documentMask) < 1) { + setEventMessages($langs->trans('ErrorSavedConfig'), [], 'errors'); + } else { + dolibarr_set_const($db, $documentMaskConst, $documentMask, 'chaine', 0, '', $conf->entity); + setEventMessage('SavedConfig'); + header('Location: ' . $_SERVER['PHP_SELF'] . '?module_name=' . $moduleName); + exit; + } +} diff --git a/core/tpl/actions/signature_actions.tpl.php b/core/tpl/actions/signature_actions.tpl.php new file mode 100644 index 00000000..ab682b66 --- /dev/null +++ b/core/tpl/actions/signature_actions.tpl.php @@ -0,0 +1,104 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/tpl/actions/signature_actions.tpl.php + * \ingroup saturne + * \brief Template page for signature actions + */ + +/** + * The following vars must be defined: + * Global : $conf, $langs, $user + * Parameters : $action, $documentType, $moduleName, $moduleNameLowerCase, $objectType, $trackID + * Objects : $document, $object, $signatory + * Variable : $upload_dir + */ + +// Action to add signature +if ($action == 'add_signature') { + $data = json_decode(file_get_contents('php://input'), true); + + $signatory->signature = $data['signature']; + $signatory->signature_date = dol_now(); + + $result = $signatory->update($user, true); + if ($result > 0) { + // Creation signature OK + $signatory->setSigned($user, false, 'public'); + } elseif (!empty($signatory->errors)) { // Creation signature KO + setEventMessages('', $signatory->errors, 'errors'); + } else { + setEventMessages($signatory->error, [], 'errors'); + } +} + +// Action to build doc +if ($action == 'builddoc') { + $outputLangs = $langs; + $newLang = ''; + + if ($conf->global->MAIN_MULTILANGS && empty($newLang) && GETPOST('lang_id', 'aZ09')) { + $newLang = GETPOST('lang_id', 'aZ09'); + } + if (!empty($newLang)) { + $outputLangs = new Translate('', $conf); + $outputLangs->setDefaultLang($newLang); + } + + // To be sure vars is defined + if (empty($hideDetails)){ + $hideDetails = 0; + } + if (empty($hideDesc)) { + $hideDesc = 0; + } + if (empty($hideRef)) { + $hideRef = 0; + } + if (empty($moreParams)) { + $moreParams = []; + } + + $confName = strtoupper($moduleName) . '_' . strtoupper($documentType) . '_ADDON_ODT_PATH'; + $template = preg_replace('/DOL_DOCUMENT_ROOT/', DOL_DOCUMENT_ROOT, $conf->global->$confName); + $model = strtolower($documentType) . '_odt:' . $template .'template_' . strtolower($documentType) . '.odt'; + + $moreParams['object'] = $object; + $moreParams['user'] = $user; + $moreParams['specimen'] = 1; + $moreParams['zone'] = 'public'; + $moreParams['objectType'] = $objectType; + + $result = $document->generateDocument($model, $outputLangs, $hideDetails, $hideDesc, $hideRef, $moreParams); + + if ($result > 0) { + dol_copy($upload_dir . '/' . strtolower($objectType) . 'document' . '/' . $object->ref . '/public_specimen/' . $document->last_main_doc, DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/' . $objectType . '_specimen_' . $trackID . '.odt'); + } else { + setEventMessages($document->error, $document->errors, 'errors'); + } +} + +// Action to remove all temp files +if ($action == 'remove_file') { + $files = dol_dir_list(DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/'); // get all file names + foreach ($files as $file) { + if (is_file($file['fullname'])) { + dol_delete_file($file['fullname']); + } + } +} diff --git a/core/tpl/admin/object/object_document_model_view.tpl.php b/core/tpl/admin/object/object_document_model_view.tpl.php index 886a52fa..d6aff7e9 100644 --- a/core/tpl/admin/object/object_document_model_view.tpl.php +++ b/core/tpl/admin/object/object_document_model_view.tpl.php @@ -1,6 +1,4 @@ trans('DocumentTemplate'), '', ''); - // Select document models $def = []; $sql = 'SELECT nom'; @@ -9,7 +7,6 @@ $sql .= ' AND entity = ' . $conf->entity; $resql = $db->query($sql); - if ($resql) { $i = 0; $num_rows = $db->num_rows($resql); @@ -22,91 +19,118 @@ dol_print_error($db); } -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; - if (is_array($filelist) && !empty($filelist)) { foreach ($filelist as $file) { if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file) && preg_match('/' . $documentParentType . '/i', $file)) { + print load_fiche_titre($langs->trans('DocumentTemplate'), '', ''); + + print '
' . $langs->trans('Name') . '' . $langs->trans('Description') . '' . $langs->trans('Status') . '' . $langs->trans('Default') . '' . $langs->trans('ShortInfo') . '' . $langs->trans('Preview') . '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - if (file_exists($dir.'/'.$file)) { - $name = substr($file, 4, dol_strlen($file) - 16); - $classname = substr($file, 0, dol_strlen($file) - 12); + break; + } + } +} - require_once $dir . '/' . $file; +if (is_array($filelist) && !empty($filelist)) { + foreach ($filelist as $file) { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file) && preg_match('/' . $documentParentType . '/i', $file)) { + if (file_exists($dir . '/' . $file)) { + $name = substr($file, 4, dol_strlen($file) - 16); + $customName = substr($file, 4, dol_strlen($file) - 20) . '_custom_odt'; + $classname = substr($file, 0, dol_strlen($file) - 12); + + require_once $dir . '/' . $file; $module = new $classname($db); - $modulequalified = 1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) { - $modulequalified = 0; + print ''; + + // Active + print ''; + + // Default + print ''; + + // Info + $htmlToolTip = $langs->trans('Name') . ': ' . $module->name; + $htmlToolTip .= '
' . $langs->trans('Type') . ': ' . ($module->type ?: $langs->trans('Unknown')); + $htmlToolTip .= '
' . $langs->trans('Width') . '/' . $langs->trans('Height') . ': ' . $module->page_largeur . '/' . $module->page_hauteur; + $htmlToolTip .= '

' . $langs->trans('FeaturesSupported') . ':'; + $htmlToolTip .= '
' . $langs->trans('Logo') . ': ' . yn($module->option_logo, 1, 1); + print ''; + + // Preview + print ''; - if ($modulequalified) { + // Custom ODT document + if (method_exists($module, 'info')) { print ''; // Active print ''; // Default print ''; - - // Info - $htmltooltip = ''.$langs->trans('Name') . ': ' . $module->name; - $htmltooltip .= '
'.$langs->trans('Type') . ': ' . ($module->type ?: $langs->trans('Unknown')); - $htmltooltip .= '
'.$langs->trans('Width') . '/' . $langs->trans('Height') . ': ' . $module->page_largeur . '/' . $module->page_hauteur; - $htmltooltip .= '

' . $langs->trans('FeaturesSupported') . ':'; - $htmltooltip .= '
' . $langs->trans('Logo') . ': ' . yn($module->option_logo, 1, 1); - print ''; - - // Preview - print ''; - print ''; + print ''; } } } } } -print '
' . $langs->trans('Name') . '' . $langs->trans('Description') . '' . $langs->trans('Status') . '' . $langs->trans('Default') . '' . $langs->trans('ShortInfo') . '' . $langs->trans('Preview') . '
'; + print (empty($module->name) ? $name : $module->name); + print ''; + if (method_exists($module, 'info')) { + print $module->info($langs); + } else { + print $module->description; + } + print ''; + if (in_array($name, $def)) { + print img_picto($langs->trans('Enabled'), 'switch_on'); + } else { + print ''; + print img_picto($langs->trans('Disabled'), 'switch_off'); + print ''; + } + print ''; + $defaultModelConf = strtoupper($moduleName) . '_' . strtoupper($documentParentType) . '_DEFAULT_MODEL'; + if ($conf->global->$defaultModelConf == $name) { + print img_picto($langs->trans('Default'), 'on'); + } else { + print '' . img_picto($langs->trans('Disabled'), 'off') . ''; } - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) { - $modulequalified = 0; + print ''; + print $form->textwithpicto('', $htmlToolTip, -1, 0); + print ''; + if ($module->type == 'pdf') { + print '' . img_object($langs->trans('Preview'), 'pdf') . ''; + } else { + print img_object($langs->trans('PreviewNotAvailable'), 'generic'); } + print '
'; - print (empty($module->name) ? $name : $module->name); + print $langs->trans('CustomODT'); print ''; - if (method_exists($module, 'info')) { - print $module->info($langs); - }else { - print $module->description; - } + $module->custom_info = true; + print $module->info($langs); print ''; - - if (in_array($name, $def)) { - print ''; + if (in_array($customName, $def)) { + print ''; print img_picto($langs->trans('Enabled'), 'switch_on'); } else { - print ''; + print ''; print img_picto($langs->trans('Disabled'), 'switch_off'); } print ''; - print ''; $defaultModelConf = strtoupper($moduleName) . '_' . strtoupper($documentParentType) . '_DEFAULT_MODEL'; - if ($conf->global->$defaultModelConf == $name) { + if ($conf->global->$defaultModelConf == $customName) { print img_picto($langs->trans('Default'), 'on'); } else { - print '' . img_picto($langs->trans('Disabled'), 'off') . ''; + print '' . img_picto($langs->trans('Disabled'), 'off') . ''; } - print ''; - print $form->textwithpicto('', $htmltooltip, -1, 0); - print ''; - if ($module->type == 'pdf') { - print '' . img_object($langs->trans('Preview'), 'pdf') . ''; - } else { - print img_object($langs->trans('PreviewNotAvailable'), 'generic'); - } - print '
'; diff --git a/core/tpl/admin/object/object_numbering_module_view.tpl.php b/core/tpl/admin/object/object_numbering_module_view.tpl.php index c1219fcc..6b3352e9 100644 --- a/core/tpl/admin/object/object_numbering_module_view.tpl.php +++ b/core/tpl/admin/object/object_numbering_module_view.tpl.php @@ -1,6 +1,31 @@ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/tpl/admin/object_numbering_module_view.tpl.php + * \ingroup saturne + * \brief Template page for object numbering module view + */ + +/** + * The following vars must be defined : + * Global : $conf, $db, $langs + * Objects : $object + * Variable : $documentParentType, $documentPath, $moduleName, $moduleNameLowerCase, $objectModSubdir */ //$numberingModuleLabel = str_contains($object->element, 'det') ? 'NumberingModuleDet' : 'NumberingModule'; @@ -17,11 +42,11 @@ clearstatcache(); if (empty($documentPath)) { - $elementType = $object->element; - $path = '/custom/' . $moduleNameLowerCase . '/core/modules/' . $moduleNameLowerCase . '/' . ($objectModSubdir ? $objectModSubdir . '/' : '') . $elementType . '/'; + $objectType = $object->element; + $path = '/custom/' . $moduleNameLowerCase . '/core/modules/' . $moduleNameLowerCase . '/' . ($objectModSubdir ? $objectModSubdir . '/' : '') . $objectType . '/'; } else { - $elementType = $documentParentType; - $path = '/custom/' . $moduleNameLowerCase . '/core/modules/' . $moduleNameLowerCase . '/' . $moduleNameLowerCase . 'documents/' . $elementType . '/'; + $objectType = $documentParentType; + $path = '/custom/' . $moduleNameLowerCase . '/core/modules/' . $moduleNameLowerCase . '/' . $moduleNameLowerCase . 'documents/' . $objectType . '/'; } $dir = dol_buildpath($path); @@ -35,7 +60,7 @@ arsort($filelist); if (is_array($filelist) && !empty($filelist)) { foreach ($filelist as $file) { - if (preg_match('/mod_/', $file) && preg_match('/' . $elementType . '/i', $file)) { + if (preg_match('/mod_/', $file) && preg_match('/' . $objectType . '/i', $file)) { if (file_exists($dir . '/' . $file)) { $classname = substr($file, 0, dol_strlen($file) - 4); @@ -62,16 +87,13 @@ print ''; print ''; - $confType = strtoupper($moduleName) . '_' . strtoupper($elementType) . '_ADDON'; - if ($conf->global->$confType == $file || $conf->global->$confType . '.php' == $file) { + $confName = dol_strtoupper($moduleName . '_' . $objectType) . '_ADDON'; + if (getDolGlobalString($confName) . '.php' == $file) { print img_picto($langs->trans('Activated'), 'switch_on'); } else { - print '' . img_picto($langs->trans('Disabled'), 'switch_off') . ''; + print '' . img_picto($langs->trans('Disabled'), 'switch_off') . ''; } - print ''; - - print ''; - print ''; + print ''; } } } diff --git a/core/tpl/attendants/attendants_table_view.tpl.php b/core/tpl/attendants/attendants_table_view.tpl.php index 6138d2fe..f3471c9e 100644 --- a/core/tpl/attendants/attendants_table_view.tpl.php +++ b/core/tpl/attendants/attendants_table_view.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2022-2024 EVARISK * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ /** * \file core/tpl/attendants/attendants_table_view.tpl.php * \ingroup saturne - * \brief Template page for attendants table. + * \brief Template page for attendants table */ /** @@ -101,8 +101,8 @@ print ''; if ($object->status == $object::STATUS_VALIDATED) { if ((!$user->rights->$moduleNameLowerCase->$objectType->read && $user->rights->$moduleNameLowerCase->assignedtome->$objectType && ($element->element_id == $user->id || $element->element_id == $user->contact_id)) || $permissiontoadd) { - $signatureUrl = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $element->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType . '&modal_to_open=modal-signature' . $element->id, 3); - print '
'; + $signatureUrl = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $element->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType, 3); + print '
'; print ' '; print ''; } @@ -127,7 +127,7 @@ print ''; print ''; print ''; - print ''; if ($nbEmailSent > 0) { @@ -161,7 +161,7 @@ if ($object->status <= $object::STATUS_VALIDATED && $permissiontoadd) { print ' diff --git a/core/tpl/signature/public_signature_view.tpl.php b/core/tpl/signature/public_signature_view.tpl.php new file mode 100644 index 00000000..8cf95dfe --- /dev/null +++ b/core/tpl/signature/public_signature_view.tpl.php @@ -0,0 +1,98 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/tpl/signature/public_signature_view.tpl.php + * \ingroup saturne + * \brief Template page for public signature view + */ + +/** + * The following vars must be defined : + * Global : $conf, $langs + * Parameters : $objectType, $trackID + * Objects : $object, $signatory + * Variable : $fileExists, $moduleNameLowerCase, $moreParams + */ ?> + +
+ + + +
+
+ +
trans('ElectronicSignature'); ?>
+
lastname) . ' ' . ucfirst($signatory->firstname); ?>
+
+ +
+
+
+
trans(ucfirst($objectType)); ?>
+
ref . ' ' . $object->label; ?>
+
+
+ + + + +
+ +
+ +
+
+
+
+ +
+
+ signature) && $object->status == $object::STATUS_VALIDATED && $signatory->attendance != SaturneSignature::ATTENDANCE_ABSENT) : ?> + +
+ +
+ +
+ +
+
+ + + ' . $langs->trans('SignaturePublicInterfaceForbidden') . '
'; + endif; ?> + + + 'fontawesome_fa-check-circle_fas_#47e58e', + 'color' => '#47e58e', + 'confirmationTitle' => 'SavedSignature', + 'buttonParams' => ['CloseModal' => 'button-blue signature-confirmation-close'] + ]; + require_once __DIR__ . '/../utils/confirmation_view.tpl.php'; +} diff --git a/core/tpl/signature/signature_view.tpl.php b/core/tpl/signature/signature_view.tpl.php deleted file mode 100644 index 77888877..00000000 --- a/core/tpl/signature/signature_view.tpl.php +++ /dev/null @@ -1,47 +0,0 @@ -signature) && ($object->status == $object::STATUS_VALIDATED || $element->signature == $langs->transnoentities('FileGenerated')) && $element->attendance != SaturneSignature::ATTENDANCE_ABSENT && $permissiontoadd) : ?> - -signature)) : ?> - - - - diff --git a/core/tpl/utils/confirmation_view.tpl.php b/core/tpl/utils/confirmation_view.tpl.php new file mode 100644 index 00000000..700aa37f --- /dev/null +++ b/core/tpl/utils/confirmation_view.tpl.php @@ -0,0 +1,42 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/tpl/utils/confirmation_view.tpl.php + * \ingroup saturne + * \brief Template page for confirmation view + */ + +/** + * The following vars must be defined : + * Global : $langs + * Parameters : $confirmationParams + * options : $confirmationParams[picto, moreCSS, confirmationTitle, buttonLabels] + */ ?> + + + diff --git a/core/tpl/utils/index.php b/core/tpl/utils/index.php new file mode 100644 index 00000000..eea59b98 --- /dev/null +++ b/core/tpl/utils/index.php @@ -0,0 +1,2 @@ +name = preg_replace('/^Interface/i', '', get_class($this)); $this->family = 'demo'; $this->description = 'Saturne triggers.'; - $this->version = '1.2.1'; + $this->version = '1.3.0'; $this->picto = 'saturne@saturne'; } diff --git a/css/saturne.min.css b/css/saturne.min.css index b9d9b09c..b1b82504 100644 --- a/css/saturne.min.css +++ b/css/saturne.min.css @@ -1 +1 @@ -.box-flex-item .info-box{display:flex;flex-wrap:nowrap}.box-flex-item .info-box .info-box-icon{height:auto !important;border-radius:0 0 0 15px}.box-flex-item .info-box .info-box-content{margin-left:0 !important}.box-flex-item .info-box-icon{display:flex}.box-flex-item .info-box-icon img,.box-flex-item .info-box-icon i{margin:auto}.box-flex-item .close-dashboard-info,.box-flex-item .close-dashboard-widget{width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;background:#e3e3e3;transition:all .2s ease-out;position:absolute;top:-5px;right:-5px}.box-flex-item .close-dashboard-info:hover,.box-flex-item .close-dashboard-widget:hover{cursor:pointer;background:#e05353;color:#fff;transform:scale(1.2)}.box-flex-item .close-dashboard-info>[class*=fa],.box-flex-item .close-dashboard-widget>[class*=fa]{display:inline-block;line-height:20px}.gallery-table .linked-medias-list{display:flex;gap:10px;height:auto !important}@media(max-width: 500px){.gallery-table .linked-medias-list{flex-wrap:wrap}}@media(max-width: 500px){div.tabBar table.border.gallery-table tr.linked-medias,div.tabBar table.border.gallery-table tr.linked-medias .linked-medias-list{height:auto !important}}.wpeo-dropdown{position:relative;display:inline-block}.wpeo-dropdown .dropdown-toggle{display:inline-block}.wpeo-dropdown .dropdown-toggle span~*[class*=icon]{margin-left:10px}.wpeo-dropdown .saturne-dropdown-content{opacity:0;pointer-events:none;transform:translateY(-10px);transition:all .2s ease-out;position:absolute;background:#fff;z-index:99;border:1px solid rgba(0,0,0,.1);box-shadow:0 0 10px 0px rgba(0,0,0,.3);width:220px;padding:.6em}.wpeo-dropdown.dropdown-active .saturne-dropdown-content{opacity:1;pointer-events:auto;transform:translateY(0)}.wpeo-dropdown ul,.wpeo-dropdown li{margin:0;list-style-type:none;padding:0}.wpeo-dropdown .dropdown-item{display:block;color:rgba(0,0,0,.7);text-decoration:none}.wpeo-dropdown .dropdown-item::before{display:none;content:""}.wpeo-dropdown .dropdown-item .dropdown-result-title,.wpeo-dropdown .dropdown-item .dropdown-result-subtitle{display:block}.wpeo-dropdown .dropdown-item .dropdown-result-title{font-size:14px}.wpeo-dropdown .dropdown-item .dropdown-result-subtitle{font-size:12px;color:rgba(0,0,0,.5)}.wpeo-dropdown.dropdown-small .saturne-dropdown-content{width:60px}.wpeo-dropdown.dropdown-medium .saturne-dropdown-content{width:220px}.wpeo-dropdown.dropdown-large .saturne-dropdown-content{width:360px}.wpeo-dropdown.dropdown-padding-0 .saturne-dropdown-content{padding:0}.wpeo-dropdown.dropdown-padding-1 .saturne-dropdown-content{padding:.6em}.wpeo-dropdown.dropdown-padding-2 .saturne-dropdown-content{padding:1.2em}.wpeo-dropdown.dropdown-left .saturne-dropdown-content{left:0}.wpeo-dropdown.dropdown-right .saturne-dropdown-content{right:0}.wpeo-dropdown.dropdown-horizontal.dropdown-left .saturne-dropdown-content{left:100%}.wpeo-dropdown.dropdown-horizontal.dropdown-right .saturne-dropdown-content{right:100%}.wpeo-dropdown.dropdown-horizontal .saturne-dropdown-content{top:0;width:auto !important;display:flex;flex-wrap:nowrap;flex-direction:row}.wpeo-dropdown .dropdown-item.dropdown-item-disable{opacity:.6;cursor:default !important;pointer-events:none}.wpeo-dropdown .saturne-dropdown-content .dropdown-item{padding:.6em;background:#fff;transition:all .2s ease-out}.wpeo-dropdown .saturne-dropdown-content .dropdown-item:hover{cursor:pointer;background:rgba(0,0,0,.1)}.wpeo-dropdown.dropdown-list .saturne-dropdown-content{text-align:left}.wpeo-dropdown.dropdown-list .dropdown-item::after{display:block;content:"";clear:both}.wpeo-dropdown.dropdown-list .dropdown-item img{float:left;margin-right:.4em}.wpeo-dropdown.dropdown-grid .dropdown-item img{width:100%;height:auto;display:block;margin:0}.wpeo-button{display:inline-block;border:0;box-shadow:none;background:none;text-decoration:none;padding:6px 14px;line-height:1.4;vertical-align:middle;height:auto;border-radius:0;transition:all .2s ease-out;position:relative;border-width:3px;border-style:solid;font-size:16px;box-sizing:border-box;border-radius:5px;background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button:focus,.wpeo-button:visited{color:#fff}.wpeo-button:hover{color:#fff;box-shadow:inset 0 -2.6em rgba(255,255,255,.25);cursor:pointer;text-decoration:none}.wpeo-button:focus,.wpeo-button:active{outline:none}.wpeo-button{background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button.button-main{background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button.button-secondary{background:#263c5c;border-color:#263c5c;color:#fff}.wpeo-button.button-light{background:#fff;border-color:#fff;color:#333}.wpeo-button.button-light:hover{box-shadow:inset 0 -2.6em rgba(0,0,0,.1);color:#333}.wpeo-button.button-dark{background:#2b2b2b;border-color:#2b2b2b}.wpeo-button.button-grey{background:#ececec;border-color:#ececec;color:#333}.wpeo-button.button-grey:hover{box-shadow:inset 0 -2.6em rgba(0,0,0,.1);color:#333}.wpeo-button.button-red{background:#e05353;border-color:#e05353}.wpeo-button.button-yellow{background:#e9ad4f;border-color:#e9ad4f}.wpeo-button.button-blue{background:#0d8aff;border-color:#0d8aff}.wpeo-button.button-green{background:#47e58e;border-color:#47e58e}.wpeo-button.button-orange{background:#ff6900;border-color:#ff6900}.wpeo-button.button-transparent{background:rgba(0,0,0,0);border-color:rgba(0,0,0,0);color:rgba(51,51,51,.4)}.wpeo-button.button-transparent:hover{color:#333;box-shadow:inset 0 -2.6em rgba(255,255,255,0)}.wpeo-button.button-bordered{background:none;border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-main{border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-main:hover{box-shadow:inset 0 -2.6em #0d8aff;color:#fff}.wpeo-button.button-bordered.button-light{border-color:#fff;color:#fff}.wpeo-button.button-bordered.button-light:hover{box-shadow:inset 0 -2.6em #fff;color:#333}.wpeo-button.button-bordered.button-dark{border-color:#2b2b2b;color:#2b2b2b}.wpeo-button.button-bordered.button-dark:hover{box-shadow:inset 0 -2.6em #2b2b2b}.wpeo-button.button-bordered.button-grey{border-color:#ececec;color:#a0a0a0}.wpeo-button.button-bordered.button-grey:hover{box-shadow:inset 0 -2.6em #ececec;color:#333}.wpeo-button.button-bordered.button-red{border-color:#e05353;color:#e05353}.wpeo-button.button-bordered.button-red:hover{box-shadow:inset 0 -2.6em #e05353}.wpeo-button.button-bordered.button-yellow{border-color:#e9ad4f;color:#e9ad4f}.wpeo-button.button-bordered.button-yellow:hover{box-shadow:inset 0 -2.6em #e9ad4f}.wpeo-button.button-bordered.button-blue{border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-blue:hover{box-shadow:inset 0 -2.6em #0d8aff}.wpeo-button.button-bordered.button-green{border-color:#47e58e;color:#47e58e}.wpeo-button.button-bordered.button-green:hover{box-shadow:inset 0 -2.6em #47e58e}.wpeo-button.button-bordered:hover{box-shadow:inset 0 -2.6em #0d8aff;color:#fff}.wpeo-button .button-add{position:absolute;top:.4em;right:.2em;opacity:.6;font-size:14px;transition:all .2s ease-out}.wpeo-button:hover .button-add{opacity:.8}.wpeo-button.button-square-40 .button-add{top:.1em;right:0}.wpeo-button .button-icon,.wpeo-button span{position:relative}.wpeo-button .button-icon~span{margin-left:10px}.wpeo-button span~.button-icon{margin-left:10px}.wpeo-button.button-strong span{font-weight:800}.wpeo-button.button-uppercase span{text-transform:uppercase;font-size:14px}.wpeo-button[class*=button-square-]{text-align:center;overflow:hidden;padding:0}.wpeo-button.button-square-30{width:30px;height:30px;line-height:24px}.wpeo-button.button-square-30 .button-icon{font-size:12px;line-height:24px}.wpeo-button.button-square-40{width:40px;height:40px;line-height:34px}.wpeo-button.button-square-40 .button-icon{line-height:34px}.wpeo-button.button-square-50{width:50px;height:50px;line-height:44px}.wpeo-button.button-square-50 .button-icon{line-height:44px}.wpeo-button.button-square-60{width:60px;height:60px;line-height:54px}.wpeo-button.button-square-60 .button-icon{line-height:54px}.wpeo-button.button-float-left{float:left}.wpeo-button.button-float-right{float:right}.wpeo-button.button-margin{margin:1em 0}.wpeo-button.button-radius-1{border-radius:2px}.wpeo-button.button-radius-2{border-radius:4px}.wpeo-button.button-radius-3{border-radius:6px}.wpeo-button.button-rounded{border-radius:50%}.wpeo-button.button-disable{background:#ececec !important;border-color:#ececec !important;color:rgba(0,0,0,.4) !important;pointer-events:none}.wpeo-button.button-disable:hover{box-shadow:none !important}.wpeo-button.button-disable.button-event{pointer-events:all}.wpeo-button.button-size-small{font-size:14px}.wpeo-button.button-size-small.button-uppercase span{font-size:12px}.wpeo-button.button-size-large{font-size:18px}.wpeo-button.button-size-large.button-uppercase span{font-size:16px}.wpeo-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:rgba(39,42,53,.9);opacity:0;pointer-events:none;transition:all .2s ease-out}.wpeo-modal textarea{resize:none}.wpeo-modal.modal-active{opacity:1;pointer-events:auto;z-index:1002}.wpeo-modal.modal-active .modal-container{transform:translate(-50%, -50%);border-radius:10px}.wpeo-modal.modal-active textarea{resize:both}.wpeo-modal.modal-active .modal-active{z-index:1003}.wpeo-modal.modal-active .modal-active .modal-active{z-index:1004}.wpeo-modal.modal-force-display .modal-close{display:none}.wpeo-modal .modal-container{position:absolute;transition:all .2s ease-out;width:100%;max-width:860px;height:100%;max-height:560px;background:#fff;padding:1em 0;margin:auto;top:50%;left:50%;transform:translate(-50%, -60%)}@media(max-width: 700px){.wpeo-modal .modal-container{padding:1em}}.wpeo-modal .modal-container .modal-header{height:10%;display:flex;padding:0 2em}.wpeo-modal .modal-container .modal-content{height:78%;padding:0 2em}.wpeo-modal .modal-container .modal-footer{height:12%;padding:0 2em}.wpeo-modal .modal-container .modal-header .modal-title,.wpeo-modal .modal-container .modal-header .modal-close{margin:auto 0}.wpeo-modal .modal-container .modal-header .modal-title{text-transform:uppercase;font-size:18px;white-space:normal}@media(max-width: 1000px){.wpeo-modal .modal-container .modal-header .modal-title{font-size:16px}}@media(max-width: 700px){.wpeo-modal .modal-container .modal-header .modal-title{font-size:14px}}.wpeo-modal .modal-container .modal-header .modal-close{margin-left:auto;color:rgba(0,0,0,.3);padding:4px;transition:all .2s ease-out}.wpeo-modal .modal-container .modal-header .modal-close:hover{cursor:pointer;color:#0d8aff}.wpeo-modal .modal-container .modal-content{overflow-y:auto;font-size:14px}@media(max-width: 700px){.wpeo-modal .modal-container .modal-content{font-size:12px}}.wpeo-modal .modal-container .modal-footer{text-align:right;padding-top:1em}.wpeo-modal .modal-container .modal-footer.left{text-align:left}.wpeo-modal .modal-container .modal-footer.center{text-align:center}.wpeo-loader{transition:all .2s ease-out;pointer-events:none;opacity:.5;position:relative}.wpeo-loader .loader-spin{position:absolute;border:3px solid #a7a7a7;border-top:3px solid #002140;border-radius:50%;width:20px;height:20px;z-index:99;left:50%;top:50%;margin:0 !important;padding:0 !important;animation:loader-spin 1s ease-out infinite}@keyframes loader-spin{0%{transform:translate(-50%, -50%) rotate(0deg)}100%{transform:translate(-50%, -50%) rotate(360deg)}}.wpeo-grid{display:flex;flex-flow:row wrap;flex:0 1 auto;margin-left:-0.5em;margin-right:-0.5em;width:100%}.wpeo-grid *{box-sizing:border-box}.wpeo-grid>*{padding:.5em !important}.wpeo-grid.grid-1>*{width:100%}.wpeo-grid.grid-1>.grid-1{width:100%}.wpeo-grid.grid-2>*{width:50%}.wpeo-grid.grid-2>.grid-1{width:50%}.wpeo-grid.grid-2>.grid-2{width:100%}.wpeo-grid.grid-3>*{width:33.3333333333%}.wpeo-grid.grid-3>.grid-1{width:33.3333333333%}.wpeo-grid.grid-3>.grid-2{width:66.6666666667%}.wpeo-grid.grid-3>.grid-3{width:100%}.wpeo-grid.grid-4>*{width:25%}.wpeo-grid.grid-4>.grid-1{width:25%}.wpeo-grid.grid-4>.grid-2{width:50%}.wpeo-grid.grid-4>.grid-3{width:75%}.wpeo-grid.grid-4>.grid-4{width:100%}.wpeo-grid.grid-5>*{width:20%}.wpeo-grid.grid-5>.grid-1{width:20%}.wpeo-grid.grid-5>.grid-2{width:40%}.wpeo-grid.grid-5>.grid-3{width:60%}.wpeo-grid.grid-5>.grid-4{width:80%}.wpeo-grid.grid-5>.grid-5{width:100%}.wpeo-grid.grid-6>*{width:16.6666666667%}.wpeo-grid.grid-6>.grid-1{width:16.6666666667%}.wpeo-grid.grid-6>.grid-2{width:33.3333333333%}.wpeo-grid.grid-6>.grid-3{width:50%}.wpeo-grid.grid-6>.grid-4{width:66.6666666667%}.wpeo-grid.grid-6>.grid-5{width:83.3333333333%}.wpeo-grid.grid-6>.grid-6{width:100%}@media(max-width: 1000px){.wpeo-grid:not(.grid-no-responsive).grid-1>*{width:100%}.wpeo-grid:not(.grid-no-responsive).grid-2>*,.wpeo-grid:not(.grid-no-responsive).grid-3>*,.wpeo-grid:not(.grid-no-responsive).grid-4>*,.wpeo-grid:not(.grid-no-responsive).grid-5>*,.wpeo-grid:not(.grid-no-responsive).grid-6>*{width:50%}}@media(max-width: 700px){.wpeo-grid:not(.grid-no-responsive).grid-1>*,.wpeo-grid:not(.grid-no-responsive).grid-2>*,.wpeo-grid:not(.grid-no-responsive).grid-3>*,.wpeo-grid:not(.grid-no-responsive).grid-4>*,.wpeo-grid:not(.grid-no-responsive).grid-5>*,.wpeo-grid:not(.grid-no-responsive).grid-6>*{width:100%}}.wpeo-grid.grid-padding-0{margin-left:0;margin-right:0}.wpeo-grid.grid-padding-0>*{padding:0 !important}.wpeo-grid.grid-padding-1{margin-left:-0.2em;margin-right:-0.2em}.wpeo-grid.grid-padding-1>*{padding:.2em !important}.wpeo-grid.grid-padding-2{margin-left:-0.5em;margin-right:-0.5em}.wpeo-grid.grid-padding-2>*{padding:.5em !important}.wpeo-grid.grid-padding-3{margin-left:-1em;margin-right:-1em}.wpeo-grid.grid-padding-3>*{padding:1em !important}.wpeo-gridlayout{display:grid;grid-gap:1em 1em;grid-template-columns:repeat(4, 1fr)}.wpeo-gridlayout.grid-1{grid-template-columns:repeat(1, 1fr)}.wpeo-gridlayout.grid-1>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-2{grid-template-columns:repeat(2, 1fr)}.wpeo-gridlayout.grid-2>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-2>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-2>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-3{grid-template-columns:repeat(3, 1fr)}.wpeo-gridlayout.grid-3>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-3>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-3>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-3>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-3>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4{grid-template-columns:repeat(4, 1fr)}.wpeo-gridlayout.grid-4>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-4>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5{grid-template-columns:repeat(5, 1fr)}.wpeo-gridlayout.grid-5>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-5>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-5{grid-column:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-5{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6{grid-template-columns:repeat(6, 1fr)}.wpeo-gridlayout.grid-6>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-6>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-5{grid-column:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-5{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-6{grid-column:auto/span 6}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-6{grid-column:auto/span 2}}.wpeo-gridlayout>.gridh-1{grid-row:auto/span 1}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-1{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-2{grid-row:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-2{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-3{grid-row:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-3{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-4{grid-row:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-4{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-5{grid-row:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-5{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-6{grid-row:auto/span 6}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-6{grid-row:auto/span 1 !important}}.wpeo-gridlayout.grid-margin-0{margin:0em 0}.wpeo-gridlayout.grid-margin-1{margin:1em 0}.wpeo-gridlayout.grid-margin-2{margin:2em 0}.wpeo-gridlayout.grid-margin-3{margin:3em 0}.wpeo-gridlayout.grid-margin-4{margin:4em 0}.wpeo-gridlayout.grid-margin-5{margin:5em 0}.wpeo-gridlayout.grid-margin-6{margin:6em 0}.wpeo-gridlayout.grid-gap-0{grid-gap:0em 0em}.wpeo-gridlayout.grid-gap-1{grid-gap:1em 1em}.wpeo-gridlayout.grid-gap-2{grid-gap:2em 2em}.wpeo-gridlayout.grid-gap-3{grid-gap:3em 3em}.wpeo-gridlayout.grid-gap-4{grid-gap:4em 4em}.wpeo-gridlayout.grid-gap-5{grid-gap:5em 5em}.wpeo-gridlayout.grid-gap-6{grid-gap:6em 6em}.wpeo-gridlayout .grid-align-center{margin-left:auto;margin-right:auto}.wpeo-gridlayout .grid-align-right{margin-left:auto}.wpeo-gridlayout .grid-align-middle{margin-top:auto;margin-bottom:auto}.wpeo-gridlayout .grid-align-bottom{margin-top:auto}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-2{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-3{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-3{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-4{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-4{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-5{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-5{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-6{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-6{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content)>*{grid-column:auto/span 1 !important}}.wpeo-table.table-flex{display:flex;flex-direction:column;font-size:14px}.wpeo-table.table-flex .table-row{display:flex;flex-wrap:nowrap;flex-direction:row}.wpeo-table.table-flex .table-row:not(.table-header):nth-of-type(odd){background:rgba(0,0,0,.05)}.wpeo-table.table-flex .table-row.table-header{background:#263c5c}.wpeo-table.table-flex .table-row.table-header .table-cell{font-weight:700;color:#fff}.wpeo-table.table-flex .table-cell{margin:auto 0;width:100%;padding:.8em .6em}@media(max-width: 1000px){.wpeo-table.table-flex .table-cell{padding:.4em}}.wpeo-table.table-flex.table-1 .table-cell{width:100%}.wpeo-table.table-flex.table-2 .table-cell{width:50%}.wpeo-table.table-flex.table-3 .table-cell{width:33.3333333333%}.wpeo-table.table-flex.table-4 .table-cell{width:25%}.wpeo-table.table-flex.table-5 .table-cell{width:20%}.wpeo-table.table-flex.table-6 .table-cell{width:16.6666666667%}.wpeo-table.table-flex.table-7 .table-cell{width:14.2857142857%}.wpeo-table.table-flex.table-8 .table-cell{width:12.5%}.wpeo-table.table-flex.table-9 .table-cell{width:11.1111111111%}.wpeo-table.table-flex.table-10 .table-cell{width:10%}.wpeo-table.table-flex .table-cell.table-25{max-width:25px;min-width:25px}.wpeo-table.table-flex .table-cell.table-50{max-width:50px;min-width:50px}.wpeo-table.table-flex .table-cell.table-75{max-width:75px;min-width:75px}.wpeo-table.table-flex .table-cell.table-100{max-width:100px;min-width:100px}.wpeo-table.table-flex .table-cell.table-125{max-width:125px;min-width:125px}.wpeo-table.table-flex .table-cell.table-150{max-width:150px;min-width:150px}.wpeo-table.table-flex .table-cell.table-175{max-width:175px;min-width:175px}.wpeo-table.table-flex .table-cell.table-200{max-width:200px;min-width:200px}.wpeo-table.table-flex .table-cell.table-225{max-width:225px;min-width:225px}.wpeo-table.table-flex .table-cell.table-250{max-width:250px;min-width:250px}.wpeo-table.table-flex .table-cell.table-275{max-width:275px;min-width:275px}.wpeo-table.table-flex .table-cell.table-300{max-width:300px;min-width:300px}.wpeo-table.table-flex .table-cell.table-325{max-width:325px;min-width:325px}.wpeo-table.table-flex .table-cell.table-350{max-width:350px;min-width:350px}.wpeo-table.table-flex .table-cell.table-375{max-width:375px;min-width:375px}.wpeo-table.table-flex .table-cell.table-400{max-width:400px;min-width:400px}.wpeo-table.table-flex .table-cell.table-425{max-width:425px;min-width:425px}.wpeo-table.table-flex .table-cell.table-450{max-width:450px;min-width:450px}.wpeo-table.table-flex .table-cell.table-475{max-width:475px;min-width:475px}.wpeo-table.table-flex .table-cell.table-500{max-width:500px;min-width:500px}.wpeo-table.table-flex .table-cell.table-full{width:100%}.wpeo-table.table-flex .table-cell.table-end{text-align:right;margin-left:auto}.wpeo-table.table-flex .table-cell.table-padding-0{padding:0}@media(max-width: 700px){.wpeo-table.table-flex .table-row{flex-direction:column}.wpeo-table.table-flex .table-cell{width:100% !important;min-width:unset !important}}.wpeo-tooltip{display:block;position:absolute;bottom:0;left:0;opacity:0;pointer-events:none;z-index:99999;white-space:nowrap;background:#2b2b2b;color:#fff;border-radius:6px;font-size:.8rem;padding:0 1em;height:2.2em;line-height:2.2em}.wpeo-tooltip::before{display:block;content:"";width:0;height:0;border-style:solid;position:absolute}.wpeo-tooltip:focus{outline:none}.wpeo-tooltip.tooltip-dark{background:#2b2b2b}.wpeo-tooltip.tooltip-dark.tooltip-top::before{border-color:#2b2b2b rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-right::before{border-color:rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b}.wpeo-tooltip.tooltip-primary{background:#0d8aff}.wpeo-tooltip.tooltip-primary.tooltip-top::before{border-color:#0d8aff rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-right::before{border-color:rgba(0,0,0,0) #0d8aff rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #0d8aff rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #0d8aff}.wpeo-tooltip.tooltip-light{background:#ececec;color:rgba(0,0,0,.6)}.wpeo-tooltip.tooltip-light.tooltip-top::before{border-color:#ececec rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-right::before{border-color:rgba(0,0,0,0) #ececec rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #ececec rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #ececec}.wpeo-tooltip.tooltip-red{background:#e05353}.wpeo-tooltip.tooltip-red.tooltip-top::before{border-color:#e05353 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-right::before{border-color:rgba(0,0,0,0) #e05353 rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #e05353 rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #e05353}.wpeo-tooltip.tooltip-top::before{border-width:6px 6px 0 6px;border-color:#2b2b2b rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);bottom:-6px;left:50%;transform:translateX(-50%)}.wpeo-tooltip.tooltip-right::before{border-width:6px 6px 6px 0;border-color:rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0) rgba(0,0,0,0);top:50%;transform:translateY(-50%);left:-6px}.wpeo-tooltip.tooltip-bottom::before{border-width:0 6px 6px 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0);top:-6px;left:50%;transform:translateX(-50%)}.wpeo-tooltip.tooltip-left::before{border-width:6px 0 6px 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b;top:50%;transform:translateY(-50%);right:-6px}.wpeo-notice{position:relative;font-size:1em;padding:1em;overflow:hidden;border-radius:3px;border:solid #eee 1px;margin:1em 0;display:flex;transition:all .2s ease-out;align-items:center}.wpeo-notice::before{display:block;font-family:"Font Awesome 5 Free";font-weight:900;font-size:24px}.wpeo-notice .notice-content{width:100%;padding:0 1em;color:rgba(0,0,0,.6)}.wpeo-notice .notice-title{font-size:20px;font-weight:600;color:rgba(0,0,0,.9)}.wpeo-notice .notice-subtitle{font-size:14px}.wpeo-notice .notice-close{color:rgba(0,0,0,.3);transition:all .2s ease-out}.wpeo-notice .notice-close:hover{color:#0d8aff;cursor:pointer}.wpeo-notice ul{padding:0 0 0 1.4em;margin:.4em 0}.wpeo-notice.notice-info{border-left:solid #0d8aff 6px;color:#0d8aff;background:rgba(13,138,255,.05)}.wpeo-notice.notice-info::before{content:""}.wpeo-notice.notice-info .notice-title,.wpeo-notice.notice-info .notice-subtitle,.wpeo-notice.notice-info a{color:#0d8aff}.wpeo-notice.notice-error{border-left:solid #e05353 6px;color:#e05353;background:rgba(224,83,83,.05)}.wpeo-notice.notice-error::before{content:""}.wpeo-notice.notice-error .notice-title,.wpeo-notice.notice-error .notice-subtitle,.wpeo-notice.notice-error a{color:#e05353}.wpeo-notice.notice-warning{border-left:solid #e9ad4f 6px;color:#e9ad4f;background:rgba(233,173,79,.05)}.wpeo-notice.notice-warning::before{content:""}.wpeo-notice.notice-warning .notice-title,.wpeo-notice.notice-warning .notice-subtitle,.wpeo-notice.notice-warning a{color:#e9ad4f}.wpeo-notice.notice-warning.notice-red{border-left:solid #e05353 6px;color:#e05353;background:rgba(224,83,83,.05)}.wpeo-notice.notice-warning.notice-red::before{content:""}.wpeo-notice.notice-warning.notice-red .notice-title,.wpeo-notice.notice-warning.notice-red .notice-subtitle,.wpeo-notice.notice-warning.notice-red a{color:#e05353;font-size:18px}.wpeo-notice.notice-success{border-left:solid #47e58e 6px;color:#47e58e;background:rgba(71,229,142,.05)}.wpeo-notice.notice-success::before{content:""}.wpeo-notice.notice-success .notice-title,.wpeo-notice.notice-success .notice-subtitle,.wpeo-notice.notice-success a{color:#47e58e}.wpeo-form input,.wpeo-form textarea,.wpeo-form select{border:1px solid rgba(0,0,0,.2);font-size:14px;background:rgba(0,0,0,0);padding:0;margin:0;width:100%;padding:1em .5em;box-shadow:none}.wpeo-form input:focus,.wpeo-form input:active,.wpeo-form textarea:focus,.wpeo-form textarea:active,.wpeo-form select:focus,.wpeo-form select:active{outline:none;box-shadow:none}.wpeo-form select{padding:1em 0}.wpeo-form input[type=submit]{width:auto}.wpeo-form .group-date .mysql-date{display:none}.wpeo-form .wpeo-dropdown{display:block;width:100%}.wpeo-form .wpeo-dropdown .dropdown-toggle{width:100%;display:block;transition:all .2s ease-out;border:0;font-size:14px;padding:1em 2em 1em 1em;margin:0}.wpeo-form .wpeo-dropdown .dropdown-toggle:hover{cursor:pointer}.wpeo-form .wpeo-dropdown .dropdown-toggle>.svg-inline--fa{position:absolute;right:1em;top:50%;transform:translateY(-50%)}.wpeo-form .form-element.disable .dropdown-toggle>.svg-inline--fa{display:none}.wpeo-form .wpeo-autocomplete{display:block;width:100%}.wpeo-form .wpeo-autocomplete .autocomplete-label{box-shadow:none;padding:.74em 1em}.wpeo-form.form-light .wpeo-autocomplete .autocomplete-label{background:#fff}.wpeo-form.form-light .wpeo-autocomplete .autocomplete-label:hover{background:#ececec}.wpeo-form .form-element input[type=radio].form-field{display:inline-block;width:auto}.wpeo-form .form-element input[type=radio].form-field{appearance:none;border-radius:50%;width:16px;height:16px;padding:0;border:0;background:rgba(0,0,0,0) !important;border:1px solid rgba(0,0,0,.4);transition:.2s all linear;outline:none;position:relative;top:2px}.wpeo-form .form-element input[type=radio].form-field::before{display:none !important;content:"" !important}.wpeo-form .form-element input[type=radio].form-field:hover{cursor:pointer;border:1px solid #0d8aff;box-shadow:0 0 0 1px #0d8aff inset;background:rgba(0,0,0,0) !important}.wpeo-form .form-element input[type=radio].form-field:checked{border:1px solid #0d8aff;box-shadow:0 0 0 4px #0d8aff inset}.wpeo-form .form-element input[type=radio].form-field+label{text-transform:none;font-weight:400;font-size:14px;display:inline-block;margin-right:1em}.wpeo-form .form-element input[type=radio].form-field+label:hover{cursor:pointer}.wpeo-form .form-element input[type=radio].form-field+label:active{outline:none}.wpeo-form .form-element input[type=checkbox].form-field{display:inline-block;width:auto}.wpeo-form .form-element input[type=checkbox].form-field{width:auto;visibility:hidden;display:none}.wpeo-form .form-element input[type=checkbox].form-field+label{text-transform:none;font-weight:400;font-size:14px;display:inline-block;margin-right:1em;position:relative}.wpeo-form .form-element input[type=checkbox].form-field+label:hover{cursor:pointer}.wpeo-form .form-element input[type=checkbox].form-field+label:active{outline:none}.wpeo-form .form-element input[type=checkbox].form-field+label::before{display:inline-block;content:"";width:14px;height:14px;background:rgba(0,0,0,0);box-shadow:0 0 0 1px rgba(0,0,0,.4);border:2px solid #fff;transition:all .2s ease-out;margin-right:.6em}.wpeo-form .form-element input[type=checkbox].form-field:not(:checked)+label:hover::before{box-shadow:0 0 0 2px #0d8aff}.wpeo-form .form-element input[type=checkbox].form-field:checked+label::before{box-shadow:0 0 0 2px #0d8aff;background:#0d8aff}.wpeo-form .form-element{width:100%}.wpeo-form .form-element .form-label{display:block;font-size:14px;font-weight:600;margin:.6em 0;color:rgba(0,0,0,.9)}.wpeo-form .form-element .form-field-container{display:flex;flex-flow:row wrap;flex:0 1 auto;flex-wrap:nowrap}.wpeo-form .form-element .form-field-container:hover{box-shadow:none}.wpeo-form .form-element .form-field{transition:all .2s ease-out;border-radius:0}.wpeo-form .form-element .form-field:hover{box-shadow:none}.wpeo-form .form-element .form-sublabel{font-size:12px;font-style:italic;color:rgba(0,0,0,.6)}.wpeo-form .form-element .form-field-inline{margin-right:.4em}.wpeo-form .form-element.form-align-vertical .form-field-container{flex-direction:column}.wpeo-form .form-element.form-align-horizontal .form-field-container{flex-wrap:wrap}.wpeo-form .form-element .form-field-container .form-field,.wpeo-form .form-element .form-field-container [class*=form-field-icon]{background:#ececec}.wpeo-form .form-element .form-field-container:hover .form-field,.wpeo-form .form-element .form-field-container:hover [class*=form-field-icon]{background:#dfdfdf}.wpeo-form .form-element [class*=form-field-label]{background:#dfdfdf}.wpeo-form.form-light .form-element .form-field-container .form-field,.wpeo-form.form-light .form-element .form-field-container [class*=form-field-icon]{background:#fff}.wpeo-form.form-light .form-element .form-field-container:hover .form-field,.wpeo-form.form-light .form-element .form-field-container:hover [class*=form-field-icon]{background:#ececec}.wpeo-form.form-light .form-element [class*=form-field-label]{background:#ececec}.wpeo-form .form-element [class*=form-field-icon]{padding:.8em 0 .8em .8em;color:rgba(0,0,0,.4);font-size:16px;transition:all .2s ease-out}.wpeo-form .form-element [class*=form-field-icon] [class*=fa]{vertical-align:middle}.wpeo-form .form-element .form-field-icon-prev{padding:.8em 0 .8em .8em}.wpeo-form .form-element .form-field-icon-next{padding:.8em .8em .8em 0}.wpeo-form .form-element [class*=form-field-label]{padding:1.2em 1em;font-size:12px}.wpeo-form .form-element .form-field-label-prev{border-right:1px solid rgba(0,0,0,.1)}.wpeo-form .form-element .form-field-label-next{border-left:1px solid rgba(0,0,0,.1)}.wpeo-form .form-element.form-element-required .form-label::after{display:inline-block;content:"*";color:#e05353;padding:0 .4em}.wpeo-form .form-element.form-element-error .form-field-container{border:1px solid #e05353}.wpeo-form .form-element.form-element-disable .form-field-container{opacity:.6;pointer-events:none}.wpeo-pagination{display:flex;flex-flow:row wrap;flex:0 1 auto;margin:0;padding:0}.wpeo-pagination .pagination-element{margin:0;list-style-type:none;padding:0 .2em}.wpeo-pagination .pagination-element a{padding:.2em .8em;display:inline-block;background:#fff;border-radius:4px;text-decoration:none;color:rgba(0,0,0,.8);font-size:12px}.wpeo-pagination .pagination-element a:hover{background:rgba(0,0,0,.1)}.wpeo-pagination .pagination-element .pagination-icon{font-size:12px}.wpeo-pagination .pagination-element.pagination-current a{background:#0d8aff;color:#fff}.wpeo-pagination .pagination-element.pagination-current a:hover{background:#0d8aff}.wpeo-pagination .pagination-element.pagination-prev,.wpeo-pagination .pagination-element.pagination-next{font-weight:700}.wpeo-pagination .pagination-element.pagination-prev a,.wpeo-pagination .pagination-element.pagination-next a{background:rgba(0,0,0,.05)}.wpeo-pagination .pagination-element.pagination-prev a:hover,.wpeo-pagination .pagination-element.pagination-next a:hover{background:rgba(0,0,0,.15)}.wpeo-pagination .pagination-element.pagination-prev .pagination-icon{margin-right:.4em}.wpeo-pagination .pagination-element.pagination-next .pagination-icon{margin-left:.4em}div.wpeo-modal-patchnote .modal-header{background-color:#fff;border-bottom:solid #ccc 1px}div.wpeo-modal-patchnote .modal-container{max-width:80%;max-height:80%;background-color:#e9eaed;border-radius:25px}div.wpeo-modal-patchnote .modal-container li{list-style-type:circle;margin-left:55px}div.wpeo-modal-patchnote .modal-container ul{line-height:30px}div.wpeo-modal-patchnote .modal-container code{padding:3px 5px;border-radius:6px;background-color:#fafafa}div.wpeo-modal-patchnote .modal-content img{width:100%;box-shadow:5px 5px 18px rgba(0,0,0,.2);margin-bottom:28px}div.wpeo-modal-patchnote .modal-content h3{margin-left:30px;color:#666;font-size:17px}div.wpeo-modal-patchnote .modal-title{color:#0a1464}div.wpeo-modal-patchnote .wpeo-button{background-color:#ccc}.media-container{position:relative}.media-container .media-gallery-unlink,.media-container .media-gallery-favorite{width:30px !important;height:30px !important;line-height:30px !important;border:0;font-size:14px;background:#cbcbcb !important;color:rgba(0,0,0,.4) !important;text-align:center;position:absolute;top:-10px;right:-10px;border-radius:50%;z-index:10}.media-container .media-gallery-unlink .button-icon,.media-container .media-gallery-favorite .button-icon{line-height:30px !important}.media-container .media-gallery-favorite{top:auto;bottom:-10px}.media-container .media-gallery-favorite.favorite{background:orange !important;color:#fff !important}.wpeo-modal.modal-photo .modal-container{max-height:650px}.wpeo-modal.modal-photo .clickable-photo{transition:all .2s ease-out;width:100%}.wpeo-modal.modal-photo .clickable-photo:hover{cursor:pointer}.wpeo-modal.modal-photo .clickable-photo:hover .photo-image .photo{opacity:.8}.wpeo-modal.modal-photo .clickable-photo.clicked-photo .photo-image{border:5px solid #0d8aff}.wpeo-modal.modal-photo .clickable-photo.clicked-photo .title{color:#0d8aff}.wpeo-modal.modal-photo .clickable-photo .photo-image{position:relative;width:100%;max-width:120px;height:120px;margin:auto;border:5px solid #fff}.wpeo-modal.modal-photo .clickable-photo .photo-image .photo{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;max-width:none !important;transition:all .2s ease-out}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview{position:absolute;display:inline-block;top:1em;right:1em;z-index:900;width:25px;height:25px;line-height:25px;background:#fff;border-radius:50%;color:#0d8aff;transition:all .2s ease-out}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview:hover{transform:scale(1.1)}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview i{line-height:25px;font-size:14px}.wpeo-modal.modal-photo .clickable-photo .title{word-break:break-all}.wpeo-modal.modal-photo .formattachnewfile{padding-bottom:.5em}.wpeo-modal.modal-photo input[type=file]{border-bottom:0 !important}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label{width:100%;display:flex;border-bottom:1px solid var(--colortopbordertitle1)}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-icon-before{margin:auto 0}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-search-input{width:100%;border-bottom:0;padding:5px}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-search-input:focus{border-bottom:0 !important}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label input:focus:not(.button):not(.select2-search__field):not(#top-bookmark-search-input){border-bottom:0 !important}.photo{border-radius:5px}#progressBarContainer{width:100%;background-color:gray}#progressBar{width:1%;height:30px;background-color:green}.pictoModule{vertical-align:middle;text-align:left;width:20px;padding-right:4px}.color-circle{height:25px;width:25px;border-radius:50%;display:inline-block}.signature-container{max-width:800px;background:#fff;box-shadow:0 0 40px 0 rgba(0,0,0,.1);margin:1.5em auto 0 auto;padding:2em;box-sizing:border-box}.signature-container *{box-sizing:border-box}.signature-container .signature .signature-element .wpeo-button.modal-signature-open{display:none}.signature-container .signature .signature-element img{width:100%;height:auto;border:1px solid rgba(0,0,0,.4) !important}@media all and (orientation: portrait){.signature-container .signature .signature-element .modal-container .modal-content{height:78% !important}.signature-container .signature .signature-element .modal-container .modal-footer .wpeo-button{font-size:14px !important}}.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable.ui-resizable.preview-photo{z-index:2100 !important}.dropdown-toggle::after{display:none}.favorite-photo{border:5px solid #0d8aff}tr.liste_titre th.liste_titre:not(.maxwidthsearch),tr.liste_titre td.liste_titre:not(.maxwidthsearch){opacity:1}@media only screen and (max-width: 1600px){div.fichecenter{width:100%;clear:both}div.fichecenterbis{margin-top:8px}div.fichethirdleft{float:none;width:auto;padding-bottom:6px}div.fichetwothirdright{float:none;width:auto;padding-bottom:6px}div.fichehalfleft{float:none;width:auto}div.fichehalfright{float:none;width:auto}div.fichehalfright{margin-top:10px}div.firstcolumn div.box{padding-right:0px}div.secondcolumn div.box{padding-left:0px}} \ No newline at end of file +.box-flex-item .info-box{display:flex;flex-wrap:nowrap}.box-flex-item .info-box .info-box-icon{height:auto !important;border-radius:0 0 0 15px}.box-flex-item .info-box .info-box-content{margin-left:0 !important}.box-flex-item .info-box-icon{display:flex}.box-flex-item .info-box-icon img,.box-flex-item .info-box-icon i{margin:auto}.box-flex-item .close-dashboard-info,.box-flex-item .close-dashboard-widget{width:20px;height:20px;line-height:20px;text-align:center;border-radius:50%;background:#e3e3e3;transition:all .2s ease-out;position:absolute;top:-5px;right:-5px}.box-flex-item .close-dashboard-info:hover,.box-flex-item .close-dashboard-widget:hover{cursor:pointer;background:#e05353;color:#fff;transform:scale(1.2)}.box-flex-item .close-dashboard-info>[class*=fa],.box-flex-item .close-dashboard-widget>[class*=fa]{display:inline-block;line-height:20px}.gallery-table .linked-medias-list{display:flex;gap:10px;height:auto !important}@media(max-width: 500px){.gallery-table .linked-medias-list{flex-wrap:wrap}}@media(max-width: 500px){div.tabBar table.border.gallery-table tr.linked-medias,div.tabBar table.border.gallery-table tr.linked-medias .linked-medias-list{height:auto !important}}.wpeo-dropdown{position:relative;display:inline-block}.wpeo-dropdown .dropdown-toggle{display:inline-block}.wpeo-dropdown .dropdown-toggle span~*[class*=icon]{margin-left:10px}.wpeo-dropdown .saturne-dropdown-content{opacity:0;pointer-events:none;transform:translateY(-10px);transition:all .2s ease-out;position:absolute;background:#fff;z-index:99;border:1px solid rgba(0,0,0,.1);box-shadow:0 0 10px 0px rgba(0,0,0,.3);width:220px;padding:.6em}.wpeo-dropdown.dropdown-active .saturne-dropdown-content{opacity:1;pointer-events:auto;transform:translateY(0)}.wpeo-dropdown ul,.wpeo-dropdown li{margin:0;list-style-type:none;padding:0}.wpeo-dropdown .dropdown-item{display:block;color:rgba(0,0,0,.7);text-decoration:none}.wpeo-dropdown .dropdown-item::before{display:none;content:""}.wpeo-dropdown .dropdown-item .dropdown-result-title,.wpeo-dropdown .dropdown-item .dropdown-result-subtitle{display:block}.wpeo-dropdown .dropdown-item .dropdown-result-title{font-size:14px}.wpeo-dropdown .dropdown-item .dropdown-result-subtitle{font-size:12px;color:rgba(0,0,0,.5)}.wpeo-dropdown.dropdown-small .saturne-dropdown-content{width:60px}.wpeo-dropdown.dropdown-medium .saturne-dropdown-content{width:220px}.wpeo-dropdown.dropdown-large .saturne-dropdown-content{width:360px}.wpeo-dropdown.dropdown-padding-0 .saturne-dropdown-content{padding:0}.wpeo-dropdown.dropdown-padding-1 .saturne-dropdown-content{padding:.6em}.wpeo-dropdown.dropdown-padding-2 .saturne-dropdown-content{padding:1.2em}.wpeo-dropdown.dropdown-left .saturne-dropdown-content{left:0}.wpeo-dropdown.dropdown-right .saturne-dropdown-content{right:0}.wpeo-dropdown.dropdown-horizontal.dropdown-left .saturne-dropdown-content{left:100%}.wpeo-dropdown.dropdown-horizontal.dropdown-right .saturne-dropdown-content{right:100%}.wpeo-dropdown.dropdown-horizontal .saturne-dropdown-content{top:0;width:auto !important;display:flex;flex-wrap:nowrap;flex-direction:row}.wpeo-dropdown .dropdown-item.dropdown-item-disable{opacity:.6;cursor:default !important;pointer-events:none}.wpeo-dropdown .saturne-dropdown-content .dropdown-item{padding:.6em;background:#fff;transition:all .2s ease-out}.wpeo-dropdown .saturne-dropdown-content .dropdown-item:hover{cursor:pointer;background:rgba(0,0,0,.1)}.wpeo-dropdown.dropdown-list .saturne-dropdown-content{text-align:left}.wpeo-dropdown.dropdown-list .dropdown-item::after{display:block;content:"";clear:both}.wpeo-dropdown.dropdown-list .dropdown-item img{float:left;margin-right:.4em}.wpeo-dropdown.dropdown-grid .dropdown-item img{width:100%;height:auto;display:block;margin:0}.wpeo-button{display:inline-block;border:0;box-shadow:none;background:none;text-decoration:none;padding:6px 14px;line-height:1.4;vertical-align:middle;height:auto;border-radius:0;transition:all .2s ease-out;position:relative;border-width:3px;border-style:solid;font-size:16px;box-sizing:border-box;border-radius:5px;background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button:focus,.wpeo-button:visited{color:#fff}.wpeo-button:hover{color:#fff;box-shadow:inset 0 -2.6em rgba(255,255,255,.25);cursor:pointer;text-decoration:none}.wpeo-button:focus,.wpeo-button:active{outline:none}.wpeo-button{background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button.button-main{background:#0d8aff;border-color:#0d8aff;color:#fff}.wpeo-button.button-secondary{background:#263c5c;border-color:#263c5c;color:#fff}.wpeo-button.button-light{background:#fff;border-color:#fff;color:#333}.wpeo-button.button-light:hover{box-shadow:inset 0 -2.6em rgba(0,0,0,.1);color:#333}.wpeo-button.button-dark{background:#2b2b2b;border-color:#2b2b2b}.wpeo-button.button-grey{background:#ececec;border-color:#ececec;color:#333}.wpeo-button.button-grey:hover{box-shadow:inset 0 -2.6em rgba(0,0,0,.1);color:#333}.wpeo-button.button-red{background:#e05353;border-color:#e05353}.wpeo-button.button-yellow{background:#e9ad4f;border-color:#e9ad4f}.wpeo-button.button-blue{background:#0d8aff;border-color:#0d8aff}.wpeo-button.button-green{background:#47e58e;border-color:#47e58e}.wpeo-button.button-orange{background:#ff6900;border-color:#ff6900}.wpeo-button.button-transparent{background:rgba(0,0,0,0);border-color:rgba(0,0,0,0);color:rgba(51,51,51,.4)}.wpeo-button.button-transparent:hover{color:#333;box-shadow:inset 0 -2.6em rgba(255,255,255,0)}.wpeo-button.button-bordered{background:none;border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-main{border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-main:hover{box-shadow:inset 0 -2.6em #0d8aff;color:#fff}.wpeo-button.button-bordered.button-light{border-color:#fff;color:#fff}.wpeo-button.button-bordered.button-light:hover{box-shadow:inset 0 -2.6em #fff;color:#333}.wpeo-button.button-bordered.button-dark{border-color:#2b2b2b;color:#2b2b2b}.wpeo-button.button-bordered.button-dark:hover{box-shadow:inset 0 -2.6em #2b2b2b}.wpeo-button.button-bordered.button-grey{border-color:#ececec;color:#a0a0a0}.wpeo-button.button-bordered.button-grey:hover{box-shadow:inset 0 -2.6em #ececec;color:#333}.wpeo-button.button-bordered.button-red{border-color:#e05353;color:#e05353}.wpeo-button.button-bordered.button-red:hover{box-shadow:inset 0 -2.6em #e05353}.wpeo-button.button-bordered.button-yellow{border-color:#e9ad4f;color:#e9ad4f}.wpeo-button.button-bordered.button-yellow:hover{box-shadow:inset 0 -2.6em #e9ad4f}.wpeo-button.button-bordered.button-blue{border-color:#0d8aff;color:#0d8aff}.wpeo-button.button-bordered.button-blue:hover{box-shadow:inset 0 -2.6em #0d8aff}.wpeo-button.button-bordered.button-green{border-color:#47e58e;color:#47e58e}.wpeo-button.button-bordered.button-green:hover{box-shadow:inset 0 -2.6em #47e58e}.wpeo-button.button-bordered:hover{box-shadow:inset 0 -2.6em #0d8aff;color:#fff}.wpeo-button .button-add{position:absolute;top:.4em;right:.2em;opacity:.6;font-size:14px;transition:all .2s ease-out}.wpeo-button:hover .button-add{opacity:.8}.wpeo-button.button-square-40 .button-add{top:.1em;right:0}.wpeo-button .button-icon,.wpeo-button span{position:relative}.wpeo-button .button-icon~span{margin-left:10px}.wpeo-button span~.button-icon{margin-left:10px}.wpeo-button.button-strong span{font-weight:800}.wpeo-button.button-uppercase span{text-transform:uppercase;font-size:14px}.wpeo-button[class*=button-square-]{text-align:center;overflow:hidden;padding:0}.wpeo-button.button-square-30{width:30px;height:30px;line-height:24px}.wpeo-button.button-square-30 .button-icon{font-size:12px;line-height:24px}.wpeo-button.button-square-40{width:40px;height:40px;line-height:34px}.wpeo-button.button-square-40 .button-icon{line-height:34px}.wpeo-button.button-square-50{width:50px;height:50px;line-height:44px}.wpeo-button.button-square-50 .button-icon{line-height:44px}.wpeo-button.button-square-60{width:60px;height:60px;line-height:54px}.wpeo-button.button-square-60 .button-icon{line-height:54px}.wpeo-button.button-float-left{float:left}.wpeo-button.button-float-right{float:right}.wpeo-button.button-margin{margin:1em 0}.wpeo-button.button-radius-1{border-radius:2px}.wpeo-button.button-radius-2{border-radius:4px}.wpeo-button.button-radius-3{border-radius:6px}.wpeo-button.button-rounded{border-radius:50%}.wpeo-button.button-disable{background:#ececec !important;border-color:#ececec !important;color:rgba(0,0,0,.4) !important;pointer-events:none}.wpeo-button.button-disable:hover{box-shadow:none !important}.wpeo-button.button-disable.button-event{pointer-events:all}.wpeo-button.button-size-small{font-size:14px}.wpeo-button.button-size-small.button-uppercase span{font-size:12px}.wpeo-button.button-size-large{font-size:18px}.wpeo-button.button-size-large.button-uppercase span{font-size:16px}.card__confirmation{position:fixed;width:100%;height:100%;top:0;left:0;background:rgba(0,0,0,.2);z-index:999;display:flex}.card__confirmation .confirmation-container{display:block;width:100%;max-width:460px;background:#fff;margin:auto;box-shadow:0 0 40px 0 rgba(0,0,0,.1);padding:3em 1.5em;text-align:center}.card__confirmation .confirmation-container .confirmation-icon{font-size:70px}.card__confirmation .confirmation-container .confirmation-title{font-size:20px;font-weight:600;margin:1em 0}.wpeo-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:rgba(39,42,53,.9);opacity:0;pointer-events:none;transition:all .2s ease-out}.wpeo-modal textarea{resize:none}.wpeo-modal.modal-active{opacity:1;pointer-events:auto;z-index:1002}.wpeo-modal.modal-active .modal-container{transform:translate(-50%, -50%);border-radius:10px}.wpeo-modal.modal-active textarea{resize:both}.wpeo-modal.modal-active .modal-active{z-index:1003}.wpeo-modal.modal-active .modal-active .modal-active{z-index:1004}.wpeo-modal.modal-force-display .modal-close{display:none}.wpeo-modal .modal-container{position:absolute;transition:all .2s ease-out;width:100%;max-width:860px;height:100%;max-height:560px;background:#fff;padding:1em 0;margin:auto;top:50%;left:50%;transform:translate(-50%, -60%)}@media(max-width: 700px){.wpeo-modal .modal-container{padding:1em}}.wpeo-modal .modal-container .modal-header{height:10%;display:flex;padding:0 2em}.wpeo-modal .modal-container .modal-content{height:78%;padding:0 2em}.wpeo-modal .modal-container .modal-footer{height:12%;padding:0 2em}.wpeo-modal .modal-container .modal-header .modal-title,.wpeo-modal .modal-container .modal-header .modal-close{margin:auto 0}.wpeo-modal .modal-container .modal-header .modal-title{text-transform:uppercase;font-size:18px;white-space:normal}@media(max-width: 1000px){.wpeo-modal .modal-container .modal-header .modal-title{font-size:16px}}@media(max-width: 700px){.wpeo-modal .modal-container .modal-header .modal-title{font-size:14px}}.wpeo-modal .modal-container .modal-header .modal-close{margin-left:auto;color:rgba(0,0,0,.3);padding:4px;transition:all .2s ease-out}.wpeo-modal .modal-container .modal-header .modal-close:hover{cursor:pointer;color:#0d8aff}.wpeo-modal .modal-container .modal-content{overflow-y:auto;font-size:14px}@media(max-width: 700px){.wpeo-modal .modal-container .modal-content{font-size:12px}}.wpeo-modal .modal-container .modal-footer{text-align:right;padding-top:1em}.wpeo-modal .modal-container .modal-footer.left{text-align:left}.wpeo-modal .modal-container .modal-footer.center{text-align:center}.wpeo-loader{transition:all .2s ease-out;pointer-events:none;opacity:.5;position:relative}.wpeo-loader .loader-spin{position:absolute;border:3px solid #a7a7a7;border-top:3px solid #002140;border-radius:50%;width:20px;height:20px;z-index:99;left:50%;top:50%;margin:0 !important;padding:0 !important;animation:loader-spin 1s ease-out infinite}@keyframes loader-spin{0%{transform:translate(-50%, -50%) rotate(0deg)}100%{transform:translate(-50%, -50%) rotate(360deg)}}.wpeo-grid{display:flex;flex-flow:row wrap;flex:0 1 auto;margin-left:-0.5em;margin-right:-0.5em;width:100%}.wpeo-grid *{box-sizing:border-box}.wpeo-grid>*{padding:.5em !important}.wpeo-grid.grid-1>*{width:100%}.wpeo-grid.grid-1>.grid-1{width:100%}.wpeo-grid.grid-2>*{width:50%}.wpeo-grid.grid-2>.grid-1{width:50%}.wpeo-grid.grid-2>.grid-2{width:100%}.wpeo-grid.grid-3>*{width:33.3333333333%}.wpeo-grid.grid-3>.grid-1{width:33.3333333333%}.wpeo-grid.grid-3>.grid-2{width:66.6666666667%}.wpeo-grid.grid-3>.grid-3{width:100%}.wpeo-grid.grid-4>*{width:25%}.wpeo-grid.grid-4>.grid-1{width:25%}.wpeo-grid.grid-4>.grid-2{width:50%}.wpeo-grid.grid-4>.grid-3{width:75%}.wpeo-grid.grid-4>.grid-4{width:100%}.wpeo-grid.grid-5>*{width:20%}.wpeo-grid.grid-5>.grid-1{width:20%}.wpeo-grid.grid-5>.grid-2{width:40%}.wpeo-grid.grid-5>.grid-3{width:60%}.wpeo-grid.grid-5>.grid-4{width:80%}.wpeo-grid.grid-5>.grid-5{width:100%}.wpeo-grid.grid-6>*{width:16.6666666667%}.wpeo-grid.grid-6>.grid-1{width:16.6666666667%}.wpeo-grid.grid-6>.grid-2{width:33.3333333333%}.wpeo-grid.grid-6>.grid-3{width:50%}.wpeo-grid.grid-6>.grid-4{width:66.6666666667%}.wpeo-grid.grid-6>.grid-5{width:83.3333333333%}.wpeo-grid.grid-6>.grid-6{width:100%}@media(max-width: 1000px){.wpeo-grid:not(.grid-no-responsive).grid-1>*{width:100%}.wpeo-grid:not(.grid-no-responsive).grid-2>*,.wpeo-grid:not(.grid-no-responsive).grid-3>*,.wpeo-grid:not(.grid-no-responsive).grid-4>*,.wpeo-grid:not(.grid-no-responsive).grid-5>*,.wpeo-grid:not(.grid-no-responsive).grid-6>*{width:50%}}@media(max-width: 700px){.wpeo-grid:not(.grid-no-responsive).grid-1>*,.wpeo-grid:not(.grid-no-responsive).grid-2>*,.wpeo-grid:not(.grid-no-responsive).grid-3>*,.wpeo-grid:not(.grid-no-responsive).grid-4>*,.wpeo-grid:not(.grid-no-responsive).grid-5>*,.wpeo-grid:not(.grid-no-responsive).grid-6>*{width:100%}}.wpeo-grid.grid-padding-0{margin-left:0;margin-right:0}.wpeo-grid.grid-padding-0>*{padding:0 !important}.wpeo-grid.grid-padding-1{margin-left:-0.2em;margin-right:-0.2em}.wpeo-grid.grid-padding-1>*{padding:.2em !important}.wpeo-grid.grid-padding-2{margin-left:-0.5em;margin-right:-0.5em}.wpeo-grid.grid-padding-2>*{padding:.5em !important}.wpeo-grid.grid-padding-3{margin-left:-1em;margin-right:-1em}.wpeo-grid.grid-padding-3>*{padding:1em !important}.wpeo-gridlayout{display:grid;grid-gap:1em 1em;grid-template-columns:repeat(4, 1fr)}.wpeo-gridlayout.grid-1{grid-template-columns:repeat(1, 1fr)}.wpeo-gridlayout.grid-1>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-2{grid-template-columns:repeat(2, 1fr)}.wpeo-gridlayout.grid-2>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-2>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-2>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-3{grid-template-columns:repeat(3, 1fr)}.wpeo-gridlayout.grid-3>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-3>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-3>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-3>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-3>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4{grid-template-columns:repeat(4, 1fr)}.wpeo-gridlayout.grid-4>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-4>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-4>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-4>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5{grid-template-columns:repeat(5, 1fr)}.wpeo-gridlayout.grid-5>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-5>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-5>.gridw-5{grid-column:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout.grid-5>.gridw-5{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6{grid-template-columns:repeat(6, 1fr)}.wpeo-gridlayout.grid-6>.gridw-1{grid-column:auto/span 1}.wpeo-gridlayout.grid-6>.gridw-2{grid-column:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-2{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-3{grid-column:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-3{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-4{grid-column:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-4{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-5{grid-column:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-5{grid-column:auto/span 2}}.wpeo-gridlayout.grid-6>.gridw-6{grid-column:auto/span 6}@media(max-width: 1000px){.wpeo-gridlayout.grid-6>.gridw-6{grid-column:auto/span 2}}.wpeo-gridlayout>.gridh-1{grid-row:auto/span 1}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-1{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-2{grid-row:auto/span 2}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-2{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-3{grid-row:auto/span 3}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-3{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-4{grid-row:auto/span 4}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-4{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-5{grid-row:auto/span 5}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-5{grid-row:auto/span 1 !important}}.wpeo-gridlayout>.gridh-6{grid-row:auto/span 6}@media(max-width: 1000px){.wpeo-gridlayout>.gridh-6{grid-row:auto/span 1 !important}}.wpeo-gridlayout.grid-margin-0{margin:0em 0}.wpeo-gridlayout.grid-margin-1{margin:1em 0}.wpeo-gridlayout.grid-margin-2{margin:2em 0}.wpeo-gridlayout.grid-margin-3{margin:3em 0}.wpeo-gridlayout.grid-margin-4{margin:4em 0}.wpeo-gridlayout.grid-margin-5{margin:5em 0}.wpeo-gridlayout.grid-margin-6{margin:6em 0}.wpeo-gridlayout.grid-gap-0{grid-gap:0em 0em}.wpeo-gridlayout.grid-gap-1{grid-gap:1em 1em}.wpeo-gridlayout.grid-gap-2{grid-gap:2em 2em}.wpeo-gridlayout.grid-gap-3{grid-gap:3em 3em}.wpeo-gridlayout.grid-gap-4{grid-gap:4em 4em}.wpeo-gridlayout.grid-gap-5{grid-gap:5em 5em}.wpeo-gridlayout.grid-gap-6{grid-gap:6em 6em}.wpeo-gridlayout .grid-align-center{margin-left:auto;margin-right:auto}.wpeo-gridlayout .grid-align-right{margin-left:auto}.wpeo-gridlayout .grid-align-middle{margin-top:auto;margin-bottom:auto}.wpeo-gridlayout .grid-align-bottom{margin-top:auto}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-2{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-3{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-3{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-4{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-4{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-5{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-5{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 1000px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-6{grid-template-columns:repeat(2, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content).grid-6{grid-template-columns:repeat(1, 1fr) !important}}@media(max-width: 700px){.wpeo-gridlayout:not(.saturne-dropdown-content)>*{grid-column:auto/span 1 !important}}.wpeo-table.table-flex{display:flex;flex-direction:column;font-size:14px}.wpeo-table.table-flex .table-row{display:flex;flex-wrap:nowrap;flex-direction:row}.wpeo-table.table-flex .table-row:not(.table-header):nth-of-type(odd){background:rgba(0,0,0,.05)}.wpeo-table.table-flex .table-row.table-header{background:#263c5c}.wpeo-table.table-flex .table-row.table-header .table-cell{font-weight:700;color:#fff}.wpeo-table.table-flex .table-cell{margin:auto 0;width:100%;padding:.8em .6em}@media(max-width: 1000px){.wpeo-table.table-flex .table-cell{padding:.4em}}.wpeo-table.table-flex.table-1 .table-cell{width:100%}.wpeo-table.table-flex.table-2 .table-cell{width:50%}.wpeo-table.table-flex.table-3 .table-cell{width:33.3333333333%}.wpeo-table.table-flex.table-4 .table-cell{width:25%}.wpeo-table.table-flex.table-5 .table-cell{width:20%}.wpeo-table.table-flex.table-6 .table-cell{width:16.6666666667%}.wpeo-table.table-flex.table-7 .table-cell{width:14.2857142857%}.wpeo-table.table-flex.table-8 .table-cell{width:12.5%}.wpeo-table.table-flex.table-9 .table-cell{width:11.1111111111%}.wpeo-table.table-flex.table-10 .table-cell{width:10%}.wpeo-table.table-flex .table-cell.table-25{max-width:25px;min-width:25px}.wpeo-table.table-flex .table-cell.table-50{max-width:50px;min-width:50px}.wpeo-table.table-flex .table-cell.table-75{max-width:75px;min-width:75px}.wpeo-table.table-flex .table-cell.table-100{max-width:100px;min-width:100px}.wpeo-table.table-flex .table-cell.table-125{max-width:125px;min-width:125px}.wpeo-table.table-flex .table-cell.table-150{max-width:150px;min-width:150px}.wpeo-table.table-flex .table-cell.table-175{max-width:175px;min-width:175px}.wpeo-table.table-flex .table-cell.table-200{max-width:200px;min-width:200px}.wpeo-table.table-flex .table-cell.table-225{max-width:225px;min-width:225px}.wpeo-table.table-flex .table-cell.table-250{max-width:250px;min-width:250px}.wpeo-table.table-flex .table-cell.table-275{max-width:275px;min-width:275px}.wpeo-table.table-flex .table-cell.table-300{max-width:300px;min-width:300px}.wpeo-table.table-flex .table-cell.table-325{max-width:325px;min-width:325px}.wpeo-table.table-flex .table-cell.table-350{max-width:350px;min-width:350px}.wpeo-table.table-flex .table-cell.table-375{max-width:375px;min-width:375px}.wpeo-table.table-flex .table-cell.table-400{max-width:400px;min-width:400px}.wpeo-table.table-flex .table-cell.table-425{max-width:425px;min-width:425px}.wpeo-table.table-flex .table-cell.table-450{max-width:450px;min-width:450px}.wpeo-table.table-flex .table-cell.table-475{max-width:475px;min-width:475px}.wpeo-table.table-flex .table-cell.table-500{max-width:500px;min-width:500px}.wpeo-table.table-flex .table-cell.table-full{width:100%}.wpeo-table.table-flex .table-cell.table-end{text-align:right;margin-left:auto}.wpeo-table.table-flex .table-cell.table-padding-0{padding:0}@media(max-width: 700px){.wpeo-table.table-flex .table-row{flex-direction:column}.wpeo-table.table-flex .table-cell{width:100% !important;min-width:unset !important}}.wpeo-tooltip{display:block;position:absolute;bottom:0;left:0;opacity:0;pointer-events:none;z-index:99999;white-space:nowrap;background:#2b2b2b;color:#fff;border-radius:6px;font-size:.8rem;padding:0 1em;height:2.2em;line-height:2.2em}.wpeo-tooltip::before{display:block;content:"";width:0;height:0;border-style:solid;position:absolute}.wpeo-tooltip:focus{outline:none}.wpeo-tooltip.tooltip-dark{background:#2b2b2b}.wpeo-tooltip.tooltip-dark.tooltip-top::before{border-color:#2b2b2b rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-right::before{border-color:rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0)}.wpeo-tooltip.tooltip-dark.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b}.wpeo-tooltip.tooltip-primary{background:#0d8aff}.wpeo-tooltip.tooltip-primary.tooltip-top::before{border-color:#0d8aff rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-right::before{border-color:rgba(0,0,0,0) #0d8aff rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #0d8aff rgba(0,0,0,0)}.wpeo-tooltip.tooltip-primary.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #0d8aff}.wpeo-tooltip.tooltip-light{background:#ececec;color:rgba(0,0,0,.6)}.wpeo-tooltip.tooltip-light.tooltip-top::before{border-color:#ececec rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-right::before{border-color:rgba(0,0,0,0) #ececec rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #ececec rgba(0,0,0,0)}.wpeo-tooltip.tooltip-light.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #ececec}.wpeo-tooltip.tooltip-red{background:#e05353}.wpeo-tooltip.tooltip-red.tooltip-top::before{border-color:#e05353 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-right::before{border-color:rgba(0,0,0,0) #e05353 rgba(0,0,0,0) rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-bottom::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) #e05353 rgba(0,0,0,0)}.wpeo-tooltip.tooltip-red.tooltip-left::before{border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #e05353}.wpeo-tooltip.tooltip-top::before{border-width:6px 6px 0 6px;border-color:#2b2b2b rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0);bottom:-6px;left:50%;transform:translateX(-50%)}.wpeo-tooltip.tooltip-right::before{border-width:6px 6px 6px 0;border-color:rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0) rgba(0,0,0,0);top:50%;transform:translateY(-50%);left:-6px}.wpeo-tooltip.tooltip-bottom::before{border-width:0 6px 6px 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b rgba(0,0,0,0);top:-6px;left:50%;transform:translateX(-50%)}.wpeo-tooltip.tooltip-left::before{border-width:6px 0 6px 6px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #2b2b2b;top:50%;transform:translateY(-50%);right:-6px}.wpeo-notice{position:relative;font-size:1em;padding:1em;overflow:hidden;border-radius:3px;border:solid #eee 1px;margin:1em 0;display:flex;transition:all .2s ease-out;align-items:center}.wpeo-notice::before{display:block;font-family:"Font Awesome 5 Free";font-weight:900;font-size:24px}.wpeo-notice .notice-content{width:100%;padding:0 1em;color:rgba(0,0,0,.6)}.wpeo-notice .notice-title{font-size:20px;font-weight:600;color:rgba(0,0,0,.9)}.wpeo-notice .notice-subtitle{font-size:14px}.wpeo-notice .notice-close{color:rgba(0,0,0,.3);transition:all .2s ease-out}.wpeo-notice .notice-close:hover{color:#0d8aff;cursor:pointer}.wpeo-notice ul{padding:0 0 0 1.4em;margin:.4em 0}.wpeo-notice.notice-info{border-left:solid #0d8aff 6px;color:#0d8aff;background:rgba(13,138,255,.05)}.wpeo-notice.notice-info::before{content:""}.wpeo-notice.notice-info .notice-title,.wpeo-notice.notice-info .notice-subtitle,.wpeo-notice.notice-info a{color:#0d8aff}.wpeo-notice.notice-error{border-left:solid #e05353 6px;color:#e05353;background:rgba(224,83,83,.05)}.wpeo-notice.notice-error::before{content:""}.wpeo-notice.notice-error .notice-title,.wpeo-notice.notice-error .notice-subtitle,.wpeo-notice.notice-error a{color:#e05353}.wpeo-notice.notice-warning{border-left:solid #e9ad4f 6px;color:#e9ad4f;background:rgba(233,173,79,.05)}.wpeo-notice.notice-warning::before{content:""}.wpeo-notice.notice-warning .notice-title,.wpeo-notice.notice-warning .notice-subtitle,.wpeo-notice.notice-warning a{color:#e9ad4f}.wpeo-notice.notice-warning.notice-red{border-left:solid #e05353 6px;color:#e05353;background:rgba(224,83,83,.05)}.wpeo-notice.notice-warning.notice-red::before{content:""}.wpeo-notice.notice-warning.notice-red .notice-title,.wpeo-notice.notice-warning.notice-red .notice-subtitle,.wpeo-notice.notice-warning.notice-red a{color:#e05353;font-size:18px}.wpeo-notice.notice-success{border-left:solid #47e58e 6px;color:#47e58e;background:rgba(71,229,142,.05)}.wpeo-notice.notice-success::before{content:""}.wpeo-notice.notice-success .notice-title,.wpeo-notice.notice-success .notice-subtitle,.wpeo-notice.notice-success a{color:#47e58e}.wpeo-form input,.wpeo-form textarea,.wpeo-form select{border:1px solid rgba(0,0,0,.2);font-size:14px;background:rgba(0,0,0,0);padding:0;margin:0;width:100%;padding:1em .5em;box-shadow:none}.wpeo-form input:focus,.wpeo-form input:active,.wpeo-form textarea:focus,.wpeo-form textarea:active,.wpeo-form select:focus,.wpeo-form select:active{outline:none;box-shadow:none}.wpeo-form select{padding:1em 0}.wpeo-form input[type=submit]{width:auto}.wpeo-form .group-date .mysql-date{display:none}.wpeo-form .wpeo-dropdown{display:block;width:100%}.wpeo-form .wpeo-dropdown .dropdown-toggle{width:100%;display:block;transition:all .2s ease-out;border:0;font-size:14px;padding:1em 2em 1em 1em;margin:0}.wpeo-form .wpeo-dropdown .dropdown-toggle:hover{cursor:pointer}.wpeo-form .wpeo-dropdown .dropdown-toggle>.svg-inline--fa{position:absolute;right:1em;top:50%;transform:translateY(-50%)}.wpeo-form .form-element.disable .dropdown-toggle>.svg-inline--fa{display:none}.wpeo-form .wpeo-autocomplete{display:block;width:100%}.wpeo-form .wpeo-autocomplete .autocomplete-label{box-shadow:none;padding:.74em 1em}.wpeo-form.form-light .wpeo-autocomplete .autocomplete-label{background:#fff}.wpeo-form.form-light .wpeo-autocomplete .autocomplete-label:hover{background:#ececec}.wpeo-form .form-element input[type=radio].form-field{display:inline-block;width:auto}.wpeo-form .form-element input[type=radio].form-field{appearance:none;border-radius:50%;width:16px;height:16px;padding:0;border:0;background:rgba(0,0,0,0) !important;border:1px solid rgba(0,0,0,.4);transition:.2s all linear;outline:none;position:relative;top:2px}.wpeo-form .form-element input[type=radio].form-field::before{display:none !important;content:"" !important}.wpeo-form .form-element input[type=radio].form-field:hover{cursor:pointer;border:1px solid #0d8aff;box-shadow:0 0 0 1px #0d8aff inset;background:rgba(0,0,0,0) !important}.wpeo-form .form-element input[type=radio].form-field:checked{border:1px solid #0d8aff;box-shadow:0 0 0 4px #0d8aff inset}.wpeo-form .form-element input[type=radio].form-field+label{text-transform:none;font-weight:400;font-size:14px;display:inline-block;margin-right:1em}.wpeo-form .form-element input[type=radio].form-field+label:hover{cursor:pointer}.wpeo-form .form-element input[type=radio].form-field+label:active{outline:none}.wpeo-form .form-element input[type=checkbox].form-field{display:inline-block;width:auto}.wpeo-form .form-element input[type=checkbox].form-field{width:auto;visibility:hidden;display:none}.wpeo-form .form-element input[type=checkbox].form-field+label{text-transform:none;font-weight:400;font-size:14px;display:inline-block;margin-right:1em;position:relative}.wpeo-form .form-element input[type=checkbox].form-field+label:hover{cursor:pointer}.wpeo-form .form-element input[type=checkbox].form-field+label:active{outline:none}.wpeo-form .form-element input[type=checkbox].form-field+label::before{display:inline-block;content:"";width:14px;height:14px;background:rgba(0,0,0,0);box-shadow:0 0 0 1px rgba(0,0,0,.4);border:2px solid #fff;transition:all .2s ease-out;margin-right:.6em}.wpeo-form .form-element input[type=checkbox].form-field:not(:checked)+label:hover::before{box-shadow:0 0 0 2px #0d8aff}.wpeo-form .form-element input[type=checkbox].form-field:checked+label::before{box-shadow:0 0 0 2px #0d8aff;background:#0d8aff}.wpeo-form .form-element{width:100%}.wpeo-form .form-element .form-label{display:block;font-size:14px;font-weight:600;margin:.6em 0;color:rgba(0,0,0,.9)}.wpeo-form .form-element .form-field-container{display:flex;flex-flow:row wrap;flex:0 1 auto;flex-wrap:nowrap}.wpeo-form .form-element .form-field-container:hover{box-shadow:none}.wpeo-form .form-element .form-field{transition:all .2s ease-out;border-radius:0}.wpeo-form .form-element .form-field:hover{box-shadow:none}.wpeo-form .form-element .form-sublabel{font-size:12px;font-style:italic;color:rgba(0,0,0,.6)}.wpeo-form .form-element .form-field-inline{margin-right:.4em}.wpeo-form .form-element.form-align-vertical .form-field-container{flex-direction:column}.wpeo-form .form-element.form-align-horizontal .form-field-container{flex-wrap:wrap}.wpeo-form .form-element .form-field-container .form-field,.wpeo-form .form-element .form-field-container [class*=form-field-icon]{background:#ececec}.wpeo-form .form-element .form-field-container:hover .form-field,.wpeo-form .form-element .form-field-container:hover [class*=form-field-icon]{background:#dfdfdf}.wpeo-form .form-element [class*=form-field-label]{background:#dfdfdf}.wpeo-form.form-light .form-element .form-field-container .form-field,.wpeo-form.form-light .form-element .form-field-container [class*=form-field-icon]{background:#fff}.wpeo-form.form-light .form-element .form-field-container:hover .form-field,.wpeo-form.form-light .form-element .form-field-container:hover [class*=form-field-icon]{background:#ececec}.wpeo-form.form-light .form-element [class*=form-field-label]{background:#ececec}.wpeo-form .form-element [class*=form-field-icon]{padding:.8em 0 .8em .8em;color:rgba(0,0,0,.4);font-size:16px;transition:all .2s ease-out}.wpeo-form .form-element [class*=form-field-icon] [class*=fa]{vertical-align:middle}.wpeo-form .form-element .form-field-icon-prev{padding:.8em 0 .8em .8em}.wpeo-form .form-element .form-field-icon-next{padding:.8em .8em .8em 0}.wpeo-form .form-element [class*=form-field-label]{padding:1.2em 1em;font-size:12px}.wpeo-form .form-element .form-field-label-prev{border-right:1px solid rgba(0,0,0,.1)}.wpeo-form .form-element .form-field-label-next{border-left:1px solid rgba(0,0,0,.1)}.wpeo-form .form-element.form-element-required .form-label::after{display:inline-block;content:"*";color:#e05353;padding:0 .4em}.wpeo-form .form-element.form-element-error .form-field-container{border:1px solid #e05353}.wpeo-form .form-element.form-element-disable .form-field-container{opacity:.6;pointer-events:none}.wpeo-pagination{display:flex;flex-flow:row wrap;flex:0 1 auto;margin:0;padding:0}.wpeo-pagination .pagination-element{margin:0;list-style-type:none;padding:0 .2em}.wpeo-pagination .pagination-element a{padding:.2em .8em;display:inline-block;background:#fff;border-radius:4px;text-decoration:none;color:rgba(0,0,0,.8);font-size:12px}.wpeo-pagination .pagination-element a:hover{background:rgba(0,0,0,.1)}.wpeo-pagination .pagination-element .pagination-icon{font-size:12px}.wpeo-pagination .pagination-element.pagination-current a{background:#0d8aff;color:#fff}.wpeo-pagination .pagination-element.pagination-current a:hover{background:#0d8aff}.wpeo-pagination .pagination-element.pagination-prev,.wpeo-pagination .pagination-element.pagination-next{font-weight:700}.wpeo-pagination .pagination-element.pagination-prev a,.wpeo-pagination .pagination-element.pagination-next a{background:rgba(0,0,0,.05)}.wpeo-pagination .pagination-element.pagination-prev a:hover,.wpeo-pagination .pagination-element.pagination-next a:hover{background:rgba(0,0,0,.15)}.wpeo-pagination .pagination-element.pagination-prev .pagination-icon{margin-right:.4em}.wpeo-pagination .pagination-element.pagination-next .pagination-icon{margin-left:.4em}div.wpeo-modal-patchnote .modal-header{background-color:#fff;border-bottom:solid #ccc 1px}div.wpeo-modal-patchnote .modal-container{max-width:80%;max-height:80%;background-color:#e9eaed;border-radius:25px}div.wpeo-modal-patchnote .modal-container li{list-style-type:circle;margin-left:55px}div.wpeo-modal-patchnote .modal-container ul{line-height:30px}div.wpeo-modal-patchnote .modal-container code{padding:3px 5px;border-radius:6px;background-color:#fafafa}div.wpeo-modal-patchnote .modal-content img{width:100%;box-shadow:5px 5px 18px rgba(0,0,0,.2);margin-bottom:28px}div.wpeo-modal-patchnote .modal-content h3{margin-left:30px;color:#666;font-size:17px}div.wpeo-modal-patchnote .modal-title{color:#0a1464}div.wpeo-modal-patchnote .wpeo-button{background-color:#ccc}.media-container{position:relative}.media-container .media-gallery-unlink,.media-container .media-gallery-favorite{width:30px !important;height:30px !important;line-height:30px !important;border:0;font-size:14px;background:#cbcbcb !important;color:rgba(0,0,0,.4) !important;text-align:center;position:absolute;top:-10px;right:-10px;border-radius:50%;z-index:10}.media-container .media-gallery-unlink .button-icon,.media-container .media-gallery-favorite .button-icon{line-height:30px !important}.media-container .media-gallery-favorite{top:auto;bottom:-10px}.media-container .media-gallery-favorite.favorite{background:orange !important;color:#fff !important}.wpeo-modal.modal-photo .modal-container{max-height:650px}.wpeo-modal.modal-photo .clickable-photo{transition:all .2s ease-out;width:100%}.wpeo-modal.modal-photo .clickable-photo:hover{cursor:pointer}.wpeo-modal.modal-photo .clickable-photo:hover .photo-image .photo{opacity:.8}.wpeo-modal.modal-photo .clickable-photo.clicked-photo .photo-image{border:5px solid #0d8aff}.wpeo-modal.modal-photo .clickable-photo.clicked-photo .title{color:#0d8aff}.wpeo-modal.modal-photo .clickable-photo .photo-image{position:relative;width:100%;max-width:120px;height:120px;margin:auto;border:5px solid #fff}.wpeo-modal.modal-photo .clickable-photo .photo-image .photo{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;max-width:none !important;transition:all .2s ease-out}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview{position:absolute;display:inline-block;top:1em;right:1em;z-index:900;width:25px;height:25px;line-height:25px;background:#fff;border-radius:50%;color:#0d8aff;transition:all .2s ease-out}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview:hover{transform:scale(1.1)}.wpeo-modal.modal-photo .clickable-photo .photo-image .clicked-photo-preview i{line-height:25px;font-size:14px}.wpeo-modal.modal-photo .clickable-photo .title{word-break:break-all}.wpeo-modal.modal-photo .formattachnewfile{padding-bottom:.5em}.wpeo-modal.modal-photo input[type=file]{border-bottom:0 !important}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label{width:100%;display:flex;border-bottom:1px solid var(--colortopbordertitle1)}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-icon-before{margin:auto 0}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-search-input{width:100%;border-bottom:0;padding:5px}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label .autocomplete-search-input:focus{border-bottom:0 !important}.wpeo-modal.modal-photo .wpeo-autocomplete .autocomplete-label input:focus:not(.button):not(.select2-search__field):not(#top-bookmark-search-input){border-bottom:0 !important}.photo{border-radius:5px}#progressBarContainer{width:100%;background-color:gray}#progressBar{width:1%;height:30px;background-color:green}.pictoModule{vertical-align:middle;text-align:left;width:20px;padding-right:4px}.color-circle{height:25px;width:25px;border-radius:50%;display:inline-block}.page-public-card{background:url("../img/assets/public-card-background.png") no-repeat #ebf0f8;margin-top:4em}.page-public-card *{box-sizing:border-box}.page-public-card .public-card__logo,.page-public-card .signature-logo{display:block;margin:4em auto 2em auto;width:100%;max-width:320px;text-align:center}.page-public-card .public-card__container{width:100%;max-width:920px;background:#fff;padding:2em;border-radius:10px;box-shadow:0 0 40px 0 rgba(27,100,168,.15);margin:auto}.page-public-card .public-card__container .public-card__header{margin-bottom:1.5em}.page-public-card .public-card__container .public-card__header .header-information .information-back{display:block;color:#0d8aff}.page-public-card .public-card__container .public-card__header .header-information .information-title{font-size:20px;font-weight:600;color:#0d8aff;margin-top:.2em}.page-public-card .public-card__container .public-card__header .header-information .information-user{font-weight:600;color:#000}.page-public-card .public-card__container .public-card__header .header-objet .objet-container{width:100%;border:1px solid rgba(13,138,255,.2);box-shadow:0 4px 1px 0 rgba(13,138,255,.2);border-radius:6px;display:flex;padding:1em}.page-public-card .public-card__container .public-card__header .header-objet .objet-container .objet-info{width:100%}.page-public-card .public-card__container .public-card__header .header-objet .objet-container .objet-info .objet-type{font-size:12px;color:#0d8aff;font-weight:600}.page-public-card .public-card__container .public-card__header .header-objet .objet-container .objet-info .objet-label{font-weight:600}.page-public-card .public-card__container .public-card__header .header-objet .objet-container .objet-actions{margin:auto 0}.page-public-card .public-card__container .public-card__footer{text-align:right;margin-top:1.5em}.page-signature .public-card__content .signature-element{position:relative}.page-signature .public-card__content .signature-element .signature-erase{position:absolute;top:.5em;right:.5em}.page-signature .public-card__content .signature-element .canvas-container{width:100%;height:220px;border:1px solid rgba(0,0,0,.2);border-radius:6px;cursor:url("../img/assets/pencil-alt-solid.svg") 0 32,auto}.page-signature .public-card__content .signature-element .canvas-container img{width:100%}.signature-container{max-width:800px;background:#fff;box-shadow:0 0 40px 0 rgba(0,0,0,.1);margin:1.5em auto 0 auto;padding:2em;box-sizing:border-box}.signature-container *{box-sizing:border-box}.signature-container .signature .signature-element .wpeo-button.modal-signature-open{display:none}.signature-container .signature .signature-element img{width:100%;height:auto;border:1px solid rgba(0,0,0,.4) !important}@media all and (orientation: portrait){.signature-container .signature .signature-element .modal-container .modal-content{height:78% !important}.signature-container .signature .signature-element .modal-container .modal-footer .wpeo-button{font-size:14px !important}}.signature-container .signature-user{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:.5em}.signature-container .signature-user .signature-image,.signature-container .signature-user .signature-button{width:50%;height:100%}.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable.ui-resizable.preview-photo{z-index:2100 !important}.dropdown-toggle::after{display:none}.favorite-photo{border:5px solid #0d8aff}tr.liste_titre th.liste_titre:not(.maxwidthsearch),tr.liste_titre td.liste_titre:not(.maxwidthsearch){opacity:1}@media only screen and (max-width: 1600px){div.fichecenter{width:100%;clear:both}div.fichecenterbis{margin-top:8px}div.fichethirdleft{float:none;width:auto;padding-bottom:6px}div.fichetwothirdright{float:none;width:auto;padding-bottom:6px}div.fichehalfleft{float:none;width:auto}div.fichehalfright{float:none;width:auto}div.fichehalfright{margin-top:10px}div.firstcolumn div.box{padding-right:0px}div.secondcolumn div.box{padding-left:0px}} \ No newline at end of file diff --git a/css/scss/modules/_modules.scss b/css/scss/modules/_modules.scss index dd3fd9a8..2da8a987 100644 --- a/css/scss/modules/_modules.scss +++ b/css/scss/modules/_modules.scss @@ -1,5 +1,6 @@ @import "dropdown/dropdown"; @import "button/button"; +@import "card-confirmation/card-confirmation"; @import "modal/modal"; @import "loader/loader"; @import "grid/grid"; diff --git a/css/scss/modules/card-confirmation/_card-confirmation.scss b/css/scss/modules/card-confirmation/_card-confirmation.scss new file mode 100644 index 00000000..248170a6 --- /dev/null +++ b/css/scss/modules/card-confirmation/_card-confirmation.scss @@ -0,0 +1,30 @@ +.card__confirmation { + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + background: rgba(0,0,0,0.2); + z-index: 999; + display: flex; + + .confirmation-container { + display: block; + width: 100%; + max-width: 460px; + background: #fff; + margin: auto; + box-shadow: 0 0 40px 0 rgba(0,0,0,0.1); + padding: 3em 1.5em; + text-align: center; + + .confirmation-icon { + font-size: 70px; + } + .confirmation-title { + font-size: 20px; + font-weight: 600; + margin: 1em 0; + } + } +} diff --git a/css/scss/modules/card-confirmation/index.php b/css/scss/modules/card-confirmation/index.php new file mode 100644 index 00000000..cd6990e2 --- /dev/null +++ b/css/scss/modules/card-confirmation/index.php @@ -0,0 +1,2 @@ + diff --git a/img/assets/public-card-background.png b/img/assets/public-card-background.png new file mode 100644 index 00000000..0277fae1 Binary files /dev/null and b/img/assets/public-card-background.png differ diff --git a/img/example_of_commit.png b/img/example_of_commit.png new file mode 100644 index 00000000..21044877 Binary files /dev/null and b/img/example_of_commit.png differ diff --git a/js/modules/document.js b/js/modules/document.js index 134fd20b..51f305fd 100644 --- a/js/modules/document.js +++ b/js/modules/document.js @@ -52,8 +52,9 @@ window.saturne.document.init = function() { * @return {void} */ window.saturne.document.event = function() { - $( document ).on( 'click', '#builddoc_generatebutton', window.saturne.document.displayLoader ); - $( document ).on( 'click', '.pdf-generation', window.saturne.document.displayLoader ); + $(document).on('click', '#builddoc_generatebutton', window.saturne.document.displayLoader); + $(document).on('click', '.pdf-generation', window.saturne.document.displayLoader); + $(document).on('click', '.download-template', window.saturne.document.autoDownloadTemplate); }; /** @@ -67,3 +68,38 @@ window.saturne.document.event = function() { window.saturne.document.displayLoader = function( ) { window.saturne.loader.display($(this).closest('.div-table-responsive-no-min')); }; + +/** + * Auto download document template + * + * @memberof Saturne_Framework_Document + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.document.autoDownloadTemplate = function() { + let token = window.saturne.toolbox.getToken(); + let url = document.URL.replace(/#.*$/, ''); + let querySeparator = window.saturne.toolbox.getQuerySeparator(url); + let element = $(this).closest('.file-generation'); + let type = element.find('.template-type').attr('value'); + let filename = element.find('.template-name').attr('value'); + + $.ajax({ + url: url + querySeparator + 'action=download_template&filename=' + filename + '&type=' + type + '&token=' + token, + type: 'POST', + success: function() { + let path = element.find('.template-path').attr('value'); + window.saturne.signature.download(path + filename, filename); + $.ajax({ + url: document.URL + querySeparator + 'action=remove_file&filename=' + filename + '&token=' + token, + type: 'POST', + success: function () {}, + error: function() {} + }); + }, + error: function () {} + }); +}; diff --git a/js/modules/media.js b/js/modules/media.js new file mode 100644 index 00000000..655e6645 --- /dev/null +++ b/js/modules/media.js @@ -0,0 +1,245 @@ +/* Copyright (C) 2024 EVARISK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + * Library javascript to enable Browser notifications + */ + +/** + * \file js/modules/media.js + * \ingroup saturne + * \brief JavaScript media file for module Saturne + */ + +/** + * Init media JS + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @type {Object} + */ +window.saturne.media = {}; + +/** + * Init rotation value of img on canvas + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + */ +window.saturne.media.rotation = 0; + +/** + * Init img in canvas + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + */ +window.saturne.media.img; + +/** + * Media init + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @returns {void} + */ +window.saturne.media.init = function() { + window.saturne.media.event(); +}; + +/** + * Media event + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @returns {void} + */ +window.saturne.media.event = function() { + $(document).on('change', '.fast-upload-improvement', window.saturne.media.uploadImage); + $(document).on('click', '.image-rotate-left', function() { + window.saturne.media.rotateImage(-90); + }); + $(document).on('click', '.image-rotate-right', function() { + window.saturne.media.rotateImage(90); + }); + $(document).on('click', '.image-undo', window.saturne.media.undoLastDraw); + $(document).on('click', '.image-erase', window.saturne.media.clearCanvas); + $(document).on('click', '.image-validate', window.saturne.media.createImg); +}; + +/** + * Upload image action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @returns {void} + */ +window.saturne.media.uploadImage = function() { + if (this.files && this.files[0]) { + var reader = new FileReader(); + + reader.onload = function(event) { + $(document).find('.modal-upload-image').addClass('modal-active'); + window.saturne.media.drawImageOnCanvas(event); + }; + + reader.readAsDataURL(this.files[0]); + } +}; + +/** + * Rotate image action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @returns {void} + */ +window.saturne.media.rotateImage = function(degrees) { + window.saturne.media.rotation += degrees; + $('#canvas').css('transform', 'rotate(' + window.saturne.media.rotation + 'deg)'); +}; + +/** + * Undo last drawing action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.media.undoLastDraw = function() { + let canvas = $(this).closest('.modal-upload-image').find('canvas'); + var data = canvas[0].signaturePad.toData(); + if (data) { + data.pop(); // remove the last dot or line + canvas[0].signaturePad.fromData(data); + // Redraw the image on the canvas + window.saturne.media.drawImageOnCanvas(window.saturne.media.img); + } +}; + +/** + * Clear canvas action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.media.clearCanvas = function() { + let canvas = $(this).closest('.modal-upload-image').find('canvas'); + canvas[0].signaturePad.clear(); + window.saturne.media.drawImageOnCanvas(window.saturne.media.img); +}; + +/** + * Draw img on canvas action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.media.drawImageOnCanvas = function(event) { + window.saturne.media.canvas = document.querySelector('#modal-upload-image0 canvas'); + if (window.saturne.media.canvas) { + window.saturne.media.canvas.signaturePad = new SignaturePad(window.saturne.media.canvas, { + penColor: 'rgb(255, 0, 0)' + }); + + const context = window.saturne.media.canvas.getContext('2d'); + + // Draw the image on the canvas + var img = new Image(); + img.src = event.target.result; + window.saturne.media.img = event; + img.onload = function() { + let canvasWidth = $(window.saturne.media.canvas).width(); + let canvasHeight = $(window.saturne.media.canvas).height(); + window.saturne.media.canvas.width = canvasWidth; + window.saturne.media.canvas.height = canvasHeight; + context.drawImage(img, 0, 0, window.saturne.media.canvas.width, window.saturne.media.canvas.height); + }; + + window.saturne.media.rotation = 0; // Reset rotation when a new image is selected + } +}; + +/** + * create img action + * + * @memberof Saturne_Media + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.media.createImg = function() { + let canvas = $(this).closest('.wpeo-modal').find('canvas')[0]; + let img = canvas.toDataURL('image/png'); + + let objectSubType = $('.fast-upload-options').attr('data-from-subtype'); + let objectSubdir = $('.fast-upload-options').attr('data-from-subdir'); + + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + + window.saturne.loader.display($(this)); + $.ajax({ + url: document.URL + querySeparator + 'subaction=add_img&token=' + token, + type: 'POST', + processData: false, + contentType: 'application/octet-stream', + data: JSON.stringify({ + img: img, + objectSubType: objectSubType, + objectSubdir: objectSubdir + }), + success: function(resp) { + $('.wpeo-loader').removeClass('wpeo-loader'); + $('.wpeo-modal').removeClass('modal-active'); + if ($('.floatleft.inline-block.valignmiddle.divphotoref').length > 0) { + $('.floatleft.inline-block.valignmiddle.divphotoref').replaceWith($(resp).find('.floatleft.inline-block.valignmiddle.divphotoref')); + } + $('.linked-medias.' + objectSubType).replaceWith($(resp).find('.linked-medias.' + objectSubType)); + }, + error: function () {} + }); +}; diff --git a/js/modules/mediaGallery.js b/js/modules/mediaGallery.js index c2f412e0..aaf4531c 100644 --- a/js/modules/mediaGallery.js +++ b/js/modules/mediaGallery.js @@ -46,7 +46,7 @@ window.saturne.mediaGallery.init = function() { * La méthode contenant tous les événements pour la bibliothèque de médias. * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ @@ -54,6 +54,7 @@ window.saturne.mediaGallery.event = function() { // Photos $( document ).on( 'click', '.clickable-photo', window.saturne.mediaGallery.selectPhoto ); $( document ).on( 'click', '.save-photo', window.saturne.mediaGallery.savePhoto ); + $(document).on( 'click', '.delete-photo', window.saturne.mediaGallery.deletePhoto); $( document ).on( 'change', '.flat.minwidth400.maxwidth200onsmartphone', window.saturne.mediaGallery.sendPhoto ); $( document ).on( 'click', '.clicked-photo-preview', window.saturne.mediaGallery.previewPhoto ); $( document ).on( 'input', '.form-element #search_in_gallery', window.saturne.mediaGallery.handleSearch ); @@ -63,6 +64,7 @@ window.saturne.mediaGallery.event = function() { $( document ).on( 'click', '.select-page', window.saturne.mediaGallery.selectPage ); $( document ).on( 'click', '.toggle-today-medias', window.saturne.mediaGallery.toggleTodayMedias ); $( document ).on( 'click', '.toggle-unlinked-medias', window.saturne.mediaGallery.toggleUnlinkedMedias ); + $(document).on('click', '.regenerate-thumbs', window.saturne.mediaGallery.regenerateThumbs); } /** @@ -80,14 +82,15 @@ window.saturne.mediaGallery.selectPhoto = function( event ) { if ($(this).hasClass('clicked-photo')) { $(this).attr('style', 'none !important') $(this).removeClass('clicked-photo') - if ($('.clicked-photo').length === 0) { - $(this).closest('.modal-container').find('.save-photo').addClass('button-disable'); - } + $(this).closest('.modal-container').find('.save-photo').addClass('button-disable'); + $(this).closest('.modal-container').find('.delete-photo').addClass('button-disable'); + } } else { parent.closest('.modal-container').find('.save-photo').removeClass('button-disable'); - parent.find('.clickable-photo'+photoID).addClass('clicked-photo'); + parent.closest('.modal-container').find('.delete-photo').removeClass('button-disable'); + parent.find('.clickable-photo'+photoID).addClass('clicked-photo'); } }; @@ -118,7 +121,6 @@ window.saturne.mediaGallery.savePhoto = function( event ) { filenames += $( this ).find('.filename').val() + 'vVv' }); } - window.saturne.loader.display($(this)); if (typeof objectPhotoClass != 'undefined' && objectPhotoClass.length > 0) { if ($('.linked-medias.'+objectPhotoClass).length > 0) { @@ -160,6 +162,86 @@ window.saturne.mediaGallery.savePhoto = function( event ) { }); }; +/** + * Action delete photo from media gallery + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.mediaGallery.deletePhoto = function() { + let mediaGalleryModal = $(this).closest('.modal-container'); + let filesLinked = mediaGalleryModal.find('.clicked-photo'); + + let fileNames = ''; + if (filesLinked.length > 0) { + filesLinked.each(function() { + fileNames += $(this).find('.filename').val() + 'vVv' + }); + } + window.saturne.loader.display($(this)); + + $('.card__confirmation').removeAttr('style'); + $('.card__confirmation .confirmation-title .filesLinked').text(filesLinked.length); + $(document).on('click', '.confirmation-close', function() { + window.saturne.mediaGallery.closeConfirmation(filesLinked); + }); + $(document).on('click', '.confirmation-delete', function() { + window.saturne.mediaGallery.deleteFilesRequest(fileNames); + }); +}; + +/** + * Action to remove the view of the confirmation box + * + * @since 1.3.0 + * @version 1.3.0 + * + * @param {string} filesLinked Selected Name of linked files + * + * @return {void} + */ +window.saturne.mediaGallery.closeConfirmation = function(filesLinked) { + $('.wpeo-loader').removeClass('wpeo-loader') + $('.card__confirmation').attr('style', 'display:none;') + + if (filesLinked.length > 0) { + filesLinked.each(function() { + filesLinked.removeClass('clicked-photo'); + }); + } +} + +/** + * Action to execute delete files request + * + * @since 1.3.0 + * @version 1.3.0 + * + * @param {string} fileNames Name of linked files + * + * @return {void} + */ +window.saturne.mediaGallery.deleteFilesRequest = function(fileNames) { + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + + $.ajax({ + url: document.URL + querySeparator + 'subaction=delete_files&token=' + token, + type: 'POST', + processData: false, + contentType: false, + data: JSON.stringify({ + filenames: fileNames + }), + success: function(resp) { + $('#media_gallery .modal-container').replaceWith($(resp).find('#media_gallery .modal-container')); + }, + error: function() {} + }); +} + /** * Action handle search in medias * @@ -632,3 +714,33 @@ window.saturne.mediaGallery.toggleUnlinkedMedias = function( event ) { } }) }; + +/** + * Regenerate thumbs media action + * + * @since 1.3.0 + * @version 1.3.0 + * + * @return {void} + */ +window.saturne.mediaGallery.regenerateThumbs = function() { + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + let fullname = $(this).closest('.photo-image').find('.fullname').attr('data-fullname'); + + window.saturne.loader.display($(this).closest('.photo-image')); + + $.ajax({ + url: document.URL + querySeparator + 'subaction=regenerate_thumbs&token=' + token, + type: 'POST', + data: JSON.stringify({ + fullname: fullname + }), + processData: false, + contentType: false, + success: function(resp) { + $('.ecm-photo-list-content').replaceWith($(resp).find('.ecm-photo-list-content')); + }, + error: function() {} + }); +}; diff --git a/js/modules/modal.js b/js/modules/modal.js index f10a81ce..df098cda 100644 --- a/js/modules/modal.js +++ b/js/modules/modal.js @@ -54,7 +54,6 @@ window.saturne.modal.event = function() { $( document ).on( 'click', '.modal-close, .modal-active:not(.modal-container)', window.saturne.modal.closeModal ); $( document ).on( 'click', '.modal-open', window.saturne.modal.openModal ); $( document ).on( 'click', '.modal-refresh', window.saturne.modal.refreshModal ); - window.saturne.modal.loadSignatureModal(); }; /** @@ -92,10 +91,6 @@ window.saturne.modal.openModal = function ( event ) { $('#'+modalToOpen).attr('data-from-subdir', fromSubdir); $('#'+modalToOpen).attr('data-photo-class', photoClass); - if (modalToOpen.match(/signature/)) { - window.saturne.signature.modalSignatureOpened($(this)) - } - if (fromModule) { if (typeof window.saturne.modal.addMoreOpenModalData == 'function') { window.saturne.modal.addMoreOpenModalData(modalToOpen, $(this)); @@ -140,17 +135,3 @@ window.saturne.modal.closeModal = function ( event ) { window.saturne.modal.refreshModal = function ( event ) { window.location.reload(); }; - -/** - * Load signature modal after redirect in public url page - * - * @since 1.2.1 - * @version 1.2.1 - * - * @return {void} - */ -window.saturne.modal.loadSignatureModal = function () { - if (window.location.href.indexOf('&modal_to_open=') > 0) { - $( document ).find('.wpeo-button.modal-signature-open').trigger('click'); - } -}; diff --git a/js/modules/signature.js b/js/modules/signature.js index 7a395188..52fe6df8 100644 --- a/js/modules/signature.js +++ b/js/modules/signature.js @@ -1,4 +1,4 @@ -/* Copyright (C) 2022-2023 EVARISK +/* Copyright (C) 2022-2024 EVARISK * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,19 +19,11 @@ /** * \file js/modules/signature.js * \ingroup saturne - * \brief JavaScript file signature for module Saturne. + * \brief JavaScript file signature for module Saturne */ -/* - * Gestion des signatures. - * - * @since 1.0.0 - * @version 1.0.0 - */ - - /** - * Initialise l'objet "signature" ainsi que la méthode "init" obligatoire pour la bibliothèque Saturne. + * Init signature JS * * @memberof Saturne_Framework_Signature * @@ -43,28 +35,17 @@ window.saturne.signature = {}; /** - * Initialise le canvas signature + * Init signature canvas * * @memberof Saturne_Framework_Signature * * @since 1.0.0 * @version 1.0.0 */ -window.saturne.signature.canvas; - -/** - * Initialise le boutton signature - * - * @memberof Saturne_Framework_Signature - * - * - * @since 1.0.0 - * @version 1.0.0 - */ -window.saturne.signature.buttonSignature; +window.saturne.signature.canvas = {}; /** - * La méthode appelée automatiquement par la bibliothèque Saturne. + * Signature Init * * @memberof Saturne_Framework_Signature * @@ -78,118 +59,108 @@ window.saturne.signature.init = function() { }; /** - * La méthode contenant tous les événements pour la signature. + * Signature event * * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ window.saturne.signature.event = function() { - $(document).on('click', '.signature-erase', window.saturne.signature.clearCanvas); - $(document).on('click', '.signature-validate', window.saturne.signature.createSignature); - $(document).on('click', '.auto-download', window.saturne.signature.autoDownloadSpecimen); - $(document).on('click', '.copy-signatureurl', window.saturne.signature.copySignatureUrlClipboard); - $(document).on('click', '.set-attendance', window.saturne.signature.setAttendance); + $(document).on('click', '.signature-erase', window.saturne.signature.clearCanvas); + $(document).on('click', '.signature-validate:not(.button-disable)', window.saturne.signature.createSignature); + $(document).on('click', '.auto-download', window.saturne.signature.autoDownloadSpecimen); + $(document).on('click', '.copy-signatureurl', window.saturne.signature.copySignatureUrlClipboard); + $(document).on('click', '.set-attendance', window.saturne.signature.setAttendance); + var scriptElement = document.querySelector('script[src*="signature-pad.min.js"]'); + if (scriptElement) { + window.saturne.signature.drawSignatureOnCanvas(); + } + $(document).on('touchstart mousedown', '.canvas-signature', function () { + window.saturne.toolbox.removeAddButtonClass('signature-validate', 'button-grey button-disable', 'button-blue'); + }); }; /** - * Open modal signature + * Draw signature on canvas * * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ -window.saturne.signature.modalSignatureOpened = function(triggeredElement) { - window.saturne.signature.buttonSignature = triggeredElement; - - let ratio = Math.max(window.devicePixelRatio || 1, 1); - window.saturne.signature.canvas = document.querySelector('#modal-signature' + triggeredElement.attr('value') + ' canvas'); - +window.saturne.signature.drawSignatureOnCanvas = function() { + window.saturne.signature.canvas = document.querySelector('.canvas-signature'); + if (window.saturne.signature.canvas) { + let ratio = Math.max(window.devicePixelRatio || 1, 1); window.saturne.signature.canvas.signaturePad = new SignaturePad(window.saturne.signature.canvas, { - penColor: 'rgb(0, 0, 0)' + penColor: 'rgb(0, 0, 0)' }); window.saturne.signature.canvas.width = window.saturne.signature.canvas.offsetWidth * ratio; window.saturne.signature.canvas.height = window.saturne.signature.canvas.offsetHeight * ratio; window.saturne.signature.canvas.getContext('2d').scale(ratio, ratio); - window.saturne.signature.canvas.signaturePad.clear(); - - let signatureData = $('#signature_data' + triggeredElement.attr('value')).val(); - window.saturne.signature.canvas.signaturePad.fromDataURL(signatureData); + } }; /** - * Action Clear sign + * Clear sign action * * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ window.saturne.signature.clearCanvas = function() { - let canvas = $(this).closest('.modal-signature').find('canvas'); - canvas[0].signaturePad.clear(); + window.saturne.signature.canvas.signaturePad.clear(); + window.saturne.toolbox.removeAddButtonClass('signature-validate', 'button-blue', 'button-grey button-disable'); }; /** - * Action create signature + * Create signature action * * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ window.saturne.signature.createSignature = function() { - let elementSignatory = $(this).attr('value'); - let elementRedirect = ''; - let elementCode = ''; - let elementZone = $(this).find('#zone' + elementSignatory).attr('value'); - let elementConfCAPTCHA = $('#confCAPTCHA').val(); - let actionContainerSuccess = $('.noticeSignatureSuccess'); - let signatoryIDPost = ''; - if (elementSignatory !== 0) { - signatoryIDPost = '&signatoryID=' + elementSignatory; - } + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); - if (!$(this).closest('.wpeo-modal').find('canvas')[0].signaturePad.isEmpty()) { - var signature = $(this).closest('.wpeo-modal').find('canvas')[0].toDataURL(); - } + if (!window.saturne.signature.canvas.signaturePad.isEmpty()) { + var signature = window.saturne.signature.canvas.toDataURL(); + } - let token = window.saturne.toolbox.getToken(); - let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + window.saturne.loader.display($(this)); - let url = document.URL + querySeparator + 'action=add_signature' + signatoryIDPost + '&token=' + token; - $.ajax({ - url: url, - type: 'POST', - processData: false, - contentType: 'application/octet-stream', - data: JSON.stringify({ - signature: signature, - code: elementCode - }), - success: function( resp ) { - if (elementZone == "private") { - actionContainerSuccess.html($(resp).find('.noticeSignatureSuccess .notice-content')); - actionContainerSuccess.removeClass('hidden'); - $('.signatures-container').html($(resp).find('.signatures-container')); - } else { - window.location.reload(); - } - }, - error: function ( ) { - } - }); + $.ajax({ + url: document.URL + querySeparator + 'action=add_signature&token=' + token, + type: 'POST', + processData: false, + contentType: 'application/octet-stream', + data: JSON.stringify({ + signature: signature + }), + success: function(resp) { + if ($('.public-card__container').data('public-interface') === true) { + $('.card__confirmation').removeAttr('style'); + $('.signature-confirmation-close').attr('onclick', 'window.close()'); + $('.public-card__container').replaceWith($(resp).find('.public-card__container')); + } else { + window.location.reload(); + } + }, + error: function() {} + }); }; /** @@ -198,15 +169,17 @@ window.saturne.signature.createSignature = function() { * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * + * @param {string} fileUrl Url of file to download + * @param {string} filename Name of file to download * @return {void} */ window.saturne.signature.download = function(fileUrl, filename) { - let a = document.createElement('a'); - a.href = fileUrl; - a.setAttribute('download', filename); - a.click(); + let a = document.createElement('a'); + a.href = fileUrl; + a.setAttribute('download', filename); + a.click(); }; /** @@ -215,36 +188,32 @@ window.saturne.signature.download = function(fileUrl, filename) { * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ window.saturne.signature.autoDownloadSpecimen = function() { - let element = $(this).closest('.file-generation'); - let token = window.saturne.toolbox.getToken(); - let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); - let url = document.URL + querySeparator + 'action=builddoc&token=' + token; - $.ajax({ - url: url, - type: 'POST', - success: function ( ) { - let filename = element.find('.specimen-name').attr('value'); - let path = element.find('.specimen-path').attr('value'); - window.saturne.signature.download(path + filename, filename); - $('.button-blue.button-disable.wpeo-loader').removeClass('wpeo-loader').removeClass('button-disable').removeClass('button-blue') - $('.loader-spin').remove() - $.ajax({ - url: document.URL + querySeparator + 'action=remove_file&token=' + token, - type: 'POST', - success: function ( ) { - }, - error: function ( ) { - } - }); - }, - error: function ( ) { - } - }); + let element = $(this).closest('.file-generation'); + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + + $.ajax({ + url: document.URL + querySeparator + 'action=builddoc&token=' + token, + type: 'POST', + success: function(resp) { + let filename = element.find('.specimen-name').attr('data-specimen-name'); + let path = element.find('.specimen-path').attr('data-specimen-path'); + window.saturne.signature.download(path + filename, filename); + $('.file-generation').replaceWith($(resp).find('.file-generation')); + $.ajax({ + url: document.URL + querySeparator + 'action=remove_file&token=' + token, + type: 'POST', + success: function() {}, + error: function() {} + }); + }, + error: function() {} + }); }; /** @@ -258,48 +227,47 @@ window.saturne.signature.autoDownloadSpecimen = function() { * @return {void} */ window.saturne.signature.copySignatureUrlClipboard = function() { - let signatureUrl = $(this).attr('data-signature-url'); - navigator.clipboard.writeText(signatureUrl).then(() => { - $(this).attr('class', 'fas fa-check copy-signatureurl'); - $(this).css('color', '#59ed9c'); - $(this).closest('.copy-signatureurl-container').find('.copied-to-clipboard').attr('style', ''); - $(this).closest('.copy-signatureurl-container').find('.copied-to-clipboard').fadeOut(2500, () => { - $(this).attr('class', 'fas fa-clipboard copy-signatureurl'); - $(this).css('color', '#666'); - }); + let signatureUrl = $(this).attr('data-signature-url'); + navigator.clipboard.writeText(signatureUrl).then(() => { + $(this).attr('class', 'fas fa-check copy-signatureurl'); + $(this).css('color', '#59ed9c'); + $(this).closest('.copy-signatureurl-container').find('.copied-to-clipboard').attr('style', ''); + $(this).closest('.copy-signatureurl-container').find('.copied-to-clipboard').fadeOut(2500, () => { + $(this).attr('class', 'fas fa-clipboard copy-signatureurl'); + $(this).css('color', '#666'); }); + }); }; /** - * set Attendance signatory + * Set attendance signatory * * @memberof Saturne_Framework_Signature * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * * @return {void} */ window.saturne.signature.setAttendance = function() { - let signatoryID = $(this).closest('.attendance-container').find('input[name="signatoryID"]').val(); - let attendance = $(this).attr('value'); - let token = window.saturne.toolbox.getToken(); - let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); - let urlWithoutHashtag = String(document.location.href).replace(/#formmail/, ""); - let url = urlWithoutHashtag + querySeparator + 'action=set_attendance&token=' + token; - $.ajax({ - url: url, - type: 'POST', - processData: false, - contentType: '', - data: JSON.stringify({ - signatoryID: signatoryID, - attendance: attendance - }), - success: function (resp) { - $('.signatures-container').html($(resp).find('.signatures-container')); - }, - error: function () { - } - }); + let signatoryID = $(this).closest('.attendance-container').find('input[name="signatoryID"]').val(); + let attendance = $(this).attr('value'); + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + let urlWithoutHashtag = String(document.location.href).replace(/#formmail/, ""); + + $.ajax({ + url: urlWithoutHashtag + querySeparator + 'action=set_attendance&token=' + token, + type: 'POST', + processData: false, + contentType: '', + data: JSON.stringify({ + signatoryID: signatoryID, + attendance: attendance + }), + success: function(resp) { + $('.signatures-container').html($(resp).find('.signatures-container')); + }, + error: function() {} + }); }; diff --git a/js/modules/toolbox.js b/js/modules/toolbox.js index 49a3780f..bc07ee59 100644 --- a/js/modules/toolbox.js +++ b/js/modules/toolbox.js @@ -1,4 +1,4 @@ -/* Copyright (C) 2022-2023 EVARISK +/* Copyright (C) 2022-2024 EVARISK * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +19,13 @@ /** * \file js/modules/toolbox.js * \ingroup toolbox - * \brief JavaScript file toolbox for module Saturne. + * \brief JavaScript file toolbox for module Saturne */ /** - * Initialise l'objet "toolbox" ainsi que la méthode "init" obligatoire pour la bibliothèque Saturne. + * Init toolbox JS + * + * @memberof Saturne_Framework_Toolbox * * @since 1.0.0 * @version 1.0.0 @@ -31,41 +33,75 @@ window.saturne.toolbox = {}; /** - * La méthode appelée automatiquement par la bibliothèque Saturne. + * Toolbox Init + * + * @memberof Saturne_Framework_Toolbox * * @since 1.0.0 * @version 1.0.0 * * @return {void} */ -window.saturne.toolbox.init = function() { -}; +window.saturne.toolbox.init = function() {}; /** - * Returns suitable query separator + * Return suitable query separator + * + * @memberof Saturne_Framework_Toolbox * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * - * @return {string} + * @param {string} url Url of current page + * @return {string} Suitable query separator */ -window.saturne.toolbox.getQuerySeparator = function( url ) { - return url.match(/\?/) ? '&' : "?" +window.saturne.toolbox.getQuerySeparator = function(url) { + return url.match(/\?/) ? '&' : "?"; }; - /** - * Returns action security token + * Return security token value + * + * @memberof Saturne_Framework_Toolbox * * @since 1.0.0 - * @version 1.0.0 + * @version 1.3.0 * - * @return {string} + * @return {string} Security token value */ window.saturne.toolbox.getToken = function() { - let token = $('input[name="token"]').val(); - - return token + return $('input[name="token"]').val(); }; +/** + * Toggle button class name + * + * @memberof Saturne_Framework_Toolbox + * + * @since 1.3.0 + * @version 1.3.0 + * + * @param {string} className Class name of input/button + * @param {string} buttonClassName Button class name to toggle + * @return {void} + */ +window.saturne.toolbox.toggleButtonClass = function(className, buttonClassName) { + $('.' + className).toggleClass(buttonClassName); +}; +/** + * Remove and add button class name + * + * @memberof Saturne_Framework_Toolbox + * + * @since 1.3.0 + * @version 1.3.0 + * + * @param {string} className Class name of input/button + * @param {string} removeButtonClassName Button class name to remove + * @param {string} addButtonClassName Button class name to add + * @return {void} + */ +window.saturne.toolbox.removeAddButtonClass = function(className, removeButtonClassName, addButtonClassName) { + $('.' + className).removeClass(removeButtonClassName).addClass(addButtonClassName); +}; diff --git a/js/modules/utils.js b/js/modules/utils.js index 2baaeda0..8fd20478 100644 --- a/js/modules/utils.js +++ b/js/modules/utils.js @@ -112,6 +112,38 @@ window.saturne.utils.draganddrop = function() { }); }; +/** + * Reload page for ajax action on specific action + * + * @memberof Saturne_Utils + * + * @since 1.3.0 + * @version 1.3.0 + * + * @param {string} action Html action use for php + * @param {string} page Class page use on resp for reload + * @param {string} urlMoreParams Array for managing custom url parameters + * @param {{removeAttr: {value: string, element: string}}} checkMoreParams Array for managing custom parameters + * + * @returns {void} + */ +window.saturne.utils.reloadPage = function(action, page, urlMoreParams, checkMoreParams) { + let token = window.saturne.toolbox.getToken(); + let querySeparator = window.saturne.toolbox.getQuerySeparator(document.URL); + + $.ajax({ + url: document.URL + querySeparator + 'action=' + action + urlMoreParams + '&token=' + token, + type: 'POST', + processData: false, + contentType: false, + success: function(resp) { + window.saturne.utils.checkMoreParams(checkMoreParams); + $(page).replaceWith($(resp).find(page)); + }, + error: function() {} + }); +}; + /** * Reload specific field element_type and fk_element * @@ -163,3 +195,26 @@ window.saturne.utils.enforceMinMax = function(triggeredElement) { } } }; + +/** + * Check more parameters for manage visibility of element / remove elements + * + * @memberof Saturne_Utils + * + * @since 1.3.0 + * @version 1.3.0 + * + * @typedef {Object} RemoveAttrParams + * @property {string} element - Selector for the element + * @property {string} value - Attribute value to remove + * + * @param {Object} checkMoreParams - Object for managing custom parameters + * @property {RemoveAttrParams} checkMoreParams.removeAttr - Information to remove attribute + * + * @returns {void} + */ +window.saturne.utils.checkMoreParams = function(checkMoreParams) { + if (checkMoreParams && checkMoreParams.removeAttr) { + $(checkMoreParams.removeAttr.element).removeAttr(checkMoreParams.removeAttr.value); + } +}; diff --git a/js/saturne.min.js b/js/saturne.min.js index fb4fb638..5734a606 100644 --- a/js/saturne.min.js +++ b/js/saturne.min.js @@ -1 +1 @@ -window.saturne||(window.saturne={},window.saturne.scriptsLoaded=!1),window.saturne.scriptsLoaded||(window.saturne.init=function(){window.saturne.load_list_script()},window.saturne.load_list_script=function(){if(!window.saturne.scriptsLoaded){var e=void 0,t=void 0;for(e in window.saturne)for(t in window.saturne[e].init&&window.saturne[e].init(),window.saturne[e])window.saturne[e]&&window.saturne[e][t]&&window.saturne[e][t].init&&window.saturne[e][t].init();window.saturne.scriptsLoaded=!0}},window.saturne.refresh=function(){var e=void 0,t=void 0;for(e in window.saturne)for(t in window.saturne[e].refresh&&window.saturne[e].refresh(),window.saturne[e])window.saturne[e]&&window.saturne[e][t]&&window.saturne[e][t].refresh&&window.saturne[e][t].refresh()},$(document).ready(window.saturne.init)),window.saturne.button={},window.saturne.button.init=function(){window.saturne.button.event()},window.saturne.button.event=function(){$(document).on("click",".wpeo-button:submit, .wpeo-button.auto-download",window.saturne.button.addLoader)},window.saturne.button.addLoader=function(){window.saturne.loader.display($(this)),$(this).toggleClass("button-blue button-disable")},window.saturne.dashboard={},window.saturne.dashboard.init=function(){window.saturne.dashboard.event()},window.saturne.dashboard.event=function(){$(document).on("change",".add-dashboard-widget",window.saturne.dashboard.addDashBoardInfo),$(document).on("click",".close-dashboard-widget",window.saturne.dashboard.closeDashBoardInfo),$(document).on("click",".select-dataset-dashboard-info",window.saturne.dashboard.selectDatasetDashboardInfo)},window.saturne.dashboard.addDashBoardInfo=function(){var e=document.getElementById("dashBoardForm"),e=new FormData(e).get("boxcombo"),t=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+o+"action=adddashboardinfo&token="+t,type:"POST",processData:!1,data:JSON.stringify({dashboardWidgetName:e}),contentType:!1,success:function(){window.location.reload()},error:function(){}})},window.saturne.dashboard.closeDashBoardInfo=function(){let t=$(this);var e=t.attr("data-widgetname"),o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+n+"action=closedashboardinfo&token="+o,type:"POST",processData:!1,data:JSON.stringify({dashboardWidgetName:e}),contentType:!1,success:function(e){t.closest(".box-flex-item").fadeOut(400),$(".add-widget-box").attr("style",""),$(".add-widget-box").html($(e).find(".add-widget-box").children())},error:function(){}})},window.saturne.dashboard.selectDatasetDashboardInfo=function(){var e=$("#search_userid").val(),t=$("#search_year").val(),o=$("#search_month").val(),n=window.saturne.toolbox.getToken(),a=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".fichecenter")),$.ajax({url:document.URL+a+"token="+n+"&search_userid="+e+"&search_year="+t+"&search_month="+o,type:"POST",processData:!1,contentType:!1,success:function(e){$(".fichecenter").replaceWith($(e).find(".fichecenter"))},error:function(){}})},window.saturne.document={},window.saturne.document.init=function(){window.saturne.document.event()},window.saturne.document.event=function(){$(document).on("click","#builddoc_generatebutton",window.saturne.document.displayLoader),$(document).on("click",".pdf-generation",window.saturne.document.displayLoader)},window.saturne.document.displayLoader=function(){window.saturne.loader.display($(this).closest(".div-table-responsive-no-min"))},window.saturne.dropdown={},window.saturne.dropdown.init=function(){window.saturne.dropdown.event()},window.saturne.dropdown.event=function(){$(document).on("keyup",window.saturne.dropdown.keyup),$(document).on("keypress",window.saturne.dropdown.keypress),$(document).on("click",".wpeo-dropdown:not(.dropdown-active) .dropdown-toggle:not(.disabled)",window.saturne.dropdown.open),$(document).on("click",".wpeo-dropdown.dropdown-active .saturne-dropdown-content",function(e){e.stopPropagation()}),$(document).on("click",".wpeo-dropdown.dropdown-active:not(.dropdown-force-display) .saturne-dropdown-content .dropdown-item",window.saturne.dropdown.close),$(document).on("click",".wpeo-dropdown.dropdown-active",function(e){window.saturne.dropdown.close(e),e.stopPropagation()}),$(document).on("click","body",window.saturne.dropdown.close)},window.saturne.dropdown.keyup=function(e){27===e.keyCode&&window.saturne.dropdown.close()},window.saturne.dropdown.keypress=function(e){var t=localStorage.currentString||"",o=localStorage.keypressNumber?+localStorage.keypressNumber:0;t+=e.keyCode,++o,localStorage.setItem("currentString",t),localStorage.setItem("keypressNumber",o),9body{"+e+o+e+t+o+t)},window.saturne.dropdown.open=function(e){var o=$(this),n=o.find("[data-fa-i2svg]"),t={},a=void 0;window.saturne.dropdown.close(e,$(this)),o.attr("data-action")?(window.saturne.loader.display(o),o.get_data(function(e){for(a in t)e[a]||(e[a]=t[a]);window.saturne.request.send(o,e,function(e,t){o.closest(".wpeo-dropdown").find(".saturne-dropdown-content").html(t.data.view),o.closest(".wpeo-dropdown").addClass("dropdown-active"),n&&window.saturne.dropdown.toggleAngleClass(n)})})):(o.closest(".wpeo-dropdown").addClass("dropdown-active"),n&&window.saturne.dropdown.toggleAngleClass(n)),e.stopPropagation()},window.saturne.dropdown.close=function(e){var o=$(this);$(".wpeo-dropdown.dropdown-active:not(.no-close)").each(function(){var e=$(this),t={close:!0};o.trigger("dropdown-before-close",[e,o,t]),t.close&&(e.removeClass("dropdown-active"),t=$(this).find(".dropdown-toggle").find("[data-fa-i2svg]"))&&window.saturne.dropdown.toggleAngleClass(t)})},window.saturne.dropdown.toggleAngleClass=function(e){e.hasClass("fa-caret-down")||e.hasClass("fa-caret-up")?e.toggleClass("fa-caret-down").toggleClass("fa-caret-up"):e.hasClass("fa-caret-circle-down")||e.hasClass("fa-caret-circle-up")?e.toggleClass("fa-caret-circle-down").toggleClass("fa-caret-circle-up"):e.hasClass("fa-angle-down")||e.hasClass("fa-angle-up")?e.toggleClass("fa-angle-down").toggleClass("fa-angle-up"):(e.hasClass("fa-chevron-circle-down")||e.hasClass("fa-chevron-circle-up"))&&e.toggleClass("fa-chevron-circle-down").toggleClass("fa-chevron-circle-up")},window.saturne.keyEvent={},window.saturne.keyEvent.init=function(){window.saturne.keyEvent.event()},window.saturne.keyEvent.event=function(){$(document).on("keydown",window.saturne.keyEvent.modalActions),$(document).on("keyup",".url-container",window.saturne.keyEvent.checkUrlFormat),$(document).on("keydown",window.saturne.keyEvent.buttonActions)},window.saturne.keyEvent.modalActions=function(e){"Escape"===e.key&&$(this).find(".modal-active .modal-close .fas.fa-times").first().click(),"Enter"!==e.key||$("input, textarea").is(":focus")||$(this).find(".modal-active .modal-footer .wpeo-button").not(".button-disable").first().click()},window.saturne.keyEvent.checkUrlFormat=function(e){$(this).val().match(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi)?$(this).attr("style","border: solid; border-color: green"):0<$("input:focus").val().length&&$(this).attr("style","border: solid; border-color: red")},window.saturne.keyEvent.buttonActions=function(e){"Escape"===e.key&&$(this).find(".button-cancel").click(),"Enter"!==e.key||$("input, textarea").is(":focus")||$(this).find(".button-add").click(),$(e.target).is("input, textarea")||("Enter"===e.key&&$(this).find(".button_search").click(),e.shiftKey&&"Enter"===e.key&&$(this).find(".button_removefilter").click())},window.saturne.loader={},window.saturne.loader.init=function(){window.saturne.loader.event()},window.saturne.loader.event=function(){},window.saturne.loader.display=function(e){var t;e.hasClass("button-progress")?e.addClass("button-load"):(e.addClass("wpeo-loader"),t=$(''),e[0].loaderElement=t,e.append(e[0].loaderElement))},window.saturne.loader.remove=function(e){0"),i===a&&($(".wpeo-loader").removeClass("wpeo-loader"),$("#progressBarContainer").fadeOut(800),$("#progressBarContainer").find(".loader-spin").remove(),window.saturne.loader.display(n.find(".ecm-photo-list-content")),setTimeout(()=>{n.html($(e).find("#media_gallery").children()).promise().done(()=>{1==a&&($("#media_gallery").find(".save-photo").removeClass("button-disable"),$("#media_gallery").find(".clickable-photo0").addClass("clicked-photo")),($(e).find(".error-medias").length?($(".messageErrorSendPhoto").find(".notice-subtitle").html(m),$(".messageErrorSendPhoto")):$(".messageSuccessSendPhoto")).removeClass("hidden"),n.attr("data-from-id",r),n.attr("data-from-type",s),n.attr("data-from-subtype",l),n.attr("data-from-subdir",c),n.find(".wpeo-button").attr("value",r)})},800))}})})},window.saturne.mediaGallery.previewPhoto=function(e){var t=setInterval(function(){$(".ui-dialog").length&&(clearInterval(t),$(document).find(".ui-dialog").addClass("preview-photo"))},100)},window.saturne.mediaGallery.unlinkFile=function(e){e.preventDefault();var e=window.saturne.toolbox.getToken(),t=$(this).closest(".modal-active"),o=0<$(this).closest(".modal-active").length;let n=null,a=(n=(o?t:$(this).closest(".linked-medias")).find(".modal-options")).attr("data-from-subtype");var o=n.attr("data-from-type"),t=n.attr("data-from-subdir"),i=n.attr("data-from-id");let d=n.attr("data-photo-class");var r=$(this).closest(".media-container"),s=r.find(".file-path").val();let l=r.find(".file-name").val(),c=$(this).closest(".linked-medias").find(".media-gallery-favorite.favorite").closest(".media-container").find(".file-name").val();window.saturne.loader.display(r);r=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+r+"subaction=unlinkFile&token="+e,type:"POST",data:JSON.stringify({filepath:s,filename:l,objectSubtype:a,objectType:o,objectSubdir:t,objectId:i}),processData:!1,success:function(e){c==l&&(void 0!==d&&0"))[1].match(/>/)&&(o[1]=o[1].replace(/>/,"")),$(this).attr("title",o[1]),$(this).html(o[0])}),t.css("width","30px"),t.find(".blockvmenusearch").hide(),$("span.vmenu").attr("title"," Agrandir le menu"),$("span.vmenu").html($("span.vmenu").html()),$(this).find("span.vmenu").find(".fa-chevron-circle-left").removeClass("fa-chevron-circle-left").addClass("fa-chevron-circle-right"),localStorage.setItem("maximized","false")):0<$(this).find("span.vmenu").find(".fa-chevron-circle-right").length&&(e.each(function(){$(this).html($(this).html().replace(">","")+" "+$(this).attr("title"))}),t.css("width","188px"),t.find(".blockvmenusearch").show(),$("div.menu_titre").attr("style","width: 188px !important; cursor : pointer"),$("span.vmenu").attr("title"," Réduire le menu"),$("span.vmenu").html(' Réduire le menu'),localStorage.setItem("maximized","true"),$(this).find("span.vmenu").find(".fa-chevron-circle-right").removeClass("fa-chevron-circle-right").addClass("fa-chevron-circle-left"))},window.saturne.menu.setMenu=function(){var e,t,o;0<$(".blockvmenu.blockvmenulast .saturne-toggle-menu").length&&($(".blockvmenu.blockvmenulast .saturne-toggle-menu").closest(".menu_titre").attr("style","cursor:pointer ! important"),"false"==localStorage.maximized&&$("#id-left").attr("style","display:none !important"),"false"==localStorage.maximized&&(e="",t=$("#id-left").find("a.vmenu, font.vmenudisabled, span.vmenu, a.vsmenu"),o=$(document).find("div.vmenu"),t.each(function(){e=$(this).html().split(""),$(this).attr("title",e[1]),$(this).html(e[0]),console.log(e)}),$("#id-left").attr("style","display:block !important"),$("div.menu_titre").attr("style","width: 50px !important"),$("span.vmenu").attr("title"," Agrandir le menu"),$("span.vmenu").html($("span.vmenu").html()),$("span.vmenu").find(".fa-chevron-circle-left").removeClass("fa-chevron-circle-left").addClass("fa-chevron-circle-right"),o.css("width","30px"),o.find(".blockvmenusearch").hide()),localStorage.setItem("currentString",""),localStorage.setItem("keypressNumber",0))},window.saturne.modal={},window.saturne.modal.init=function(){window.saturne.modal.event()},window.saturne.modal.event=function(){$(document).on("click",".modal-close, .modal-active:not(.modal-container)",window.saturne.modal.closeModal),$(document).on("click",".modal-open",window.saturne.modal.openModal),$(document).on("click",".modal-refresh",window.saturne.modal.refreshModal),window.saturne.modal.loadSignatureModal()},window.saturne.modal.openModal=function(e){var t=$(this).find(".modal-options"),o=t.attr("data-modal-to-open"),n=t.attr("data-from-id"),a=t.attr("data-from-type"),i=t.attr("data-from-subtype"),d=t.attr("data-from-subdir"),r=t.attr("data-from-module"),t=t.attr("data-photo-class");let s="";s=document.URL.match(/#/)?document.URL.split(/#/)[0]:document.URL,history.pushState({path:document.URL},"",s),$("#"+o).attr("data-from-id",n),$("#"+o).attr("data-from-type",a),$("#"+o).attr("data-from-subtype",i),$("#"+o).attr("data-from-subdir",d),$("#"+o).attr("data-photo-class",t),o.match(/signature/)&&window.saturne.signature.modalSignatureOpened($(this)),r&&"function"==typeof window.saturne.modal.addMoreOpenModalData&&window.saturne.modal.addMoreOpenModalData(o,$(this)),$("#"+o).find(".wpeo-button").attr("value",n),$("#"+o).addClass("modal-active"),$(".notice").addClass("hidden")},window.saturne.modal.closeModal=function(e){$("input:focus").length<1&&$("textarea:focus").length<1&&($(e.target).hasClass("modal-active")||$(e.target).hasClass("modal-close")||$(e.target).parent().hasClass("modal-close"))&&($(this).closest(".modal-active").removeClass("modal-active"),$(".clicked-photo").attr("style",""),$(".clicked-photo").removeClass("clicked-photo"),$(".notice").addClass("hidden"))},window.saturne.modal.refreshModal=function(e){window.location.reload()},window.saturne.modal.loadSignatureModal=function(){0{$(this).attr("class","fas fa-check copy-signatureurl"),$(this).css("color","#59ed9c"),$(this).closest(".copy-signatureurl-container").find(".copied-to-clipboard").attr("style",""),$(this).closest(".copy-signatureurl-container").find(".copied-to-clipboard").fadeOut(2500,()=>{$(this).attr("class","fas fa-clipboard copy-signatureurl"),$(this).css("color","#666")})})},window.saturne.signature.setAttendance=function(){var e=$(this).closest(".attendance-container").find('input[name="signatoryID"]').val(),t=$(this).attr("value"),o=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL),a=String(document.location.href).replace(/#formmail/,"");$.ajax({url:a+n+"action=set_attendance&token="+o,type:"POST",processData:!1,contentType:"",data:JSON.stringify({signatoryID:e,attendance:t}),success:function(e){$(".signatures-container").html($(e).find(".signatures-container"))},error:function(){}})},window.saturne.toolbox={},window.saturne.toolbox.init=function(){},window.saturne.toolbox.getQuerySeparator=function(e){return e.match(/\?/)?"&":"?"},window.saturne.toolbox.getToken=function(){return $('input[name="token"]').val()},window.saturne.tooltip||(window.saturne.tooltip={},window.saturne.tooltip.init=function(){window.saturne.tooltip.event()},window.saturne.tooltip.tabChanged=function(){$(".wpeo-tooltip").remove()},window.saturne.tooltip.event=function(){$(document).on("mouseenter touchstart",'.wpeo-tooltip-event:not([data-tooltip-persist="true"])',window.saturne.tooltip.onEnter),$(document).on("mouseleave touchend",'.wpeo-tooltip-event:not([data-tooltip-persist="true"])',window.saturne.tooltip.onOut)},window.saturne.tooltip.onEnter=function(e){window.saturne.tooltip.display($(this))},window.saturne.tooltip.onOut=function(e){window.saturne.tooltip.remove($(this))},window.saturne.tooltip.display=function(e){var t=$(e).data("direction")?$(e).data("direction"):"top",o=$(''+$(e).attr("aria-label")+""),n=($(e).position(),$(e).offset()),a=($(e)[0].tooltipElement=o,$("body").append($(e)[0].tooltipElement),$(e).data("color")&&o.addClass("tooltip-"+$(e).data("color")),0),i=0;switch($(e).data("direction")){case"left":a=n.top-o.outerHeight()/2+$(e).outerHeight()/2+"px",i=n.left-o.outerWidth()-10+3+"px";break;case"right":a=n.top-o.outerHeight()/2+$(e).outerHeight()/2+"px",i=n.left+$(e).outerWidth()+8+"px";break;case"bottom":a=n.top+$(e).height()+10+10+"px",i=n.left-o.outerWidth()/2+$(e).outerWidth()/2+"px";break;default:a=n.top-o.outerHeight()-4+"px",i=n.left-o.outerWidth()/2+$(e).outerWidth()/2+"px"}o.css({top:a,left:i,opacity:1}),$(e).on("remove",function(){$($(e)[0].tooltipElement).remove()})},window.saturne.tooltip.remove=function(e){$(e)[0]&&$(e)[0].tooltipElement&&$($(e)[0].tooltipElement).remove()}),window.saturne.utils={},window.saturne.utils.init=function(){window.saturne.utils.event()},window.saturne.utils.event=function(){$(document).on("mouseenter",".move-line.ui-sortable-handle",window.saturne.utils.draganddrop),$(document).on("change","#element_type",window.saturne.utils.reloadField)},window.saturne.utils.draganddrop=function(){$(this).css("cursor","pointer"),$("#tablelines tbody").sortable(),$("#tablelines tbody").sortable({handle:".move-line",connectWith:"#tablelines tbody .line-row",tolerance:"intersect",over:function(){$(this).css("cursor","grabbing")},stop:function(){$(this).css("cursor","default");var e=$(".fiche").find('input[name="token"]').val();let t="&",o=(document.URL.match(/action=/)&&(document.URL=document.URL.split(/\?/)[0],t="?"),[]);$(".line-row").each(function(){o.push($(this).attr("id"))}),$.ajax({url:document.URL+t+"action=moveLine&token="+e,type:"POST",data:JSON.stringify({order:o}),processData:!1,contentType:!1,success:function(){},error:function(){}})}})},window.saturne.utils.reloadField=function(){var e=$(this).val(),t=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".field_element_type")),window.saturne.loader.display($(".field_fk_element")),$.ajax({url:document.URL+o+"element_type="+e+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(e){$(".field_element_type").replaceWith($(e).find(".field_element_type")),$(".field_fk_element").replaceWith($(e).find(".field_fk_element"))},error:function(){}})},window.saturne.utils.enforceMinMax=function(e){""!==e.value&&(parseInt(e.value)parseInt(e.max))&&(e.value=e.max)}; \ No newline at end of file +window.saturne||(window.saturne={},window.saturne.scriptsLoaded=!1),window.saturne.scriptsLoaded||(window.saturne.init=function(){window.saturne.load_list_script()},window.saturne.load_list_script=function(){if(!window.saturne.scriptsLoaded){var e=void 0,t=void 0;for(e in window.saturne)for(t in window.saturne[e].init&&window.saturne[e].init(),window.saturne[e])window.saturne[e]&&window.saturne[e][t]&&window.saturne[e][t].init&&window.saturne[e][t].init();window.saturne.scriptsLoaded=!0}},window.saturne.refresh=function(){var e=void 0,t=void 0;for(e in window.saturne)for(t in window.saturne[e].refresh&&window.saturne[e].refresh(),window.saturne[e])window.saturne[e]&&window.saturne[e][t]&&window.saturne[e][t].refresh&&window.saturne[e][t].refresh()},$(document).ready(window.saturne.init)),window.saturne.button={},window.saturne.button.init=function(){window.saturne.button.event()},window.saturne.button.event=function(){$(document).on("click",".wpeo-button:submit, .wpeo-button.auto-download",window.saturne.button.addLoader)},window.saturne.button.addLoader=function(){window.saturne.loader.display($(this)),$(this).toggleClass("button-blue button-disable")},window.saturne.dashboard={},window.saturne.dashboard.init=function(){window.saturne.dashboard.event()},window.saturne.dashboard.event=function(){$(document).on("change",".add-dashboard-widget",window.saturne.dashboard.addDashBoardInfo),$(document).on("click",".close-dashboard-widget",window.saturne.dashboard.closeDashBoardInfo),$(document).on("click",".select-dataset-dashboard-info",window.saturne.dashboard.selectDatasetDashboardInfo)},window.saturne.dashboard.addDashBoardInfo=function(){var e=document.getElementById("dashBoardForm"),e=new FormData(e).get("boxcombo"),t=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+n+"action=adddashboardinfo&token="+t,type:"POST",processData:!1,data:JSON.stringify({dashboardWidgetName:e}),contentType:!1,success:function(){window.location.reload()},error:function(){}})},window.saturne.dashboard.closeDashBoardInfo=function(){let t=$(this);var e=t.attr("data-widgetname"),n=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+o+"action=closedashboardinfo&token="+n,type:"POST",processData:!1,data:JSON.stringify({dashboardWidgetName:e}),contentType:!1,success:function(e){t.closest(".box-flex-item").fadeOut(400),$(".add-widget-box").attr("style",""),$(".add-widget-box").html($(e).find(".add-widget-box").children())},error:function(){}})},window.saturne.dashboard.selectDatasetDashboardInfo=function(){var e=$("#search_userid").val(),t=$("#search_year").val(),n=$("#search_month").val(),o=window.saturne.toolbox.getToken(),a=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".fichecenter")),$.ajax({url:document.URL+a+"token="+o+"&search_userid="+e+"&search_year="+t+"&search_month="+n,type:"POST",processData:!1,contentType:!1,success:function(e){$(".fichecenter").replaceWith($(e).find(".fichecenter"))},error:function(){}})},window.saturne.document={},window.saturne.document.init=function(){window.saturne.document.event()},window.saturne.document.event=function(){$(document).on("click","#builddoc_generatebutton",window.saturne.document.displayLoader),$(document).on("click",".pdf-generation",window.saturne.document.displayLoader),$(document).on("click",".download-template",window.saturne.document.autoDownloadTemplate)},window.saturne.document.displayLoader=function(){window.saturne.loader.display($(this).closest(".div-table-responsive-no-min"))},window.saturne.document.autoDownloadTemplate=function(){let t=window.saturne.toolbox.getToken();var e=document.URL.replace(/#.*$/,"");let n=window.saturne.toolbox.getQuerySeparator(e),o=$(this).closest(".file-generation");var a=o.find(".template-type").attr("value");let i=o.find(".template-name").attr("value");$.ajax({url:e+n+"action=download_template&filename="+i+"&type="+a+"&token="+t,type:"POST",success:function(){var e=o.find(".template-path").attr("value");window.saturne.signature.download(e+i,i),$.ajax({url:document.URL+n+"action=remove_file&filename="+i+"&token="+t,type:"POST",success:function(){},error:function(){}})},error:function(){}})},window.saturne.dropdown={},window.saturne.dropdown.init=function(){window.saturne.dropdown.event()},window.saturne.dropdown.event=function(){$(document).on("keyup",window.saturne.dropdown.keyup),$(document).on("keypress",window.saturne.dropdown.keypress),$(document).on("click",".wpeo-dropdown:not(.dropdown-active) .dropdown-toggle:not(.disabled)",window.saturne.dropdown.open),$(document).on("click",".wpeo-dropdown.dropdown-active .saturne-dropdown-content",function(e){e.stopPropagation()}),$(document).on("click",".wpeo-dropdown.dropdown-active:not(.dropdown-force-display) .saturne-dropdown-content .dropdown-item",window.saturne.dropdown.close),$(document).on("click",".wpeo-dropdown.dropdown-active",function(e){window.saturne.dropdown.close(e),e.stopPropagation()}),$(document).on("click","body",window.saturne.dropdown.close)},window.saturne.dropdown.keyup=function(e){27===e.keyCode&&window.saturne.dropdown.close()},window.saturne.dropdown.keypress=function(e){var t=localStorage.currentString||"",n=localStorage.keypressNumber?+localStorage.keypressNumber:0;t+=e.keyCode,++n,localStorage.setItem("currentString",t),localStorage.setItem("keypressNumber",n),9body{"+e+n+e+t+n+t)},window.saturne.dropdown.open=function(e){var n=$(this),o=n.find("[data-fa-i2svg]"),t={},a=void 0;window.saturne.dropdown.close(e,$(this)),n.attr("data-action")?(window.saturne.loader.display(n),n.get_data(function(e){for(a in t)e[a]||(e[a]=t[a]);window.saturne.request.send(n,e,function(e,t){n.closest(".wpeo-dropdown").find(".saturne-dropdown-content").html(t.data.view),n.closest(".wpeo-dropdown").addClass("dropdown-active"),o&&window.saturne.dropdown.toggleAngleClass(o)})})):(n.closest(".wpeo-dropdown").addClass("dropdown-active"),o&&window.saturne.dropdown.toggleAngleClass(o)),e.stopPropagation()},window.saturne.dropdown.close=function(e){var n=$(this);$(".wpeo-dropdown.dropdown-active:not(.no-close)").each(function(){var e=$(this),t={close:!0};n.trigger("dropdown-before-close",[e,n,t]),t.close&&(e.removeClass("dropdown-active"),t=$(this).find(".dropdown-toggle").find("[data-fa-i2svg]"))&&window.saturne.dropdown.toggleAngleClass(t)})},window.saturne.dropdown.toggleAngleClass=function(e){e.hasClass("fa-caret-down")||e.hasClass("fa-caret-up")?e.toggleClass("fa-caret-down").toggleClass("fa-caret-up"):e.hasClass("fa-caret-circle-down")||e.hasClass("fa-caret-circle-up")?e.toggleClass("fa-caret-circle-down").toggleClass("fa-caret-circle-up"):e.hasClass("fa-angle-down")||e.hasClass("fa-angle-up")?e.toggleClass("fa-angle-down").toggleClass("fa-angle-up"):(e.hasClass("fa-chevron-circle-down")||e.hasClass("fa-chevron-circle-up"))&&e.toggleClass("fa-chevron-circle-down").toggleClass("fa-chevron-circle-up")},window.saturne.keyEvent={},window.saturne.keyEvent.init=function(){window.saturne.keyEvent.event()},window.saturne.keyEvent.event=function(){$(document).on("keydown",window.saturne.keyEvent.modalActions),$(document).on("keyup",".url-container",window.saturne.keyEvent.checkUrlFormat),$(document).on("keydown",window.saturne.keyEvent.buttonActions)},window.saturne.keyEvent.modalActions=function(e){"Escape"===e.key&&$(this).find(".modal-active .modal-close .fas.fa-times").first().click(),"Enter"!==e.key||$("input, textarea").is(":focus")||$(this).find(".modal-active .modal-footer .wpeo-button").not(".button-disable").first().click()},window.saturne.keyEvent.checkUrlFormat=function(e){$(this).val().match(/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi)?$(this).attr("style","border: solid; border-color: green"):0<$("input:focus").val().length&&$(this).attr("style","border: solid; border-color: red")},window.saturne.keyEvent.buttonActions=function(e){"Escape"===e.key&&$(this).find(".button-cancel").click(),"Enter"!==e.key||$("input, textarea").is(":focus")||$(this).find(".button-add").click(),$(e.target).is("input, textarea")||("Enter"===e.key&&$(this).find(".button_search").click(),e.shiftKey&&"Enter"===e.key&&$(this).find(".button_removefilter").click())},window.saturne.loader={},window.saturne.loader.init=function(){window.saturne.loader.event()},window.saturne.loader.event=function(){},window.saturne.loader.display=function(e){var t;e.hasClass("button-progress")?e.addClass("button-load"):(e.addClass("wpeo-loader"),t=$(''),e[0].loaderElement=t,e.append(e[0].loaderElement))},window.saturne.loader.remove=function(e){0"),i===a&&($(".wpeo-loader").removeClass("wpeo-loader"),$("#progressBarContainer").fadeOut(800),$("#progressBarContainer").find(".loader-spin").remove(),window.saturne.loader.display(o.find(".ecm-photo-list-content")),setTimeout(()=>{o.html($(e).find("#media_gallery").children()).promise().done(()=>{1==a&&($("#media_gallery").find(".save-photo").removeClass("button-disable"),$("#media_gallery").find(".clickable-photo0").addClass("clicked-photo")),($(e).find(".error-medias").length?($(".messageErrorSendPhoto").find(".notice-subtitle").html(m),$(".messageErrorSendPhoto")):$(".messageSuccessSendPhoto")).removeClass("hidden"),o.attr("data-from-id",r),o.attr("data-from-type",s),o.attr("data-from-subtype",l),o.attr("data-from-subdir",c),o.find(".wpeo-button").attr("value",r)})},800))}})})},window.saturne.mediaGallery.previewPhoto=function(e){var t=setInterval(function(){$(".ui-dialog").length&&(clearInterval(t),$(document).find(".ui-dialog").addClass("preview-photo"))},100)},window.saturne.mediaGallery.unlinkFile=function(e){e.preventDefault();var e=window.saturne.toolbox.getToken(),t=$(this).closest(".modal-active"),n=0<$(this).closest(".modal-active").length;let o=null,a=(o=(n?t:$(this).closest(".linked-medias")).find(".modal-options")).attr("data-from-subtype");var n=o.attr("data-from-type"),t=o.attr("data-from-subdir"),i=o.attr("data-from-id");let d=o.attr("data-photo-class");var r=$(this).closest(".media-container"),s=r.find(".file-path").val();let l=r.find(".file-name").val(),c=$(this).closest(".linked-medias").find(".media-gallery-favorite.favorite").closest(".media-container").find(".file-name").val();window.saturne.loader.display(r);r=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+r+"subaction=unlinkFile&token="+e,type:"POST",data:JSON.stringify({filepath:s,filename:l,objectSubtype:a,objectType:n,objectSubdir:t,objectId:i}),processData:!1,success:function(e){c==l&&(void 0!==d&&0"))[1].match(/>/)&&(n[1]=n[1].replace(/>/,"")),$(this).attr("title",n[1]),$(this).html(n[0])}),t.css("width","30px"),t.find(".blockvmenusearch").hide(),$("span.vmenu").attr("title"," Agrandir le menu"),$("span.vmenu").html($("span.vmenu").html()),$(this).find("span.vmenu").find(".fa-chevron-circle-left").removeClass("fa-chevron-circle-left").addClass("fa-chevron-circle-right"),localStorage.setItem("maximized","false")):0<$(this).find("span.vmenu").find(".fa-chevron-circle-right").length&&(e.each(function(){$(this).html($(this).html().replace(">","")+" "+$(this).attr("title"))}),t.css("width","188px"),t.find(".blockvmenusearch").show(),$("div.menu_titre").attr("style","width: 188px !important; cursor : pointer"),$("span.vmenu").attr("title"," Réduire le menu"),$("span.vmenu").html(' Réduire le menu'),localStorage.setItem("maximized","true"),$(this).find("span.vmenu").find(".fa-chevron-circle-right").removeClass("fa-chevron-circle-right").addClass("fa-chevron-circle-left"))},window.saturne.menu.setMenu=function(){var e,t,n;0<$(".blockvmenu.blockvmenulast .saturne-toggle-menu").length&&($(".blockvmenu.blockvmenulast .saturne-toggle-menu").closest(".menu_titre").attr("style","cursor:pointer ! important"),"false"==localStorage.maximized&&$("#id-left").attr("style","display:none !important"),"false"==localStorage.maximized&&(e="",t=$("#id-left").find("a.vmenu, font.vmenudisabled, span.vmenu, a.vsmenu"),n=$(document).find("div.vmenu"),t.each(function(){e=$(this).html().split(""),$(this).attr("title",e[1]),$(this).html(e[0]),console.log(e)}),$("#id-left").attr("style","display:block !important"),$("div.menu_titre").attr("style","width: 50px !important"),$("span.vmenu").attr("title"," Agrandir le menu"),$("span.vmenu").html($("span.vmenu").html()),$("span.vmenu").find(".fa-chevron-circle-left").removeClass("fa-chevron-circle-left").addClass("fa-chevron-circle-right"),n.css("width","30px"),n.find(".blockvmenusearch").hide()),localStorage.setItem("currentString",""),localStorage.setItem("keypressNumber",0))},window.saturne.modal={},window.saturne.modal.init=function(){window.saturne.modal.event()},window.saturne.modal.event=function(){$(document).on("click",".modal-close, .modal-active:not(.modal-container)",window.saturne.modal.closeModal),$(document).on("click",".modal-open",window.saturne.modal.openModal),$(document).on("click",".modal-refresh",window.saturne.modal.refreshModal)},window.saturne.modal.openModal=function(e){var t=$(this).find(".modal-options"),n=t.attr("data-modal-to-open"),o=t.attr("data-from-id"),a=t.attr("data-from-type"),i=t.attr("data-from-subtype"),d=t.attr("data-from-subdir"),r=t.attr("data-from-module"),t=t.attr("data-photo-class");let s="";s=document.URL.match(/#/)?document.URL.split(/#/)[0]:document.URL,history.pushState({path:document.URL},"",s),$("#"+n).attr("data-from-id",o),$("#"+n).attr("data-from-type",a),$("#"+n).attr("data-from-subtype",i),$("#"+n).attr("data-from-subdir",d),$("#"+n).attr("data-photo-class",t),r&&"function"==typeof window.saturne.modal.addMoreOpenModalData&&window.saturne.modal.addMoreOpenModalData(n,$(this)),$("#"+n).find(".wpeo-button").attr("value",o),$("#"+n).addClass("modal-active"),$(".notice").addClass("hidden")},window.saturne.modal.closeModal=function(e){$("input:focus").length<1&&$("textarea:focus").length<1&&($(e.target).hasClass("modal-active")||$(e.target).hasClass("modal-close")||$(e.target).parent().hasClass("modal-close"))&&($(this).closest(".modal-active").removeClass("modal-active"),$(".clicked-photo").attr("style",""),$(".clicked-photo").removeClass("clicked-photo"),$(".notice").addClass("hidden"))},window.saturne.modal.refreshModal=function(e){window.location.reload()},window.saturne.notice={},window.saturne.notice.init=function(){window.saturne.notice.event()},window.saturne.notice.event=function(){$(document).on("click",".notice-close",window.saturne.notice.closeNotice)},window.saturne.notice.closeNotice=function(){var e,t;$(this).closest(".notice").fadeOut(function(){$(this).closest(".notice").addClass("hidden")}),$(this).hasClass("notice-close-forever")&&(e=window.saturne.toolbox.getToken(),t=window.saturne.toolbox.getQuerySeparator(document.URL),$.ajax({url:document.URL+t+"action=closenotice&token="+e,type:"POST"}))},window.saturne.object={},window.saturne.object.init=function(){window.saturne.object.event()},window.saturne.object.event=function(){$(document).on("click",".toggle-object-infos",window.saturne.object.toggleObjectInfos)},window.saturne.object.toggleObjectInfos=function(){$(this).hasClass("fa-minus-square")?($(this).removeClass("fa-minus-square").addClass("fa-caret-square-down"),$(this).closest(".fiche").find(".fichecenter.object-infos").addClass("hidden")):($(this).removeClass("fa-caret-square-down").addClass("fa-minus-square"),$(this).closest(".fiche").find(".fichecenter.object-infos").removeClass("hidden"))},window.saturne.signature={},window.saturne.signature.canvas={},window.saturne.signature.init=function(){window.saturne.signature.event()},window.saturne.signature.event=function(){$(document).on("click",".signature-erase",window.saturne.signature.clearCanvas),$(document).on("click",".signature-validate:not(.button-disable)",window.saturne.signature.createSignature),$(document).on("click",".auto-download",window.saturne.signature.autoDownloadSpecimen),$(document).on("click",".copy-signatureurl",window.saturne.signature.copySignatureUrlClipboard),$(document).on("click",".set-attendance",window.saturne.signature.setAttendance),document.querySelector('script[src*="signature-pad.min.js"]')&&window.saturne.signature.drawSignatureOnCanvas(),$(document).on("touchstart mousedown",".canvas-signature",function(){window.saturne.toolbox.removeAddButtonClass("signature-validate","button-grey button-disable","button-blue")})},window.saturne.signature.drawSignatureOnCanvas=function(){var e;window.saturne.signature.canvas=document.querySelector(".canvas-signature"),window.saturne.signature.canvas&&(e=Math.max(window.devicePixelRatio||1,1),window.saturne.signature.canvas.signaturePad=new SignaturePad(window.saturne.signature.canvas,{penColor:"rgb(0, 0, 0)"}),window.saturne.signature.canvas.width=window.saturne.signature.canvas.offsetWidth*e,window.saturne.signature.canvas.height=window.saturne.signature.canvas.offsetHeight*e,window.saturne.signature.canvas.getContext("2d").scale(e,e))},window.saturne.signature.clearCanvas=function(){window.saturne.signature.canvas.signaturePad.clear(),window.saturne.toolbox.removeAddButtonClass("signature-validate","button-blue","button-grey button-disable")},window.saturne.signature.createSignature=function(){var e,t=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.signature.canvas.signaturePad.isEmpty()||(e=window.saturne.signature.canvas.toDataURL()),window.saturne.loader.display($(this)),$.ajax({url:document.URL+n+"action=add_signature&token="+t,type:"POST",processData:!1,contentType:"application/octet-stream",data:JSON.stringify({signature:e}),success:function(e){!0===$(".public-card__container").data("public-interface")?($(".card__confirmation").removeAttr("style"),$(".signature-confirmation-close").attr("onclick","window.close()"),$(".public-card__container").replaceWith($(e).find(".public-card__container"))):window.location.reload()},error:function(){}})},window.saturne.signature.download=function(e,t){var n=document.createElement("a");n.href=e,n.setAttribute("download",t),n.click()},window.saturne.signature.autoDownloadSpecimen=function(){let o=$(this).closest(".file-generation"),a=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+i+"action=builddoc&token="+a,type:"POST",success:function(e){var t=o.find(".specimen-name").attr("data-specimen-name"),n=o.find(".specimen-path").attr("data-specimen-path");window.saturne.signature.download(n+t,t),$(".file-generation").replaceWith($(e).find(".file-generation")),$.ajax({url:document.URL+i+"action=remove_file&token="+a,type:"POST",success:function(){},error:function(){}})},error:function(){}})},window.saturne.signature.copySignatureUrlClipboard=function(){var e=$(this).attr("data-signature-url");navigator.clipboard.writeText(e).then(()=>{$(this).attr("class","fas fa-check copy-signatureurl"),$(this).css("color","#59ed9c"),$(this).closest(".copy-signatureurl-container").find(".copied-to-clipboard").attr("style",""),$(this).closest(".copy-signatureurl-container").find(".copied-to-clipboard").fadeOut(2500,()=>{$(this).attr("class","fas fa-clipboard copy-signatureurl"),$(this).css("color","#666")})})},window.saturne.signature.setAttendance=function(){var e=$(this).closest(".attendance-container").find('input[name="signatoryID"]').val(),t=$(this).attr("value"),n=window.saturne.toolbox.getToken(),o=window.saturne.toolbox.getQuerySeparator(document.URL),a=String(document.location.href).replace(/#formmail/,"");$.ajax({url:a+o+"action=set_attendance&token="+n,type:"POST",processData:!1,contentType:"",data:JSON.stringify({signatoryID:e,attendance:t}),success:function(e){$(".signatures-container").html($(e).find(".signatures-container"))},error:function(){}})},window.saturne.toolbox={},window.saturne.toolbox.init=function(){},window.saturne.toolbox.getQuerySeparator=function(e){return e.match(/\?/)?"&":"?"},window.saturne.toolbox.getToken=function(){return $('input[name="token"]').val()},window.saturne.toolbox.toggleButtonClass=function(e,t){$("."+e).toggleClass(t)},window.saturne.toolbox.removeAddButtonClass=function(e,t,n){$("."+e).removeClass(t).addClass(n)},window.saturne.tooltip||(window.saturne.tooltip={},window.saturne.tooltip.init=function(){window.saturne.tooltip.event()},window.saturne.tooltip.tabChanged=function(){$(".wpeo-tooltip").remove()},window.saturne.tooltip.event=function(){$(document).on("mouseenter touchstart",'.wpeo-tooltip-event:not([data-tooltip-persist="true"])',window.saturne.tooltip.onEnter),$(document).on("mouseleave touchend",'.wpeo-tooltip-event:not([data-tooltip-persist="true"])',window.saturne.tooltip.onOut)},window.saturne.tooltip.onEnter=function(e){window.saturne.tooltip.display($(this))},window.saturne.tooltip.onOut=function(e){window.saturne.tooltip.remove($(this))},window.saturne.tooltip.display=function(e){var t=$(e).data("direction")?$(e).data("direction"):"top",n=$(''+$(e).attr("aria-label")+""),o=($(e).position(),$(e).offset()),a=($(e)[0].tooltipElement=n,$("body").append($(e)[0].tooltipElement),$(e).data("color")&&n.addClass("tooltip-"+$(e).data("color")),0),i=0;switch($(e).data("direction")){case"left":a=o.top-n.outerHeight()/2+$(e).outerHeight()/2+"px",i=o.left-n.outerWidth()-10+3+"px";break;case"right":a=o.top-n.outerHeight()/2+$(e).outerHeight()/2+"px",i=o.left+$(e).outerWidth()+8+"px";break;case"bottom":a=o.top+$(e).height()+10+10+"px",i=o.left-n.outerWidth()/2+$(e).outerWidth()/2+"px";break;default:a=o.top-n.outerHeight()-4+"px",i=o.left-n.outerWidth()/2+$(e).outerWidth()/2+"px"}n.css({top:a,left:i,opacity:1}),$(e).on("remove",function(){$($(e)[0].tooltipElement).remove()})},window.saturne.tooltip.remove=function(e){$(e)[0]&&$(e)[0].tooltipElement&&$($(e)[0].tooltipElement).remove()}),window.saturne.utils={},window.saturne.utils.init=function(){window.saturne.utils.event()},window.saturne.utils.event=function(){$(document).on("mouseenter",".move-line.ui-sortable-handle",window.saturne.utils.draganddrop),$(document).on("change","#element_type",window.saturne.utils.reloadField)},window.saturne.utils.draganddrop=function(){$(this).css("cursor","pointer"),$("#tablelines tbody").sortable(),$("#tablelines tbody").sortable({handle:".move-line",connectWith:"#tablelines tbody .line-row",tolerance:"intersect",over:function(){$(this).css("cursor","grabbing")},stop:function(){$(this).css("cursor","default");var e=$(".fiche").find('input[name="token"]').val();let t="&",n=(document.URL.match(/action=/)&&(document.URL=document.URL.split(/\?/)[0],t="?"),[]);$(".line-row").each(function(){n.push($(this).attr("id"))}),$.ajax({url:document.URL+t+"action=moveLine&token="+e,type:"POST",data:JSON.stringify({order:n}),processData:!1,contentType:!1,success:function(){},error:function(){}})}})},window.saturne.utils.reloadPage=function(e,t,n,o){var a=window.saturne.toolbox.getToken(),i=window.saturne.toolbox.getQuerySeparator(document.URL);$.ajax({url:document.URL+i+"action="+e+n+"&token="+a,type:"POST",processData:!1,contentType:!1,success:function(e){window.saturne.utils.checkMoreParams(o),$(t).replaceWith($(e).find(t))},error:function(){}})},window.saturne.utils.reloadField=function(){var e=$(this).val(),t=window.saturne.toolbox.getToken(),n=window.saturne.toolbox.getQuerySeparator(document.URL);window.saturne.loader.display($(".field_element_type")),window.saturne.loader.display($(".field_fk_element")),$.ajax({url:document.URL+n+"element_type="+e+"&token="+t,type:"POST",processData:!1,contentType:!1,success:function(e){$(".field_element_type").replaceWith($(e).find(".field_element_type")),$(".field_fk_element").replaceWith($(e).find(".field_fk_element"))},error:function(){}})},window.saturne.utils.enforceMinMax=function(e){""!==e.value&&(parseInt(e.value)parseInt(e.max))&&(e.value=e.max)},window.saturne.utils.checkMoreParams=function(e){e&&e.removeAttr&&$(e.removeAttr.element).removeAttr(e.removeAttr.value)}; \ No newline at end of file diff --git a/langs/en_US/saturne.lang b/langs/en_US/saturne.lang index d90ced41..d51a54b2 100644 --- a/langs/en_US/saturne.lang +++ b/langs/en_US/saturne.lang @@ -36,32 +36,34 @@ ReadAdminPage = Access the module configuration %s # # Data -ModuleSettings = Settings -ModuleSetup = Module configuration %s -Contributing = Contributing -SaturneModule = %s module -GeneralConfig = General configuration -ConfigData = Configurable data from %s -Configs = Configurable % data -ConfigDatas = Configurations -ModuleMediaGallery = Configuration of %s media -SavedMediaData = Recording of media data -EnablePublicInterface = Public interface -EnablePublicInterfaceDescription = Activation of public interfaces -ShowCompanyLogo = Display the company logo -ShowCompanyLogoDescription = Enable this option to hide the company logo in the public interface pages -UseCaptcha = Graphic code (CAPTCHA) -UseCaptchaDescription = Use of graphic code (CAPTCHA) on public interface pages -UseAllEmailMode = Use of all email configuration modes -UseAllEmailModeDescription = Allow the use of all email configuration modes by default, only SMTP mode is allowed -SignaturePublicInterfaceForbidden = No access to the public signature interface -ShowSpecimen = See signatures on specimen documents -ShowSpecimenDescription = Allows viewing of signatures on specimen documents -ObjectVisibleDescription = Display the %s field -SavedConfig = Saved configuration -ErrorSavedConfig = An error occurred during the configuration -Config = Configuration -Extrafields = Extra attributes +ModuleSettings = Settings +ModuleSetup = Module configuration %s +Contributing = Contributing +SaturneModule = %s module +GeneralConfig = General configuration +ConfigData = Configurable data from %s +Configs = Configurable % data +ConfigDatas = Configurations +ModuleMediaGallery = Configuration of %s media +SavedMediaData = Recording of media data +EnablePublicInterface = Public interface +EnablePublicInterfaceDescription = Activation of public interfaces +ShowCompanyLogo = Display the company logo +ShowCompanyLogoDescription = Enable this option to hide the company logo in the public interface pages +UseCaptcha = Graphic code (CAPTCHA) +UseCaptchaDescription = Use of graphic code (CAPTCHA) on public interface pages +UseAllEmailMode = Use of all email configuration modes +UseAllEmailModeDescription = Allow the use of all email configuration modes by default, only SMTP mode is allowed +UseFastUploadImprovement = Improved fast image loading +UseFastUploadImprovementDescription = Activate this option to improve image loading speed
Option available :
  • Image rotation
  • Drawing on the image
  • Saving the image on a reduced format
+SignaturePublicInterfaceForbidden = No access to the public signature interface +ShowSpecimen = See signatures on specimen documents +ShowSpecimenDescription = Allows viewing of signatures on specimen documents +ObjectVisibleDescription = Display the %s field +SavedConfig = Saved configuration +ErrorSavedConfig = An error occurred during the configuration +Config = Configuration +Extrafields = Extra attributes # Mod Numbering @@ -70,11 +72,13 @@ NumberingModuleDet = Numbering model lines StandardModel = Returns the number in the form %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential counter without break and without reset. # ODT Template -YourDocuments = Documents -DocumentTemplate = Model documents -ODTDefaultTemplateName = Default ODT of documents -ErrorFileNotFound = File not found -ErrorNoSocietyLogo = No company logo found +YourDocuments = Documents +DocumentTemplate = Model documents +ODTDefaultTemplateName = Default ODT of documents +ErrorFileNotFound = File not found +ErrorNoSocietyLogo = No company logo found +CustomODT = Custom ODT of documents +ErrorWrongFileNameExtension = Error: wrong file extension %s # Trigger ConfTrigger = Event configuration @@ -211,3 +215,14 @@ EntityName = Entity name # Data Tools = Tools ExportData = Export my data + + + +# +# Other +# + +# Data +SocietyAttendants = Third party external attendants +Back = Back +DeleteFiles = Are you sure that you want to delete selected files ? diff --git a/langs/en_US/signature.lang b/langs/en_US/signature.lang index e92e873b..71e200a5 100644 --- a/langs/en_US/signature.lang +++ b/langs/en_US/signature.lang @@ -27,8 +27,6 @@ DeletedTrigger = Attendant %s deleted # SetEventMessage BeCareful = Attention -AddSignatureSuccess = Successful attendant signature -AddSignatureSuccessText = The signature has been registered for the document AddAttendantMessage = Add attendant : %s DeleteAttendantMessage = Attendant deletion: %s SignAttendantMessage = The attendant %s signed @@ -66,6 +64,7 @@ Sign = Sign Erase = Erase AttendantTableModeSimple = Simplified view AttendantTableModeAdvanced = Advanced view +SignatureSaveButton = Save signature # Data Attendant = Attendant @@ -85,4 +84,5 @@ Signatory = Signatory Responsible = Responsible # Public interface -FullName = Last name First name +SavedSignature = Signature saved + diff --git a/langs/fr_FR/saturne.lang b/langs/fr_FR/saturne.lang index 9645d7b6..c29a723a 100644 --- a/langs/fr_FR/saturne.lang +++ b/langs/fr_FR/saturne.lang @@ -36,32 +36,34 @@ ReadAdminPage = Accéder à la configuration du module %s # # Data - Donnée -ModuleSettings = Réglages -ModuleSetup = Configuration du module %s -Contributing = Contribution -SaturneModule = Module %s -GeneralConfig = Configuration générale -ConfigData = Données configurables de %s -Configs = Configuration des %s -ConfigDatas = Configurations -ModuleMediaGallery = Configuration des médias de %s -SavedMediaData = Enregistrement des données des médias -EnablePublicInterface = Interface publique -EnablePublicInterfaceDescription = Activation des interfaces publiques -ShowCompanyLogo = Afficher le logo de la société -ShowCompanyLogoDescription = Activez cette option pour masquer le logo de la société dans les pages d'interface publique -UseCaptcha = Code graphique (CAPTCHA) -UseCaptchaDescription = Utilisation du code graphique (CAPTCHA) sur les pages d'interfaces publique -UseAllEmailMode = Utilisation de tous les modes de configuration des emails -UseAllEmailModeDescription = Autorise l'utilisation de tous les modes de configuration des emails par défaut, seul le mode SMTP est autorisé -SignaturePublicInterfaceForbidden = Accès interdit à l'interface publique de signature -ObjectVisibleDescription = Afficher le champ %s -ShowSignatureSpecimen = Voir les signatures sur les documents specimens -ShowSignatureSpecimenDescription = Permet la visualisation des signatures sur les documents specimens -SavedConfig = Configuration sauvegardée -ErrorSavedConfig = Une erreur est survenue lors de la configuration -Config = Configuration -Extrafields = Attributs supplémentaires +ModuleSettings = Réglages +ModuleSetup = Configuration du module %s +Contributing = Contribution +SaturneModule = Module %s +GeneralConfig = Configuration générale +ConfigData = Données configurables de %s +Configs = Configuration des %s +ConfigDatas = Configurations +ModuleMediaGallery = Configuration des médias de %s +SavedMediaData = Enregistrement des données des médias +EnablePublicInterface = Interface publique +EnablePublicInterfaceDescription = Activation des interfaces publiques +ShowCompanyLogo = Afficher le logo de la société +ShowCompanyLogoDescription = Activez cette option pour masquer le logo de la société dans les pages d'interface publique +UseCaptcha = Code graphique (CAPTCHA) +UseCaptchaDescription = Utilisation du code graphique (CAPTCHA) sur les pages d'interfaces publique +UseAllEmailMode = Utilisation de tous les modes de configuration des emails +UseAllEmailModeDescription = Autorise l'utilisation de tous les modes de configuration des emails par défaut, seul le mode SMTP est autorisé +UseFastUploadImprovement = Utilisation chargement rapide d'image amélioré +UseFastUploadImprovementDescription = Activez cette option pour améliorer le chargement rapide d'image
Option disponible :
  • Rotation d'image
  • Dessin sur l'image
  • Enregistrement de l'image sur un format réduit
+SignaturePublicInterfaceForbidden = Accès interdit à l'interface publique de signature +ObjectVisibleDescription = Afficher le champ %s +ShowSignatureSpecimen = Voir les signatures sur les documents specimens +ShowSignatureSpecimenDescription = Permet la visualisation des signatures sur les documents specimens +SavedConfig = Configuration sauvegardée +ErrorSavedConfig = Une erreur est survenue lors de la configuration +Config = Configuration +Extrafields = Attributs supplémentaires # Mod Numbering - Modèle de numérotation @@ -70,11 +72,13 @@ NumberingModuleDet = Modèle de numérotation des lignes StandardModel = Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn est un compteur séquentiel sans rupture et sans remise à 0. # ODT Template - Template ODT -YourDocuments = Documents -DocumentTemplate = Modèle de documents -ODTDefaultTemplateName = ODT par défaut -ErrorFileNotFound = Fichier non trouvé -ErrorNoSocietyLogo = Aucun logo de la société renseigné +YourDocuments = Documents +DocumentTemplate = Modèle de documents +ODTDefaultTemplateName = ODT par défaut +ErrorFileNotFound = Fichier non trouvé +ErrorNoSocietyLogo = Aucun logo de la société renseigné +CustomODT = ODT personnalisé +ErrorWrongFileNameExtension = Erreur : mauvaise extension de fichier %s # Trigger - Événements ConfTrigger = Configuration des événements @@ -211,3 +215,14 @@ EntityName = Nom de l'entité # Data - Donnée Tools = Outils ExportData = Exporter mes données + + + +# +# Other - Autres +# + +# Data - Donnée +SocietyAttendants = Tiers des participants externe +Back = Retour +DeleteFiles = Êtes vous sur de vouloir supprimer les media(s) sélectionné(s) ? diff --git a/langs/fr_FR/signature.lang b/langs/fr_FR/signature.lang index 6dc01ffa..c5ce2a31 100644 --- a/langs/fr_FR/signature.lang +++ b/langs/fr_FR/signature.lang @@ -27,8 +27,6 @@ DeletedTrigger = Participant %s supprimé # SetEventMessage - Notice info BeCareful = Attention -AddSignatureSuccess = Signature du participant réussie -AddSignatureSuccessText = La signature a bien été enregistrée pour le document AddAttendantMessage = Ajout du participant : %s DeleteAttendantMessage = Suppression du participant : %s SignAttendantMessage = Le participant %s a signé @@ -67,6 +65,7 @@ Sign = Signer Erase = Effacer AttendantTableModeSimple = Vue simplifiée AttendantTableModeAdvanced = Vue avancée +SignatureSaveButton = Enregistrer la signature # Data - Donnée Attendant = Participant @@ -86,4 +85,5 @@ Signatory = Signataire Responsible = Responsable # Public interface - Interface publique -FullName = NOM Prénom +SavedSignature = Signature enregistrée + diff --git a/lib/documents.lib.php b/lib/documents.lib.php index ffd4b8ee..218c0e5d 100644 --- a/lib/documents.lib.php +++ b/lib/documents.lib.php @@ -129,6 +129,7 @@ function saturne_show_documents(string $modulepart, $modulesubdir, $filedir, str include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; $modellist = getListOfModels($db, $type); } else { + require_once __DIR__ . '/../core/modules/saturne/modules_saturne.php'; $saturneDocumentModel = new SaturneDocumentModel($db, $modulepart, $submodulepart); $documentType = strtolower($submodulepart); $modellist = $saturneDocumentModel->liste_modeles($db, $documentType); @@ -150,14 +151,7 @@ function saturne_show_documents(string $modulepart, $modulesubdir, $filedir, str $out .= '
'; } - // @todo spec digirisk - if (preg_match('/TicketDocument/', $submodulepart)) { - $action = 'digiriskbuilddoc'; - } else { - $action = 'builddoc'; - } - - $out .= ''; + $out .= ''; $out .= ''; $out .= load_fiche_titre($titletoshow, '', '', 0, 'builddoc'); $out .= '
'; @@ -180,17 +174,28 @@ function saturne_show_documents(string $modulepart, $modulesubdir, $filedir, str foreach ($modellist as $key => $modellistsingle) { $arrayvalues = preg_replace('/template_/', '', $modellistsingle); $modellist[$key] = $langs->trans($arrayvalues); - $constforval = strtoupper($modulepart) . '_' . strtoupper($submodulepart) . '_DEFAULT_MODEL'; - $defaultmodel = preg_replace('/_odt/', '.odt', $conf->global->$constforval); - if ('template_' . $defaultmodel == $modellistsingle) { - $modelselected = $key; - } - } - } + $confName = dol_strtoupper($modulepart . '_' . $submodulepart) . '_DEFAULT_MODEL'; + $customModel = explode('_custom', $key); + if (is_array($customModel) && count($customModel) == 2) { + $customModelKey = $customModel[0] . $customModel[1]; + $modellist[$customModelKey] = $modellist[$key]; + if (strpos($key, getDolGlobalString($confName)) !== false) { + $modelselected = $customModelKey; + } + unset($modellist[$key]); + } + + if (!isset($modelselected) && strpos($key, getDolGlobalString($confName)) !== false) { + $modelselected = $key; + } + } + } + $morecss = 'maxwidth200'; if ($conf->browser->layout == 'phone') { $morecss = 'maxwidth100'; } + $out .= $form::selectarray('model', $modellist, $modelselected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss); if ($conf->use_javascript_ajax) { diff --git a/lib/medias.lib.php b/lib/medias.lib.php index a81b5d37..0af1bdd2 100644 --- a/lib/medias.lib.php +++ b/lib/medias.lib.php @@ -98,18 +98,17 @@ function saturne_show_medias(string $moduleName, string $modulepart = 'ecm', str
entity); - ?> - - = 0) : ?> - entity; ?> - - - - + if (file_exists($filearray[$i]['path'] . '/thumbs/' . $shownFileName)) { + $advancedPreviewUrl = getAdvancedPreviewUrl($modulepart, $moduleName . '/medias/' . urlencode($fileName), 0, 'entity=' . $conf->entity); + $fullpath = $path . '/' . urlencode($shownFileName) . '&entity=' . $conf->entity; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + } ?>
diff --git a/lib/object.lib.php b/lib/object.lib.php index 40a46417..35059101 100644 --- a/lib/object.lib.php +++ b/lib/object.lib.php @@ -170,6 +170,12 @@ function saturne_object_prepare_head(CommonObject $object, $head = [], array $mo $h = 0; $objectType = $object->element; + // This case will appear if module use saturne for manage head with hook each other + if ($object->module !== $moduleNameLowerCase) { + $moduleName = $object->module; + $moduleNameLowerCase = dol_strtolower($object->module); + } + if ($user->rights->$moduleNameLowerCase->$objectType->read) { $head[$h][0] = dol_buildpath('/' . $moduleNameLowerCase . '/view/' . (!empty($moreparam['parentType']) ? $moreparam['parentType'] : $objectType) . '/' . (!empty($moreparam['parentType']) ? $moreparam['parentType'] : $objectType) . '_card.php', 1) . '?id=' . $object->id . (!empty($moreparam['parentType']) ? '&object_type=' . $objectType : ''); $head[$h][1] = $conf->browser->layout != 'phone' ? '' . $langs->trans((!empty($moreparam['specialName']) ? ucfirst($moreparam['specialName']) : ucfirst($objectType))) : ''; @@ -415,7 +421,6 @@ function saturne_get_objects_metadata(string $type = ''): array 'class_path' => 'contact/class/contact.class.php', 'lib_path' => 'core/lib/contact.lib.php', ]; - $objectsMetadata['customer'] = $objectsMetadata['thirdparty']; } if (isModEnabled('project')) { @@ -567,7 +572,6 @@ function saturne_get_objects_metadata(string $type = ''): array 'class_path' => 'product/stock/class/entrepot.class.php', 'lib_path' => 'core/lib/stock.lib.php', ]; - $objectsMetadata['warehouse'] = $objectsMetadata['entrepot']; } if (isModEnabled('expedition')) { @@ -626,6 +630,7 @@ function saturne_get_objects_metadata(string $type = ''): array } $objectsMetadataArray = []; + $otherNameType = ''; if (is_array($objectsMetadata) && !empty($objectsMetadata)) { foreach($objectsMetadata as $objectType => $objectMetadata) { if ($objectType != 'context' && $objectType != 'currentcontext') { @@ -659,12 +664,21 @@ function saturne_get_objects_metadata(string $type = ''): array if (!empty($objectMetadata['langfile'])) { $langs->load($objectMetadata['langfile']); } + if (dol_strlen($type) > 0) { + $otherNameType = (!empty(array_search($type, $objectMetadata)) ? $objectType : ''); + } } } } if (dol_strlen($type) > 0) { - return (array_key_exists($type, $objectsMetadataArray) ? $objectsMetadataArray[$type] : []); + if (array_key_exists($type, $objectsMetadataArray)) { + return $objectsMetadataArray[$type]; + } elseif (array_key_exists($otherNameType, $objectsMetadataArray)) { + return $objectsMetadataArray[$otherNameType]; + } else { + return []; + } } else { return $objectsMetadataArray; } @@ -706,3 +720,121 @@ function saturne_require_objects_mod(array $numberingModulesNames, string $modul return $variablesToReturn; } + +/** + * Show object action for category + * + * @param string $moduleNameLowerCase Module name in lower case + * @param string $objectType Object type + * @throws Exception + */ +function saturne_object_action_for_category(string $moduleNameLowerCase, string $objectType) +{ + // Global variables definitions + global $user; + + $result = -1; + if ($user->hasRight($moduleNameLowerCase, $objectType, 'write')) { + // Global variables definitions + global $action, $id, $langs, $object; + + $objects = saturne_fetch_all_object_type($objectType); + if (is_array($objects) && !empty($objects)) { + $objectID = GETPOST('object_id'); + $newObject = $objects[$objectID]; + if ($action == 'add_object_into_category') { + $result = $object->add_type($newObject, $objectType); + if ($result >= 0) { + setEventMessages($langs->trans('WasAddedSuccessfully', $newObject->ref), []); + } else { + if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + setEventMessages($langs->trans('ObjectAlreadyLinkedToCategory'), [], 'warnings'); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + } elseif ($action == 'unlink_object_from_category') { + $result = $object->del_type($newObject, $objectType); + if ($result < 0) { + dol_print_error('', $object->error); + } + } + if ($result > 0) { + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id . '&type=' . $objectType); + exit; + } + } + } +} + +/** + * Show object list in category + * + * @param string $moduleNameLowerCase Module name in lower case + * @param string $objectType Object type + * @return string $out HTML table for show/add/delete object list in category + * @throws Exception + */ +function saturne_show_object_list_in_category(string $moduleNameLowerCase, string $objectType): string +{ + // Global variables definitions + global $user; + + $out = ''; + if ($user->hasRight($moduleNameLowerCase, $objectType, 'read')) { + // Global variables definitions + global $form, $id, $langs; + + $langs->load($moduleNameLowerCase . '@' . $moduleNameLowerCase); + + $objects = saturne_fetch_all_object_type($objectType); + $objectArrays = []; + if (is_array($objects) && !empty($objects)) { + foreach ($objects as $object) { + $objectArrays[$object->id] = $object->ref; + } + + $out .= ''; + $out .= ''; + $out .= ''; + + $out .= ''; + $out .= ''; + $out .= ''; + $out .= '
'; + $out .= $langs->trans('AddObjectIntoCategory') . ' '; + $out .= $form::selectarray('object_id', $objectArrays, '', 1); + $out .= '
'; + $out .= ''; + + $newCardButton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/' . $moduleNameLowerCase . '/view/' . $objectType . '/' . $objectType . '_card.php', 1) . '?action=create&backtopage=' . urlencode($_SERVER['PHP_SELF'] . '?id=' . $id . '&type=' . $objectType), '', $user->hasRight($moduleNameLowerCase, $objectType, 'write')); + $object = array_shift($objects); + $picto = $object->picto; + + $out .= load_fiche_titre($langs->transnoentities(ucfirst($objectType)), $newCardButton, 'object_' . $picto); + $out .= ''; + $out .= ''; + + $objects = saturne_fetch_all_object_type($objectType, '', '', 0, 0, ['customsql' => 'cp.fk_categorie = ' . $id], 'AND', false, true, true); + if (is_array($objects) && !empty($objects)) { + foreach ($objects as $object) { + $out .= ''; + } + } else { + $out .= ''; + } + $out .= '
' . $langs->trans('Ref') . '
'; + $out .= $object->getNomUrl(1); + $out .= ''; + if ($user->hasRight($moduleNameLowerCase, $objectType, 'write')) { + $out .= ''; + $out .= $langs->trans('DeleteFromCat'); + $out .= img_picto($langs->trans('DeleteFromCat'), 'unlink', 'class="paddingleft"'); + $out .= ''; + } + $out .= '
' . $langs->trans('ThisCategoryHasNoItems') . '
'; + } + } + + return $out; +} diff --git a/lib/saturne_functions.lib.php b/lib/saturne_functions.lib.php index b77b6cd6..96ff40c6 100644 --- a/lib/saturne_functions.lib.php +++ b/lib/saturne_functions.lib.php @@ -58,6 +58,9 @@ function saturne_header(int $load_media_gallery = 0, string $head = '', string $ //JS $arrayofjs[] = '/saturne/js/saturne.min.js'; + if ($load_media_gallery) { + $arrayofjs[] = '/saturne/js/includes/signature-pad.min.js'; + } if (file_exists(__DIR__ . '/../../' . $moduleNameLowerCase . '/js/' . $moduleNameLowerCase . '.min.js')) { $arrayofjs[] = '/' . $moduleNameLowerCase . '/js/' . $moduleNameLowerCase . '.min.js'; } @@ -233,7 +236,7 @@ function saturne_banner_tab(object $object, string $paramId = 'ref', string $mor } foreach ($possibleKeys as $key) { - if (isset($object->$key)) { + if (isset($object->$key) || isset($object->fields[$key])) { $objectKey = $key; break; } @@ -295,8 +298,10 @@ function saturne_banner_tab(object $object, string $paramId = 'ref', string $mor } $saturneMoreHtmlRef .= '
'; + $moreParamsBannerTab = (!empty($moreParams['bannerTab']) ? $moreParams['bannerTab'] : ''); + if (!$handlePhoto) { - $moreParamsBannerTab = '&module_name=' . $moduleName . '&object_type=' . $object->element; + $moreParamsBannerTab = (empty($moreParamsBannerTab) ? '&module_name=' . $moduleName . '&object_type=' . $object->element : $moreParamsBannerTab); dol_banner_tab($object, $paramId, (($moreHtml != 'none' && $moreParams['moreHtml'] != 'none') ? $moreHtml : ''), $showNav, $fieldId, $fieldRef, $saturneMoreHtmlRef, $moreParamsBannerTab); } else { global $conf, $form; @@ -326,7 +331,7 @@ function saturne_banner_tab(object $object, string $paramId = 'ref', string $mor } $moreHtmlLeft = '
' . saturne_show_medias_linked((dol_strlen($modulePart) > 0 ? $modulePart : $moduleNameLowerCase), $baseDir . '/' . $subDir, 'small', $photoLimit ?? 0, 0, 0, 0, 88, 88, 0, 0, 0, $subDir, $object, 'photo', 0, 0,0, 1) . '
'; - print $form->showrefnav($object, $paramId, (($moreHtml != 'none' && $moreParams['moreHtml'] != 'none') ? $moreHtml : ''), $showNav, $fieldId, $fieldRef, $saturneMoreHtmlRef, '', 0, $moreHtmlLeft, $object->getLibStatut(6)); + print $form->showrefnav($object, $paramId, (($moreHtml != 'none' && $moreParams['moreHtml'] != 'none') ? $moreHtml : ''), $showNav, $fieldId, $fieldRef, $saturneMoreHtmlRef, $moreParamsBannerTab, 0, $moreHtmlLeft, $object->getLibStatut(6)); print '
'; } diff --git a/public/signature/add_signature.php b/public/signature/add_signature.php index ed16eabc..c74a02ed 100644 --- a/public/signature/add_signature.php +++ b/public/signature/add_signature.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2021-2024 EVARISK * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,35 +18,32 @@ /** * \file public/signature/add_signature.php * \ingroup saturne - * \brief Public page to add signature. + * \brief Public page to add signature */ -if (!defined('NOREQUIREUSER')) { - define('NOREQUIREUSER', '1'); -} if (!defined('NOTOKENRENEWAL')) { - define('NOTOKENRENEWAL', '1'); + define('NOTOKENRENEWAL', 1); } if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', 1); } if (!defined('NOREQUIREHTML')) { - define('NOREQUIREHTML', '1'); + define('NOREQUIREHTML', 1); } -if (!defined('NOLOGIN')) { // This means this output page does not require to be logged. - define('NOLOGIN', '1'); +if (!defined('NOLOGIN')) { // This means this output page does not require to be logged + define('NOLOGIN', 1); } -if (!defined('NOCSRFCHECK')) { // We accept to go on this page from external website. - define('NOCSRFCHECK', '1'); +if (!defined('NOCSRFCHECK')) { // We accept to go on this page from external website + define('NOCSRFCHECK', 1); } -if (!defined('NOIPCHECK')) { // Do not check IP defined into conf $dolibarr_main_restrict_ip. - define('NOIPCHECK', '1'); +if (!defined('NOIPCHECK')) { // Do not check IP defined into conf $dolibarr_main_restrict_ip + define('NOIPCHECK', 1); } if (!defined('NOBROWSERNOTIF')) { - define('NOBROWSERNOTIF', '1'); + define('NOBROWSERNOTIF', 1); } -// Load Saturne environment. +// Load Saturne environment if (file_exists('../../saturne.main.inc.php')) { require_once __DIR__ . '/../../saturne.main.inc.php'; } elseif (file_exists('../../../saturne.main.inc.php')) { @@ -55,42 +52,39 @@ die('Include of saturne main fails'); } -// Get module parameters. +// Get module parameters $moduleName = GETPOST('module_name', 'alpha'); $objectType = GETPOST('object_type', 'alpha'); $documentType = GETPOST('document_type', 'alpha'); $moduleNameLowerCase = strtolower($moduleName); -// Load Dolibarr libraries. +// Load Dolibarr libraries require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; -require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; -// Load Saturne libraries. -require_once __DIR__ . '/../../class/saturnedocuments.class.php'; +// Load Saturne libraries require_once __DIR__ . '/../../class/saturnesignature.class.php'; -// Load Module libraries. +// Load Module libraries require_once __DIR__ . '/../../../' . $moduleNameLowerCase . '/class/' . $objectType . '.class.php'; $fileExists = file_exists('../../../' . $moduleNameLowerCase . '/class/' . $moduleNameLowerCase . 'documents/' . strtolower($documentType) . '.class.php'); if ($fileExists && GETPOSTISSET('document_type')) { require_once __DIR__ . '/../../../' . $moduleNameLowerCase . '/class/' . $moduleNameLowerCase . 'documents/' . strtolower($documentType) . '.class.php'; } -// Global variables definitions. +// Global variables definitions global $conf, $db, $hookmanager, $langs; -// Load translation files required by the page. +// Load translation files required by the page saturne_load_langs(); -// Get parameters. -$track_id = GETPOST('track_id', 'alpha'); -$entity = GETPOST('entity'); -$action = GETPOST('action', 'aZ09'); -$source = GETPOST('source', 'aZ09'); +// Get parameters +$trackID = GETPOST('track_id', 'alpha'); +$entity = GETPOST('entity'); +$action = GETPOST('action', 'aZ09'); +$source = GETPOST('source', 'aZ09'); -// Initialize technical objects. +// Initialize technical objects $classname = ucfirst($objectType); $object = new $classname($db); if (GETPOSTISSET('document_type') && $fileExists) { @@ -99,10 +93,7 @@ $signatory = new SaturneSignature($db, $moduleNameLowerCase, $objectType); $user = new User($db); -// Initialize view objects. -$form = new Form($db); - -$hookmanager->initHooks([$objectType . 'publicsignature', 'saturnepublicsignature', 'saturnepublicinterface', 'saturneglobal', 'globalcard']); // Note that conf->hooks_modules contains array. +$hookmanager->initHooks([$objectType . 'publicsignature', 'saturnepublicsignature', 'saturnepublicinterface', 'saturneglobal', 'globalcard']); // Note that conf->hooks_modules contains array if (!isModEnabled('multicompany')) { $entity = $conf->entity; @@ -110,7 +101,7 @@ $conf->setEntityValues($db, $entity); -$signatory->fetch(0, '', ' AND signature_url =' . "'" . $track_id . "'"); +$signatory->fetch(0, '', ' AND signature_url =' . "'" . $trackID . "'"); $object->fetch($signatory->fk_object); $upload_dir = $conf->$moduleNameLowerCase->multidir_output[$object->entity ?? 1]; @@ -120,199 +111,30 @@ */ $parameters = []; -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -if (empty($reshook)) { - // Action to add signature. - if ($action == 'add_signature') { - $data = json_decode(file_get_contents('php://input'), true); - $signatoryID = GETPOST('signatoryID'); - - $signatory->fetch($signatoryID); - - $signatory->signature = $data['signature']; - $signatory->signature_date = dol_now(); - -// // Check Captcha code if is enabled. -// $error = 0; -// if (!empty($conf->global->SATURNE_USE_CAPTCHA)) { -// $sessionKey = 'dol_antispam_value'; -// $ok = (array_key_exists($sessionKey, $_SESSION) === true && (strtolower($_SESSION[$sessionKey]) === strtolower($data['code']))); -// -// if (!$ok) { -// $error++; -// setEventMessage($langs->trans('ErrorBadValueForCode'), 'errors'); -// $action = ''; -// } -// } - - $error = 0; - - if (!$error) { - $result = $signatory->update($user, true); - if ($result > 0) { - // Creation signature OK. - $signatory->setSigned($user, false, 'public'); - exit; - } elseif (!empty($signatory->errors)) { // Creation signature KO. - setEventMessages('', $signatory->errors, 'errors'); - } else { - setEventMessages($signatory->error, [], 'errors'); - } - } else { - exit; - } - } - - // Action to build doc. - if ($action == 'builddoc') { - $outputlangs = $langs; - $newlang = ''; - - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) { - $newlang = GETPOST('lang_id', 'aZ09'); - } - if (!empty($newlang)) { - $outputlangs = new Translate('', $conf); - $outputlangs->setDefaultLang($newlang); - } - - // To be sure vars is defined. - if (empty($hidedetails)){ - $hidedetails = 0; - } - if (empty($hidedesc)) { - $hidedesc = 0; - } - if (empty($hideref)) { - $hideref = 0; - } - if (empty($moreparams)) { - $moreparams = []; - } - - $constforval = strtoupper($moduleName) . '_' . strtoupper($documentType) . '_ADDON_ODT_PATH'; - $template = preg_replace('/DOL_DOCUMENT_ROOT/', DOL_DOCUMENT_ROOT, $conf->global->$constforval); - $model = strtolower($documentType) . '_odt:' . $template .'template_' . strtolower($documentType) . '.odt'; - - $moreparams['object'] = $object; - $moreparams['user'] = $user; - $moreparams['specimen'] = 1; - $moreparams['zone'] = 'public'; - $moreparams['objectType'] = $objectType; - - $result = $document->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - - if ($result <= 0) { - setEventMessages($document->error, $document->errors, 'errors'); - $action = ''; - } elseif (empty($donotredirect)) { - copy($upload_dir . '/' . strtolower($objectType) . 'document' . '/' . $object->ref . '/public_specimen/' . $document->last_main_doc, DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/' . $objectType . '_specimen_' . $track_id . '.odt'); - setEventMessages($langs->trans('FileGenerated') . ' - ' . $document->last_main_doc, []); - $urltoredirect = $_SERVER['REQUEST_URI']; - $urltoredirect = preg_replace('/#builddoc$/', '', $urltoredirect); - $urltoredirect = preg_replace('/action=builddoc&?/', '', $urltoredirect); // To avoid infinite loop. - header('Location: ' . $urltoredirect . '#builddoc'); - exit; - } - } - - if ($action == 'remove_file') { - $files = dol_dir_list(DOL_DOCUMENT_ROOT . '/custom/' . $moduleNameLowerCase . '/documents/temp/'); // get all file names. +$resHook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($resHook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} - foreach ($files as $file) { - if (is_file($file['fullname'])) { - dol_delete_file($file['fullname']); - } - } - } +if (empty($resHook)) { + // Actions add_signature, builddoc, remove_file + require_once __DIR__ . '/../../core/tpl/actions/signature_actions.tpl.php'; } /* * View */ -$title = $langs->trans('Signature'); -$morejs = ['/saturne/js/includes/signature-pad.min.js']; -$morecss = ['/saturne/css/saturne.min.css']; +$title = $langs->trans('Signature'); +$moreJS = ['/saturne/js/includes/signature-pad.min.js']; $conf->dol_hide_topmenu = 1; $conf->dol_hide_leftmenu = 1; -saturne_header(0,'', $title, '', '', 0, 0, $morejs, $morecss); - -$element = $signatory; ?> +saturne_header(0,'', $title, '', '', 0, 0, $moreJS, [], '', 'page-public-card page-signature'); -
- global->SATURNE_ENABLE_PUBLIC_INTERFACE)) : ?> - -
-
-global->SATURNE_USE_CAPTCHA ?> -
- trans('Document'); ?> - - - - - - - - -
-
-
-
-
trans('FullName'); ?>
-
lastname) . ' ' . $signatory->firstname; ?>
-
-
-
trans($langs->trans(ucfirst($objectType))); ?>
-
ref . ' ' . $object->label; ?>
-
-
-
-
-
- trans('Signature'); ?> - signature)) : ?> - - -
-
-
- -
-
-
-global->SATURNE_USE_CAPTCHA)) { -// require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php'; -// print '
'; -// print ''; -// print ''; -// print ''; -// print ''; -// print ''; -// print ''; -// print ''; -// print '' . img_picto($langs->trans('Refresh'), 'refresh', 'id="captcha_refresh_img"') . ''; -// print ''; -// print '
'; -// } ?> - ' . $langs->trans('SignaturePublicInterfaceForbidden') . '
'; - endif; ?> +$moreParams['useConfirmation'] = 1; +require_once __DIR__ . '/../../core/tpl/signature/public_signature_view.tpl.php'; -
- -
- - -close(); diff --git a/saturne_dev.md b/saturne_dev.md index 1cfecc09..5b0e3182 100644 --- a/saturne_dev.md +++ b/saturne_dev.md @@ -25,6 +25,7 @@ Pour faire un commit sur les repositories d'Evarisk il faut respecter la convent - #NuméroIssue [Object/Element] add/fix: commit message - Exemple 1 : #100 [Signature] add: signature update action - Exemple 2 : #101 [Lib] fix: wrong method call +# ## CSS OU JS diff --git a/view/saturne_attendants.php b/view/saturne_attendants.php index 9c609fd3..6800846a 100644 --- a/view/saturne_attendants.php +++ b/view/saturne_attendants.php @@ -297,9 +297,8 @@ $title = $langs->trans('Attendants') . ' - ' . $langs->trans(ucfirst($object->element)); $helpUrl = 'FR:Module_' . $moduleName; -$morejs = ['/saturne/js/includes/signature-pad.min.js']; -saturne_header(0,'', $title, $helpUrl, '', 0, 0, $morejs); +saturne_header(0,'', $title, $helpUrl); if ($id > 0 || !empty($ref) && empty($action)) { $object->fetch_optionals(); @@ -325,16 +324,9 @@ trans('GoToValidate', $langs->transnoentities('The' . ucfirst($object->element))) ?>; - - - '; + '; print '
'; if ($object->status == $object::STATUS_VALIDATED && $permissiontoadd) { @@ -525,7 +517,7 @@ foreach ($signatoriesByRole as $signatoryRole) { foreach ($signatoryRole as $attendant) { $mesg .= $outputlangs->trans($attendant->role) . ' : ' . strtoupper($attendant->lastname) . ' ' . $attendant->firstname . '
'; - $signatureUrl = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $attendant->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType . '&modal_to_open=modal-signature' . $attendant->id, 3); + $signatureUrl = dol_buildpath('/custom/saturne/public/signature/add_signature.php?track_id=' . $attendant->signature_url . '&entity=' . $conf->entity . '&module_name=' . $moduleNameLowerCase . '&object_type=' . $object->element . '&document_type=' . $documentType, 3); $mesg .= '' . $signatureUrl . '

'; } }