Skip to content

Commit

Permalink
Merge pull request #4209 from Evarisk/develop
Browse files Browse the repository at this point in the history
20.0.0
  • Loading branch information
nicolas-eoxia authored Dec 12, 2024
2 parents e990a31 + d3caf8b commit 938fb55
Show file tree
Hide file tree
Showing 79 changed files with 3,338 additions and 2,568 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
## Informations

- Numéro du module : 436302
- Dernière mise à jour : 24/06/2024
- Dernière mise à jour : 12/12/2024
- Éditeur : [Evarisk](https://evarisk.com)
- Thème : Eldy Menu
- Licence : GPLv3
- Disponible sur : Windows - MacOS - Linux

### Version

- Version : 10.2.1
- Version : 20.0.0
- PHP : 7.4.33
- Compatibilité : Dolibarr 16.0.0 - 20.0.0
- Saturne Framework : 1.5.1
- Compatibilité : Dolibarr 20.0.0 - 20.0.2
- Saturne Framework : 1.7.0

## Liens

Expand Down
4 changes: 2 additions & 2 deletions admin/config/riskassessmentdocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

// Configuration header
$head = digiriskdolibarr_admin_prepare_head();
print dol_get_fiche_head($head, 'riskassessmentdocument', $title, -1, "digiriskdolibarr_color@digiriskdolibarr");
print dol_get_fiche_head($head, 'riskassessmentdocument', $title, -1, 'digiriskdolibarr_color@digiriskdolibarr');


// Risks
Expand Down Expand Up @@ -449,7 +449,7 @@
],
'ShowSharedRiskSigns' => [
'name' => 'ShowSharedRiskSigns',
'description' => $langs->trans('ShowSharedRiskSignsDescription') . (!$areRisksSharable ? '<br>' . img_picto('danger', 'fa-exclamation-triangle') . $langs->trans('DisabledSharedElement') : ''),
'description' => $langs->trans('ShowSharedRiskSignsDescription') . (!$areRisksSignsSharable ? '<br>' . img_picto('danger', 'fa-exclamation-triangle') . $langs->trans('DisabledSharedElement') : ''),
'code' => 'DIGIRISKDOLIBARR_SHOW_SHARED_RISKSIGNS',
'disabled' => !$areRisksSignsSharable

Expand Down
3 changes: 1 addition & 2 deletions admin/event.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,9 @@

// Configuration header
$head = digiriskdolibarr_admin_prepare_head();
print dol_get_fiche_head($head, 'event', '', -1, $module->picto);
print dol_get_fiche_head($head, 'event', '', -1, "digiriskdolibarr_color@digiriskdolibarr");

print load_fiche_titre('<i class="fas fa-calendar-alt"></i> ' . $langs->trans('ConfTrigger'), '', '');
print '<hr>';

print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
Expand Down
5 changes: 3 additions & 2 deletions admin/securityconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,15 @@
print '<tr>';
print '<td class="" style="width:10%">' . $form->editfieldkey('ResponsibleToNotify', 'Responsible_id', '', $object, 0) . '</td>';
print '<td>';
print $form->selectarray('responsible_socid', $userlist, $usertmp->id, $langs->trans('SelectUser'), null, null, null, "40%", 0, 0, '', 'minwidth300', 1);
print img_picto('', 'user', 'class="pictofixedwidth"') . $form->selectarray('responsible_socid', $userlist, $usertmp->id, $langs->trans('SelectUser'), null, null, null, "40%", 0, 0, '', 'minwidth300', 1);
print ' <a href="' . DOL_URL_ROOT . '/user/card.php?action=create&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '" target="_blank"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddUser") . '"></span></a>';
print '</td></tr>';

// * Phone number - Numéro de téléphone *

print '<tr class="oddeven"><td><label for="name">' . $langs->trans("PhoneMobile") . '</label></td><td>';
print '<tr class="oddeven"><td><label for="name">' . $langs->trans("PhonePro") . '</label></td><td>';

print img_picto('', 'object_phoning', 'class="pictofixedwidth"');
if ($usertmp->office_phone > 0) {
print $usertmp->office_phone;
} else { ?>
Expand Down
62 changes: 44 additions & 18 deletions admin/ticket/ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,22 @@
}

