mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 08:56:48 +01:00
Blocco eliminazione stati intervento con flag can_deleted a 0
This commit is contained in:
parent
0d661f275b
commit
b0971e1bf2
@ -1,18 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once __DIR__.'/../../core.php';
|
include_once __DIR__.'/../../core.php';
|
||||||
|
?>
|
||||||
|
|
||||||
//Se lo stato intervento è uno di quelli di default, non lo lascio modificare
|
<form action="" method="post">
|
||||||
if ($records[0]['default']) {
|
|
||||||
$attr = "readonly='true'";
|
|
||||||
$warning_text = '<div class="alert alert-warning">'.tr('Puoi modificare solo il colore di questo intervento!').'</div>';
|
|
||||||
} else {
|
|
||||||
$attr = '';
|
|
||||||
$warning_text = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
echo $warning_text;
|
|
||||||
|
|
||||||
?><form action="" method="post">
|
|
||||||
<input type="hidden" name="op" value="update">
|
<input type="hidden" name="op" value="update">
|
||||||
<input type="hidden" name="backto" value="record-edit">
|
<input type="hidden" name="backto" value="record-edit">
|
||||||
<input type="hidden" name="id_record" value="<?php echo $id_record ?>">
|
<input type="hidden" name="id_record" value="<?php echo $id_record ?>">
|
||||||
@ -39,8 +29,8 @@ echo $warning_text;
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
//Se lo stato intervento è uno di quelli di default, non lo lascio modificare
|
// Record eliminabile solo se permesso
|
||||||
if (!$records[0]['default']) {
|
if ($records[0]['can_delete']) {
|
||||||
?>
|
?>
|
||||||
<a class="btn btn-danger ask" data-backto="record-list">
|
<a class="btn btn-danger ask" data-backto="record-list">
|
||||||
<i class="fa fa-trash"></i> <?php echo tr('Elimina') ?>
|
<i class="fa fa-trash"></i> <?php echo tr('Elimina') ?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user