Qual: Factorize code. Removed useless code.
This commit is contained in:
parent
b4e1d642b7
commit
70d0017798
@ -236,7 +236,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
elseif ($conf->global->MAIN_MAIL_SENDMODE == 'smtps') $text = 'SMTPS library';
|
elseif ($conf->global->MAIN_MAIL_SENDMODE == 'smtps') $text = 'SMTPS library';
|
||||||
else { $text = $langs->trans("Undefined"); }
|
else { $text = $langs->trans("Undefined"); }
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
print $html->textwithpicto($text,$htmltext,1,0,'superadmin');
|
print $html->textwithpicto($text,$htmltext,1,'superadmin');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
{
|
{
|
||||||
$text = $conf->global->MAIN_MAIL_SMTP_SERVER ? $conf->global->MAIN_MAIL_SMTP_SERVER : $smtpserver;
|
$text = $conf->global->MAIN_MAIL_SMTP_SERVER ? $conf->global->MAIN_MAIL_SMTP_SERVER : $smtpserver;
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
print $html->textwithpicto($text,$htmltext,1,0,'superadmin');
|
print $html->textwithpicto($text,$htmltext,1,'superadmin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -291,7 +291,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
{
|
{
|
||||||
$text = $conf->global->MAIN_MAIL_SMTP_PORT ? $conf->global->MAIN_MAIL_SMTP_PORT : $smtpport;
|
$text = $conf->global->MAIN_MAIL_SMTP_PORT ? $conf->global->MAIN_MAIL_SMTP_PORT : $smtpport;
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
print $html->textwithpicto($text,$htmltext,1,0,'superadmin');
|
print $html->textwithpicto($text,$htmltext,1,'superadmin');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -309,7 +309,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
print $html->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,0,'superadmin');
|
print $html->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID,$htmltext,1,'superadmin');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
@ -327,7 +327,7 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||||
print $html->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,0,'superadmin');
|
print $html->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW,$htmltext,1,'superadmin');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -203,7 +203,7 @@ if (function_exists("imagecreatefrompng"))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$desc = $html->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,0,'warning');
|
$desc = $html->textwithpicto('',$langs->transnoentities("EnableGDLibraryDesc"),1,'warning');
|
||||||
print $desc;
|
print $desc;
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -246,7 +246,7 @@ if (function_exists("cl_scanfile")) // Clamav
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$desc = $html->textwithpicto('',$langs->transnoentities("EnablePhpAVModuleDesc"),1,0,'warning');
|
$desc = $html->textwithpicto('',$langs->transnoentities("EnablePhpAVModuleDesc"),1,'warning');
|
||||||
print $desc;
|
print $desc;
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
@ -128,7 +128,7 @@ else
|
|||||||
}
|
}
|
||||||
if ($show==0) print $row[1];
|
if ($show==0) print $row[1];
|
||||||
if ($show==1) print $html->textwithhelp($row[1],$text);
|
if ($show==1) print $html->textwithhelp($row[1],$text);
|
||||||
if ($show==2) print $html->textwithpicto($row[1],$text,1,0,'warning');
|
if ($show==2) print $html->textwithpicto($row[1],$text,1,'warning');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -171,7 +171,7 @@ class Form
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$alt='';
|
$alt='';
|
||||||
if ($type == 'help') $img=img_help($alt);
|
if ($type == 'help') $img=img_help(1,$alt);
|
||||||
if ($type == 'warning') $img=img_warning($alt);
|
if ($type == 'warning') $img=img_warning($alt);
|
||||||
if ($type == 'superadmin') $img=img_redstar($alt);
|
if ($type == 'superadmin') $img=img_redstar($alt);
|
||||||
if (empty($conf->use_javascript_ajax)) $alt='Help disabled (javascript disabled)';
|
if (empty($conf->use_javascript_ajax)) $alt='Help disabled (javascript disabled)';
|
||||||
|
|||||||
@ -1337,7 +1337,7 @@ else
|
|||||||
$text='<input size="12" maxlength="32" type="text" class="flat" name="password" value="'.$fuser->pass.'">';
|
$text='<input size="12" maxlength="32" type="text" class="flat" name="password" value="'.$fuser->pass.'">';
|
||||||
if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http')
|
if ($dolibarr_main_authentication && $dolibarr_main_authentication == 'http')
|
||||||
{
|
{
|
||||||
$text=$html->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,0,'warning');
|
$text=$html->textwithpicto($text,$langs->trans("DolibarrInHttpAuthenticationSoPasswordUseless",$dolibarr_main_authentication),1,'warning');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1366,7 +1366,7 @@ else
|
|||||||
{
|
{
|
||||||
$yn = yn($fuser->admin);
|
$yn = yn($fuser->admin);
|
||||||
print '<input type="hidden" name="admin" value="'.$fuser->admin.'">';
|
print '<input type="hidden" name="admin" value="'.$fuser->admin.'">';
|
||||||
print $html->textwithpicto($yn,$langs->trans("DontChangeSuperAdmin"),1,0,'warning');
|
print $html->textwithpicto($yn,$langs->trans("DontChangeSuperAdmin"),1,'warning');
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user