1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-15 08:56:20 +01:00

swal per duplica preventivo

This commit is contained in:
Luca 2022-07-21 10:31:28 +02:00
parent 336e969221
commit 42683cfc89
2 changed files with 22 additions and 3 deletions

View File

@ -315,8 +315,8 @@ WHERE (SELECT COUNT(*) FROM in_interventi_tecnici WHERE in_interventi_tecnici.id
if (checkdate($data->format('m'), $data->format('d'), $data->format('Y'))){
echo '
<option value="'.$chiave.'">'.ucfirst($testo).'</option>';
echo '
<option value="'.$chiave.'">'.ucfirst($testo).'</option>';
}
}

View File

@ -20,7 +20,7 @@
include_once __DIR__.'/../../core.php';
echo '
<button type="button" class="btn btn-primary" onclick="if( confirm(\'Duplicare questo preventivo?\') ){ $(\'#copia-preventivo\').submit(); }">
<button type="button" class="btn btn-primary" onclick="copiaPreventivo();">
<i class="fa fa-copy"></i> '.tr('Duplica preventivo').'
</button>';
@ -96,3 +96,22 @@ echo '
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="op" value="copy">
</form>';
echo '
<script>
function copiaPreventivo() {
swal({
title: "'.tr('Duplicare il preventivo?').'",
text: "'.tr('').'",
type: "info",
showCancelButton: true,
confirmButtonClass: "btn btn-lg btn-primary",
confirmButtonText: "'.tr('Duplica').'",
}).then(
function() {
$("#copia-preventivo").submit();
},
function() {}
);
}
</script>';