mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix button to save must be hidden if in readonly mode
This commit is contained in:
parent
699d5047b1
commit
dea7edc22a
|
|
@ -94,13 +94,13 @@ if (getDolGlobalString('CRON_DISABLE_KEY_CHANGE')) {
|
|||
}
|
||||
print '<td>';
|
||||
if (!getDolGlobalString('CRON_DISABLE_KEY_CHANGE')) {
|
||||
print '<input type="text" class="flat minwidth300"'.$disabled.' id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST('CRON_KEY') ? GETPOST('CRON_KEY') : (getDolGlobalString('CRON_KEY') ? $conf->global->CRON_KEY : '')).'">';
|
||||
print '<input type="text" class="flat minwidth300 widthcentpercentminusx"'.$disabled.' id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST('CRON_KEY') ? GETPOST('CRON_KEY') : getDolGlobalString('CRON_KEY')).'">';
|
||||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
|
||||
}
|
||||
} else {
|
||||
print(getDolGlobalString('CRON_KEY') ? $conf->global->CRON_KEY : '');
|
||||
print '<input type="hidden" id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST('CRON_KEY') ? GETPOST('CRON_KEY') : (getDolGlobalString('CRON_KEY') ? $conf->global->CRON_KEY : '')).'">';
|
||||
print getDolGlobalString('CRON_KEY');
|
||||
print '<input type="hidden" id="CRON_KEY" name="CRON_KEY" value="'.(GETPOST('CRON_KEY') ? GETPOST('CRON_KEY') : getDolGlobalString('CRON_KEY')).'">';
|
||||
}
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
|
|
@ -110,7 +110,9 @@ print '</table>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
if (!getDolGlobalString('CRON_DISABLE_KEY_CHANGE')) {
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
}
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -119,7 +121,7 @@ print '<br><br><br>';
|
|||
|
||||
//print $langs->trans("UseMenuModuleToolsToAddCronJobs", dol_buildpath('/cron/list.php?leftmenu=admintools', 1)).'<br>';
|
||||
if (getDolGlobalString('CRON_WARNING_DELAY_HOURS')) {
|
||||
print info_admin($langs->trans("WarningCronDelayed", $conf->global->CRON_WARNING_DELAY_HOURS)).'<br>';
|
||||
print info_admin($langs->trans("WarningCronDelayed", getDolGlobalString('CRON_WARNING_DELAY_HOURS'))).'<br>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user