Merge pull request #20268 from FHenry/14_fix_date_behaviour_action_card
fix: #20267 #Evarisk same required field displayed on edit or new card
This commit is contained in:
commit
6885568b7c
@ -1439,6 +1439,10 @@ if ($id > 0) {
|
|||||||
$("#fullday").change(function() {
|
$("#fullday").change(function() {
|
||||||
setdatefields();
|
setdatefields();
|
||||||
});
|
});
|
||||||
|
$("#actioncode").change(function() {
|
||||||
|
if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired");
|
||||||
|
else $("#dateend").removeClass("fieldrequired");
|
||||||
|
});
|
||||||
})';
|
})';
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
@ -1483,7 +1487,12 @@ if ($id > 0) {
|
|||||||
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent ? ' checked' : '').'></td></tr>';
|
print '<tr><td>'.$langs->trans("EventOnFullDay").'</td><td colspan="3"><input type="checkbox" id="fullday" name="fullday" '.($object->fulldayevent ? ' checked' : '').'></td></tr>';
|
||||||
|
|
||||||
// Date start - end
|
// Date start - end
|
||||||
print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").' - '.$langs->trans("DateActionEnd").'</span></td><td colspan="3">';
|
print '<tr><td class="nowrap">';
|
||||||
|
print '<span class="fieldrequired">'.$langs->trans("DateActionStart").'</span>';
|
||||||
|
print ' - ';
|
||||||
|
print '<span id="dateend"'.($object->type_code == 'AC_RDV' ? ' class="fieldrequired"' : '').'>'.$langs->trans("DateActionEnd").'</span>';
|
||||||
|
print '</td><td td colspan="3">';
|
||||||
|
//print '<tr><td class="nowrap"><span class="fieldrequired">'.$langs->trans("DateActionStart").' - '.$langs->trans("DateActionEnd").'</span></td><td colspan="3">';
|
||||||
if (GETPOST("afaire") == 1) {
|
if (GETPOST("afaire") == 1) {
|
||||||
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuser');
|
print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart', '', '', '', 1, '', '', 'tzuser');
|
||||||
} elseif (GETPOST("afaire") == 2) {
|
} elseif (GETPOST("afaire") == 2) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user