gest366/modules/ms_cespiti/edit.php

108 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2021-02-24 20:40:04 +00:00
<form action="" method="post" role="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 ?>">
<div class="panel panel-primary">
<div class="clearfix"></div>
</br>
<div class="col-md-4">
<div class="pull-left">
<button type="submit" class="btn-app btn-success"><i class="fa fa-check"></i> Salva </button>
</div>
</div>
<div class="col-md-4">
<div class="pull-right">
<div class="pull-left showcase sweet">
<button type="button" class="btn-app btn-danger" aria-label="Show SweetAlert2 success message" ><i class="fa fa-trash-o"></i> Elimina</span></button>
</div>
</div>
</div>
<div class="col-md-4">
</div>
<div class="clearfix"></div>
</div>
<!-- INTESTAZIONE -->
<div class="panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Cespite</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-3">
{[ "type": "text", "label": "N° Cespite", "name": "numero", "required": 1, "class": "text-center", "value": "$numero$", "extra": "" ]}
</div>
<div class="col-md-2">
{[ "type": "date", "label": "Data", "maxlength": 10, "name": "data", "required": 1, "class": "text-center datepicker", "value": "$data$", "extra": "" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "Gruppo", "name": "idgruppo", "required": 0, "class": "", "values": "query=SELECT * FROM ms_cespitigruppo", "value": "$idgruppocespite$", "extra": "" ]}
</div>
<div class="col-md-3">
{[ "type": "select", "label": "Stato", "name": "idstato", "required": 0, "class": "", "values": "query=SELECT * FROM ms_cespitistati", "value": "$idtipocespite$", "extra": "" ]}
</div>
</div>
<div class="row">
<div class="col-md-12">
{[ "type": "textarea", "label": "Descrizione", "name": "descrizione", "required": 1, "class": "", "value": "$descrizione$", "extra": "" ]}
</div>
</div>
</div>
</div>
</form>
<form action="" method="post" role="form" id="form-delete">
<input type="hidden" name="backto" value="record-list">
<input type="hidden" name="op" value="delete">
</form>
<script>
$('.showcase.sweet button').on('click', () => {
swal({
title: 'Sei sicuro?',
text: "Eliminare questo elemento!",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Conferma!'
}).then((result) => {
if (result.value) {
{ $('#form-delete').submit(); }
}
})
})
</script>