mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Add a confirm box before deleting.
This commit is contained in:
@@ -245,6 +245,13 @@ if ($conf->societe->enabled)
|
||||
// For products
|
||||
if ($conf->product->enabled || $conf->product->service)
|
||||
{
|
||||
// Example 1 : Adding jquery code
|
||||
print '<script type="text/javascript" language="javascript">
|
||||
function confirm_erase() {
|
||||
return confirm("'.dol_escape_js($langs->trans("ConfirmEraseAllCurrentBarCode")).'");
|
||||
}
|
||||
</script>';
|
||||
|
||||
$nbno=$nbtotal=0;
|
||||
|
||||
print_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"),'','').'<br>'."\n";
|
||||
@@ -296,8 +303,6 @@ if ($conf->product->enabled || $conf->product->service)
|
||||
if (empty($nbno))
|
||||
{
|
||||
$disabled1=1;
|
||||
$titleno=$langs->trans("NoRecordWithoutBarcodeDefined");
|
||||
print '<font class="ok">'.$langs->trans("NoRecordWithoutBarcodeDefined").'</font><br>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
@@ -306,7 +311,7 @@ if ($conf->product->enabled || $conf->product->service)
|
||||
print '<input class="button" type="submit" name="submitformbarcodeproductgen" id="submitformbarcodeproductgen" value="'.$langs->trans("InitEmptyBarCode",min($maxperinit,$nbno)).'"'.$moretags1.'>';
|
||||
$moretags2=(($nbno == $nbtotal)?' disabled="disabled"':'');
|
||||
print ' ';
|
||||
print '<input class="button" type="submit" name="eraseallbarcode" id="eraseallbarcode" value="'.$langs->trans("EraseAllCurrentBarCode").'"'.$moretags2.'>';
|
||||
print '<input class="button" type="submit" name="eraseallbarcode" id="eraseallbarcode" value="'.$langs->trans("EraseAllCurrentBarCode").'"'.$moretags2.' onClick="return confirm_erase();">';
|
||||
print '<br><br><br>';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user