openstamanager/modules/automezzi/edit.php

118 lines
3.7 KiB
PHP
Raw Permalink Normal View History

2023-11-30 12:57:03 +01:00
<?php
include_once __DIR__.'/../../core.php';
2024-03-05 16:01:45 +01:00
use Models\Module;
2023-11-30 12:57:03 +01:00
unset($_SESSION['superselect']['idautomezzo']);
?><form action="" method="post" id="edit-form">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="update">
<input type="hidden" name="id_record" value="<?php echo $id_record; ?>">
<!-- DATI ARTICOLO -->
2024-05-16 18:02:50 +02:00
<div class="card card-primary">
<div class="card-header">
<h3 class="card-title"><?php echo tr('Automezzo'); ?></h3>
2023-11-30 12:57:03 +01:00
</div>
2024-05-16 18:02:50 +02:00
<div class="card-body">
2023-11-30 12:57:03 +01:00
<div class="row">
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Nome'); ?>", "name": "nome", "required": 1, "value": "$nome$" ]}
</div>
<div class="col-md-4">
{[ "type": "text", "label": "<?php echo tr('Targa'); ?>", "name": "targa", "required": 1, "maxlength": 10, "class": "alphanumeric-mask", "value": "$targa$" ]}
</div>
</div>
<div class="row">
<div class="col-md-12">
{[ "type": "textarea", "label": "<?php echo tr('Descrizione'); ?>", "name": "descrizione", "value": "$descrizione$" ]}
</div>
</div>
</div>
</div>
</form>
<!-- TECNICI + MAGAZZINO AUTOMEZZO -->
<div class="row">
<!--TECNICI -->
<div class="col-md-6">
2024-05-16 18:02:50 +02:00
<div class="card card-primary">
<div class="card-header">
2023-11-30 12:57:03 +01:00
<div class="row">
<div class="col-md-12">
2024-05-16 18:02:50 +02:00
<h3 class="card-title"><?php echo tr('Tecnici responsabili automezzo'); ?></h3>
2023-11-30 12:57:03 +01:00
</div>
</div>
</div>
2024-05-16 18:02:50 +02:00
<div class="card-body">
2023-11-30 12:57:03 +01:00
<div class="row">
<div class="col-md-12" >
2024-06-11 16:58:27 +02:00
<form action="<?php echo $rootdir; ?>/editor.php?id_module=<?php echo Module::where('name', 'Automezzi')->first()->id; ?>&id_record=<?php echo $id_record; ?>" id="updatetech-form" method="post" role="form">
2023-11-30 12:57:03 +01:00
<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';
2024-01-15 15:30:45 +01:00
?>
2023-11-30 12:57:03 +01:00
</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">
2024-05-16 18:02:50 +02:00
<a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_tecnico.php?idautomezzo=<?php echo $id_record; ?>" data-card-widget="modal" data-title="Aggiungi tecnico"><i class="fa fa-plus"></i> <?php echo tr('Aggiungi tecnico'); ?></a><br>
2023-11-30 12:57:03 +01:00
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<!-- MAGAZZINO AUTOMEZZO -->
<div class="col-md-6">
2024-05-16 18:02:50 +02:00
<div class="card card-primary">
<div class="card-header">
2023-11-30 12:57:03 +01:00
<div class="row">
<div class="col-md-12">
2024-05-16 18:02:50 +02:00
<h3 class="card-title"><?php echo tr('Magazzino automezzo'); ?></h3>
2023-11-30 12:57:03 +01:00
</div>
</div>
</div>
2024-05-16 18:02:50 +02:00
<div class="card-body">
2023-11-30 12:57:03 +01:00
<div class="row">
<div class="col-md-12">
<?php
include $docroot.'/modules/automezzi/row-list-articoli.php';
2024-01-15 15:30:45 +01:00
?>
2023-11-30 12:57:03 +01:00
<div class="pull-left">
2024-05-16 18:02:50 +02:00
<a class="btn btn-sm btn-primary" data-href="<?php echo $rootdir; ?>/modules/automezzi/add_articolo.php?idautomezzo=<?php echo $id_record; ?>" data-card-widget="modal" data-title="Aggiungi articoli"><i class="fa fa-plus"></i> <?php echo tr('Articolo magazzino'); ?></a><br>
2023-11-30 12:57:03 +01:00
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<a class="btn btn-danger ask" data-backto="record-list">
<i class="fa fa-trash"></i> <?php echo tr('Elimina'); ?>
</a>
<script>
$(document).ready(function(){
$("#pulsanti .btn-info").addClass("hidden");
});
</script>