if ($action == 'generateExtrafields') {
$ret1 = $extra_fields->addExtraField('digiriskdolibarr_ticket_lastname', $langs->transnoentities("LastName"), 'varchar', 2000, 255, 'ticket', 0, 0, '', '', 1, '', 1, '', '', 0);
$ret2 = $extra_fields->addExtraField('digiriskdolibarr_ticket_firstname', $langs->transnoentities("FirstName"), 'varchar', 2100, 255, 'ticket', 0, 0, '', '', 1, '', 1, '', '', 0);
$ret3 = $extra_fields->addExtraField('digiriskdolibarr_ticket_phone', $langs->transnoentities("Phone"), 'phone', 2200, '', 'ticket', 0, 0, '', '', 1, '', 1, '', '', 0);
$ret4 = $extra_fields->addExtraField('digiriskdolibarr_ticket_service', $langs->transnoentities("Service"), 'sellist', 2300, '255', 'ticket', 0, 0, '', 'a:1:{s:7:"options";a:1:{s:61:"digiriskdolibarr_digiriskelement:ref:rowid::entity = $ENTITY$";N;}}', 1, '', 4, '','',0);
$ret5 = $extra_fields->addExtraField('digiriskdolibarr_ticket_location', $langs->transnoentities("Location"), 'varchar', 2400, 255, 'ticket', 0, 0, '', '', 1, '', 1, '', '', 0);
$ret6 = $extra_fields->addExtraField('digiriskdolibarr_ticket_date', $langs->transnoentities("Date"), 'datetime', 2500, '', 'ticket', 0, 0, '', '', 1, '', 1, '', '', 0);
if ($ret1 > 0 && $ret2 > 0 && $ret3 > 0 && $ret4 > 0 && $ret5 > 0 && $ret6 > 0) {
setEventMessages($langs->transnoentities('ExtrafieldsCreated'), array());
} else {
setEventMessages($extra_fields->error, array(), 'errors');
}
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_TICKET_EXTRAFIELDS', 1, 'integer', 0, '', 0);
$commonExtraFieldsValue = [
'alwayseditable' => 1, 'list' => 1, 'help' => '', 'entity' => 0, 'langfile' => 'digiriskdolibarr@digiriskdolibarr', 'enabled' => "isModEnabled('digiriskdolibarr') && isModEnabled('ticket')", 'moreparams' => ['css' => 'minwidth100 maxwidth300']
];

$extraFieldsArrays = [
'digiriskdolibarr_ticket_lastname' => ['Label' => 'LastName', 'type' => 'varchar', 'length' => 255, 'elementtype' => ['ticket'], 'position' => 43630210, ],
'digiriskdolibarr_ticket_firstname' => ['Label' => 'FirstName', 'type' => 'varchar', 'length' => 255, 'elementtype' => ['ticket'], 'position' => 43630220, ],
'digiriskdolibarr_ticket_phone' => ['Label' => 'Phone', 'type' => 'varchar', 'length' => 255, 'elementtype' => ['ticket'], 'position' => 43630230, ],
'digiriskdolibarr_ticket_service' => ['Label' => 'GP/UT', 'type' => 'link', 'elementtype' => ['ticket'], 'position' => 43630240, 'params' => ['DigiriskElement:digiriskdolibarr/class/digiriskelement.class.php:1' => NULL], 'list' => 4],
'digiriskdolibarr_ticket_location' => ['Label' => 'Location', 'type' => 'varchar', 'length' => 255, 'elementtype' => ['ticket'], 'position' => 43630250, ],
'digiriskdolibarr_ticket_date' => ['Label' => 'DeclarationDate', 'type' => 'datetime', 'elementtype' => ['ticket'], 'position' => 43630260, ]
];

saturne_manage_extrafields($extraFieldsArrays, $commonExtraFieldsValue);
setEventMessages($langs->transnoentities('ExtrafieldsCreated'), []);
dolibarr_set_const($db, 'DIGIRISKDOLIBARR_TICKET_EXTRAFIELDS', 1, 'integer', 0, '', 0);
}

if ($action == 'generateCategories') {
Expand Down Expand Up @@ -370,6 +374,28 @@
print '</td>';
print '</tr>';

// Use signatory
print '<tr class="oddeven"><td>';
print $langs->transnoentities('PublicInterfaceUseSignatoryDescription');
print '</td><td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_PUBLIC_INTERFACE_USE_SIGNATORY');
print '</td>';
print '<td class="center"></td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->transnoentities('TicketPublicInterfaceUseSignatoryDescription'));
print '</td></tr>';

// Show category description
print '<tr class="oddeven"><td>';
print $langs->transnoentities('TicketPublicInterfaceShowCategoryDescription');
print '</td><td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_PUBLIC_INTERFACE_SHOW_CATEGORY_DESCRIPTION');
print '</td>';
print '<td class="center"></td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->transnoentities('TicketPublicInterfaceShowCategoryDescriptionHelp'));
print '</td></tr>';

if (isModEnabled('multicompany')) {
//Page de sélection de l'entité
print '<tr class="oddeven"><td>' . $langs->transnoentities("ShowSelectorOnTicketPublicInterface") . '</td>';
Expand Down Expand Up @@ -445,15 +471,15 @@
print '</tr>';

// GP/UT Visible and Required
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketDigiriskElementVisible") . '</td>';
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketDigiriskelementVisible") . '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_DIGIRISKELEMENT_VISIBLE');
print '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_DIGIRISKELEMENT_REQUIRED');
print '</td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->transnoentities("TicketDigiriskElementVisibleHelp"));
print $form->textwithpicto('', $langs->transnoentities("TicketDigiriskelementVisibleHelp"));
print '</td>';
print '</tr>';

Expand All @@ -471,28 +497,28 @@
print '</tr>';

// Firstname Visible and Required
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketFirstNameVisible") . '</td>';
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketFirstnameVisible") . '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_FIRSTNAME_VISIBLE');
print '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_FIRSTNAME_REQUIRED');
print '</td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->transnoentities("TicketFirstNameVisibleHelp"));
print $form->textwithpicto('', $langs->transnoentities("TicketFirstnameVisibleHelp"));
print '</td>';
print '</tr>';

// Lastname Visible and Required
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketLastNameVisible") . '</td>';
print '<tr class="oddeven"><td>' . $langs->transnoentities("TicketLastnameVisible") . '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_LASTNAME_VISIBLE');
print '</td>';
print '<td class="center">';
print ajax_constantonoff('DIGIRISKDOLIBARR_TICKET_LASTNAME_REQUIRED');
print '</td>';
print '<td class="center">';
print $form->textwithpicto('', $langs->transnoentities("TicketLastNameVisibleHelp"));
print $form->textwithpicto('', $langs->transnoentities("TicketLastnameVisibleHelp"));
print '</td>';
print '</tr>';

Expand Down
Loading

0 comments on commit 938fb55

Please sign in to comment.