Migliorata visualizzazione box TECNICI + MAGAZZINO AUTOMEZZO

This commit is contained in:
Luca 2018-04-24 00:03:25 +02:00
parent c688f1b4a7
commit 15eae0bdf1
3 changed files with 57 additions and 41 deletions

View File

@ -22,13 +22,13 @@ echo '
// Data di partenza // Data di partenza
echo ' echo '
<div class="col-md-3"> <div class="col-md-3">
{[ "type": "date", "label": "'.tr('Data dal').'", "name": "data_inizio", "required": 1, "class": "text-center", "value": "-now-" ]} {[ "type": "date", "label": "'.tr('Data dal').'", "name": "data_inizio", "required": 1, "maxlength": 10, "value": "-now-" ]}
</div>'; </div>';
// Data di fine // Data di fine
echo ' echo '
<div class="col-md-3"> <div class="col-md-3">
{[ "type": "date", "label": "'.tr('Data al').'", "name": "data_fine", "value": "", "min-date": "-now-" ]} {[ "type": "date", "label": "'.tr('Data al').'", "name": "data_fine", "value": "", "maxlength": 10, "min-date": "-now-" ]}
</div>'; </div>';
echo ' echo '

View File

@ -32,56 +32,72 @@ include_once __DIR__.'/../../core.php';
</div> </div>
</form> </form>
<!-- TECNICI --> <!-- TECNICI + MAGAZZINO AUTOMEZZO -->
<div class="panel panel-primary"> <div class="row">
<div class="panel-heading"> <!--TECNICI -->
<div class="row"> <div class="col-md-6">
<div class="col-md-6"> <div class="panel panel-primary">
<h3 class="panel-title"><?php echo tr('Tecnici responsabili automezzo'); ?></h3> <div class="panel-heading">
<div class="row">
<div class="col-md-12">
<h3 class="panel-title"><?php echo tr('Tecnici responsabili automezzo'); ?></h3>
</div>
</div>
</div> </div>
<div class="col-md-6">
<h3 class="panel-title"><?php echo tr('Magazzino automezzo'); ?></h3> <div class="panel-body">
<div class="row">
<div class="col-md-12" >
<form action="<?php echo $rootdir; ?>/editor.php?id_module=<?php echo Modules::get('Automezzi')['id']; ?>&id_record=<?php echo $id_record; ?>" id="updatetech-form" method="post" role="form">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="id_record" value="<?php echo $id_record; ?>">
<input type="hidden" name="op" value="">
<?php
include $docroot.'/modules/automezzi/row-list-tecnici.php';
?>
</form>
<a href="javascript:;" class="btn btn-sm btn-success pull-right" title="Aggiorna date" onclick="$('#updatetech-form input[name=op]').val('savetech'); $('#updatetech-form').submit();"><i class="fa fa-edit"></i> <?php echo tr('Salva date'); ?></a>
<div class="pull-left">
<a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_tecnico.php?idautomezzo=<?php echo $id_record; ?>" data-toggle="modal" data-title="Aggiungi tecnico" data-target="#bs-popup"><i class="fa fa-plus"></i> <?php echo tr('Aggiungi tecnico'); ?></a><br>
</div>
<div class="clearfix"></div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="panel-body">
<div class="row"> <!-- MAGAZZINO AUTOMEZZO -->
<div class="col-md-6" style="border-right:1px solid #DDD;"> <div class="col-md-6">
<form action="<?php echo $rootdir; ?>/editor.php?id_module=<?php echo Modules::get('Automezzi')['id']; ?>&id_record=<?php echo $id_record; ?>" id="updatetech-form" method="post" role="form"> <div class="panel panel-primary">
<input type="hidden" name="backto" value="record-edit"> <div class="panel-heading">
<input type="hidden" name="id_record" value="<?php echo $id_record; ?>"> <div class="row">
<input type="hidden" name="op" value=""> <div class="col-md-12">
<h3 class="panel-title"><?php echo tr('Magazzino automezzo'); ?></h3>
<?php </div>
include $docroot.'/modules/automezzi/row-list-tecnici.php';
?>
</form>
<a href="javascript:;" class="btn btn-sm btn-success pull-right" title="Aggiorna date" onclick="$('#updatetech-form input[name=op]').val('savetech'); $('#updatetech-form').submit();"><i class="fa fa-edit"></i> <?php echo tr('Salva date'); ?></a>
<div class="pull-left">
<a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_tecnico.php?idautomezzo=<?php echo $id_record; ?>" data-toggle="modal" data-title="Aggiungi tecnico" data-target="#bs-popup"><i class="fa fa-plus"></i> <?php echo tr('Aggiungi tecnico'); ?></a><br>
</div> </div>
<div class="clearfix"></div>
</div> </div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<?php
include $docroot.'/modules/automezzi/row-list-articoli.php';
?>
<div class="col-md-6"> <div class="pull-left">
<?php <a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_articolo.php?idautomezzo=<?php echo $id_record; ?>" data-toggle="modal" data-title="Aggiungi articoli" data-target="#bs-popup"><i class="fa fa-plus"></i> <?php echo tr('Articolo magazzino'); ?></a><br>
include $docroot.'/modules/automezzi/row-list-articoli.php'; </div>
?> <div class="clearfix"></div>
</div>
<div class="pull-left">
<a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_articolo.php?idautomezzo=<?php echo $id_record; ?>" data-toggle="modal" data-title="Aggiungi articoli" data-target="#bs-popup"><i class="fa fa-plus"></i> <?php echo tr('Articolo magazzino'); ?></a><br>
</div> </div>
<div class="clearfix"></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -30,13 +30,13 @@ if (!empty($rs_art)) {
// Data di inizio // Data di inizio
echo ' echo '
<td> <td>
{[ "type": "date", "name": "data_inizio['.$r['id'].']", "required": 1, "class": "text-center", "value": "'.$r['data_inizio'].'", "extra": "" ]} {[ "type": "date", "name": "data_inizio['.$r['id'].']", "required": 1, "maxlength": 10, "value": "'.$r['data_inizio'].'", "extra": "" ]}
</td>'; </td>';
// Data di fine // Data di fine
echo ' echo '
<td> <td>
{[ "type": "date", "name": "data_fine['.$r['id'].']", "class": "text-center", "value": "'.$r['data_fine'].'", "min-date": "'.$r['data_inizio'].'", "extra": "" ]} {[ "type": "date", "name": "data_fine['.$r['id'].']", "maxlength": 10, "value": "'.$r['data_fine'].'", "min-date": "'.$r['data_inizio'].'", "extra": "" ]}
</td>'; </td>';
// Pulsanti per aggiornamento date tecnici // Pulsanti per aggiornamento date tecnici