Skip to content

Commit

Permalink
[AccidentMetaData] add: improve display element
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Dec 13, 2021
1 parent 3adba7c commit 3e52723
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions accident_metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@
print '<a href="'.DOL_URL_ROOT.'/admin/dict.php?mainmenu=home" target="_blank" class="wpeo-tooltip-event" aria-label="'.$langs->trans('ConfigDico').'">' .' '. img_picto('', 'globe').'</a>';
print '</td></tr>';

print '<tr></tr>';

//VictimActivity
print '<tr class="content_field"><td><label for="victim_activity">'.$langs->trans("VictimActivity").'</label></td><td>';
$doleditor = new DolEditor('victim_activity', $accidentmetadata->victim_activity, '', 90, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
Expand All @@ -420,6 +422,8 @@
$doleditor->Create();
print '</td></tr>';

print '<tr></tr>';

//AccidentNatureDoubt
print '<tr><td class="minwidth400">'.$langs->trans("AccidentNatureDoubt").'</td><td>';
$doleditor = new DolEditor('accident_nature_doubt', $accidentmetadata->accident_nature_doubt, '', 90, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_3, '90%');
Expand All @@ -431,6 +435,8 @@
print img_picto('', 'globe').'<input type="text" class="minwidth400" name="accident_nature_doubt_link" id="accident_nature_doubt_link" value="'.$accidentmetadata->accident_nature_doubt_link.'">';
print '</td></tr>';

print '<tr></tr>';

//VictimTransportedTo
print '<tr><td class="minwidth400">'.$langs->trans("VictimTransportedTo").'</td><td>';
print '<input type="text" class="minwidth400" name="victim_transported_to" id="victim_transported_to" value="'.$accidentmetadata->victim_transported_to.'">';
Expand All @@ -441,11 +447,15 @@
print '<input type="checkbox" id="collateral_victim" name="collateral_victim"'.($accidentmetadata->collateral_victim ? ' checked=""' : '').'>';
print '</td></tr>';

print '<tr></tr>';

//VictimWorkHours
print '<tr><td class="minwidth400">'.$langs->trans("VictimWorkHours").'</td><td>';
print $langs->trans("FromDigirisk") . ' ' . $form->selectDate($accidentmetadata->workhours_morning_date_start, 'datewms', 1, 1, 0, '', 0) . ' ' . $langs->trans("At") . ' ' . $form->selectDate($accidentmetadata->workhours_morning_date_end, 'datewme', 1, 1, 0, '', 0) . ' ' . $langs->trans("AndFrom") . ' ' . $form->selectDate($accidentmetadata->workhours_afternoon_date_start, 'datewas', 1, 1, 0, '', 0) . ' ' . $langs->trans("At") . ' ' . $form->selectDate($accidentmetadata->workhours_afternoon_date_end, 'datewae', 1, 1, 0, '', 0);
print '</td></tr>';

print '<tr></tr>';

//AccidentNoticed
print '<tr><td class="minwidth400">'.$langs->trans("AccidentNoticed").'</td><td>';
print $form->selectarray('accident_noticed', array('0'=>$langs->trans('Found'), '1'=>$langs->trans('Known')), $accidentmetadata->accident_noticed, 0, 0, 0, '', 0, 0, 0, '', 'minwidth400', 1);
Expand All @@ -466,6 +476,8 @@
print '<input type="checkbox" id="accident_described_by_victim" name="accident_described_by_victim"'.($accidentmetadata->accident_described_by_victim ? ' checked=""' : '').'>';
print '</td></tr>';

print '<tr></tr>';

//RegisteredInAccidentRegister
print '<tr><td class="minwidth400">'.$langs->trans("RegisteredInAccidentRegister").'</td><td>';
print '<input type="checkbox" id="registered_in_accident_register" name="registered_in_accident_register"'.($accidentmetadata->registered_in_accident_register ? ' checked=""' : '').'>';
Expand All @@ -481,11 +493,15 @@
print '<input type="text" class="minwidth400" name="register_number" id="register_number" value="'.$accidentmetadata->register_number.'">';
print '</td></tr>';

print '<tr></tr>';

//Consequence
print '<tr><td class="minwidth400">'.$langs->trans("Consequence").'</td><td>';
print $form->selectarray('consequence', array('0'=>$langs->trans('WithoutWorkStop'), '1'=>$langs->trans('WithWorkStop'), '2'=>$langs->trans('Fatal')), $accidentmetadata->consequence, 0, 0, 0, '', 0, 0, 0, '', 'minwidth400', 1);
print '</td></tr>';

print '<tr></tr>';

//PoliceReport -- Rapport de police
print '<tr><td class="minwidth400">'.$langs->trans("PoliceReport").'</td><td>';
print '<input type="checkbox" id="police_report" name="police_report"'.($accidentmetadata->police_report ? ' checked=""' : '').'>';
Expand All @@ -496,6 +512,8 @@
print '<input type="text" class="minwidth400" name="police_report_by" id="police_report_by" value="'.$accidentmetadata->police_report_by.'">';
print '</td></tr>';

print '<tr></tr>';

//FirstPersonNoticedIsWitness
print '<tr><td class="minwidth400">'.$langs->trans("FirstPersonNoticedIsWitness").'</td><td>';
print $form->selectarray('first_person_noticed_is_witness', array('0'=>$langs->trans('Witness'), '1'=>$langs->trans('FirstPersonNoticed')), $accidentmetadata->first_person_noticed_is_witness, 0, 0, 0, '', 0, 0, 0, '', 'minwidth400', 1);
Expand All @@ -510,6 +528,8 @@
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>';

print '<tr></tr>';

//ThirdPartyResponsability
print '<tr><td class="minwidth400">'.$langs->trans("ThirdPartyResponsability").'</td><td>';
print '<input type="checkbox" id="thirdparty_responsibility" name="thirdparty_responsibility"'.($accidentmetadata->thirdparty_responsibility ? ' checked=""' : '').'>';
Expand Down Expand Up @@ -543,6 +563,8 @@
print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'" target="_blank"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>';
print '</td></tr>';

print '<tr></tr>';

//AccidentInvestigation
print '<tr><td class="minwidth400">'.$langs->trans("AccidentInvestigation").'</td><td>';
print '<input type="checkbox" id="accident_investigation" name="accident_investigation"'.($accidentmetadata->accident_investigation ? ' checked=""' : '').'>';
Expand Down

0 comments on commit 3e52723

Please sign in to comment.