diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 795a0557f16..516197b7a70 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2013-2015 Juanjo Menent * @@ -47,9 +47,6 @@ $allow_disable_encryption = true; if ($action == 'setgeneraterule') { if (!dolibarr_set_const($db, 'USER_PASSWORD_GENERATED', $_GET["value"], 'chaine', 0, '', $conf->entity)) { dol_print_error($db); - } else { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; } } @@ -94,8 +91,6 @@ if ($action == 'activate_encrypt') { //exit; if (!$error) { $db->commit(); - header("Location: security.php"); - exit; } else { $db->rollback(); dol_print_error($db, ''); @@ -106,8 +101,6 @@ if ($action == 'activate_encrypt') { if ($allow_disable_encryption) { dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", $conf->entity); } - header("Location: security.php"); - exit; } if ($action == 'activate_encryptdbpassconf') { @@ -138,12 +131,8 @@ if ($action == 'activate_encryptdbpassconf') { if ($action == 'activate_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_set_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", '1', 'chaine', 0, '', $conf->entity); - header("Location: security.php"); - exit; } elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') { dolibarr_del_const($db, "MAIN_SECURITY_DISABLEFORGETPASSLINK", $conf->entity); - header("Location: security.php"); - exit; } if ($action == 'updatepattern') { @@ -387,9 +376,9 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso") { // Cryptage mot de passe print '
'; -print "
"; +print ''; print ''; -print ""; +print ''; print ''; print ''; @@ -408,7 +397,7 @@ if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) { print ''; if (!getDolGlobalString('DATABASE_PWD_ENCRYPTED')) { print '"; } @@ -418,7 +407,7 @@ if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) { if ($allow_disable_encryption) { //On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes //Do not allow "disable encryption" as passwords cannot be decrypted - print ''.$langs->trans("Disable").''; + print ''.$langs->trans("Disable").''; } else { print '-'; } @@ -444,10 +433,10 @@ if (empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass)) { print img_warning($langs->trans("WarningPassIsEmpty")); } else { if (empty($dolibarr_main_db_encrypted_pass)) { - print ''.$langs->trans("Activate").''; + print ''.$langs->trans("Activate").''; } if (!empty($dolibarr_main_db_encrypted_pass)) { - print ''.$langs->trans("Disable").''; + print ''.$langs->trans("Disable").''; } } print ""; @@ -467,12 +456,12 @@ if (getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) { print ''; if (!getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) { print '"; } if (getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) { print '"; } print ""; diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 090e2254541..9e103422b97 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -200,10 +200,10 @@ print ''; print '
'; - print ''.$langs->trans("Activate").''; + print ''.$langs->trans("Activate").''; print "'; - print ''.$langs->trans("Activate").''; + print ''.$langs->trans("Activate").''; print "'; - print ''.$langs->trans("Disable").''; + print ''.$langs->trans("Disable").''; print "
'; -print dol_get_fiche_end(); - print $form->buttonsSaveCancel("Modify", ''); +print dol_get_fiche_end(); + print '
'; // End of page diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index c055dd1d3b5..a512222aca2 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -197,9 +197,10 @@ $typewecanchangeinto = array( 'text'=>array('text', 'html'), 'html'=>array('text', 'html'), 'password'=>array('password', 'varchar'), - 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), - 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), - 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), + 'mail'=>array('ip', 'varchar', 'phone', 'mail', 'url', 'select'), + 'url'=>array('ip', 'varchar', 'phone', 'mail', 'url', 'select'), + 'phone'=>array('ip', 'varchar', 'phone', 'mail', 'url', 'select'), + 'ip'=>array('ip', 'varchar', 'phone', 'mail', 'url', 'select'), 'select'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'date'=>array('date', 'datetime') ); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index f34d0a17e15..24343c773d5 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2305,4 +2305,4 @@ MAIN_MAIL_SMTPS_AUTH_TYPE=Authentification method UsePassword=Use a password UseOauth=Use a OAUTH token Images=Images -MaxNumberOfImagesInGetPost=Max number of images allowed in GETPOST check \ No newline at end of file +MaxNumberOfImagesInGetPost=Max number of images allowed in a HTML field submitted in a form \ No newline at end of file