Fix pianificazione interventi

This commit is contained in:
Luca 2019-03-20 10:16:14 +01:00
parent 36870e6e5e
commit b9c2791d4e
3 changed files with 11 additions and 4 deletions

View File

@ -2,8 +2,10 @@
include_once __DIR__.'/../../core.php'; include_once __DIR__.'/../../core.php';
$operazione = filter('op');
// Pianificazione intervento // Pianificazione intervento
switch (filter('op')) { switch ($operazione) {
case 'add-promemoria': case 'add-promemoria':
$dbo->insert('co_promemoria', [ $dbo->insert('co_promemoria', [
'idcontratto' => $id_parent, 'idcontratto' => $id_parent,

View File

@ -60,7 +60,12 @@ $orario_inizio = '09:00';
$orario_fine = !empty($tempo_standard) ? date('H:i', strtotime($orario_inizio) + ((60 * 60) * $tempo_standard)) : '17:00'; $orario_fine = !empty($tempo_standard) ? date('H:i', strtotime($orario_inizio) + ((60 * 60) * $tempo_standard)) : '17:00';
echo ' echo '
<form id="add_form" action="'.$rootdir.'/editor.php?id_module='.$id_module.'&id_plugin='.$id_plugin.'&id_parent='.$id_parent.'&id_record='.$id_record.'" method="post"> <form id="add_form" action="'.$rootdir.'/controller.php" method="post" role="form">
<input type="hidden" name="id_plugin" value="'.$id_plugin.'">
<input type="hidden" name="id_parent" value="'.$id_parent.'">
<input type="hidden" name="id_record" value="'.$id_record.'">
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="'.(!empty($is_add) ? 'edit-promemoria' : 'pianificazione').'">'; <input type="hidden" name="op" value="'.(!empty($is_add) ? 'edit-promemoria' : 'pianificazione').'">';

View File

@ -27,7 +27,7 @@ echo '
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
{[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "id": "indirizzo_", "required": 1, "value": "$indirizzo$" ]} {[ "type": "text", "label": "'.tr('Indirizzo').'", "name": "indirizzo", "id": "indirizzo_", "required": 0, "value": "$indirizzo$" ]}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">