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
echo '
<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>';
// Data di fine
echo '
<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>';
echo '

View File

@ -32,57 +32,73 @@ include_once __DIR__.'/../../core.php';
</div>
</form>
<!-- TECNICI -->
<div class="panel panel-primary">
<!-- TECNICI + MAGAZZINO AUTOMEZZO -->
<div class="row">
<div class="panel-heading">
<div class="row">
<div class="col-md-6">
<h3 class="panel-title"><?php echo tr('Tecnici responsabili automezzo'); ?></h3>
<!--TECNICI -->
<div class="col-md-6">
<div class="panel panel-primary">
<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 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 class="panel-body">
<div class="row">
<div class="col-md-6" style="border-right:1px solid #DDD;">
<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>
<!-- MAGAZZINO AUTOMEZZO -->
<div class="col-md-6">
<div class="panel panel-primary">
<div class="panel-heading">
<div class="row">
<div class="col-md-12">
<h3 class="panel-title"><?php echo tr('Magazzino automezzo'); ?></h3>
</div>
</div>
<div class="clearfix"></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">
<?php
include $docroot.'/modules/automezzi/row-list-articoli.php';
?>
<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 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 class="clearfix"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<a class="btn btn-danger ask" data-backto="record-list">

View File

@ -30,13 +30,13 @@ if (!empty($rs_art)) {
// Data di inizio
echo '
<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>';
// Data di fine
echo '
<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>';
// Pulsanti per aggiornamento date tecnici