New: add possibility to hide unauthorized buttons
This commit is contained in:
parent
ec621d2dcb
commit
4f67488bd3
@ -58,6 +58,7 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["main_use_preview_tabs"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity);
|
||||
@ -207,6 +208,14 @@ if ($action == 'edit') // Edit
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED',isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)?$conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide helpcenter link on login page
|
||||
$var=!$var;
|
||||
@ -357,6 +366,12 @@ else // Show
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="35%">'.$langs->trans("ButtonHideUnauthorized").'</td><td colspan="2">';
|
||||
print yn($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED,1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Link to help center
|
||||
$var=!$var;
|
||||
|
||||
@ -144,6 +144,12 @@ td.formdocbutton {padding-top:6px;}
|
||||
color-stop(0, rgba(0,0,0,.3))
|
||||
);
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
.butActionRefused {
|
||||
display: none;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
.tabsAction {margin-top:12px !important; text-align:center;}
|
||||
.menu_titre img{padding-bottom:2px;}
|
||||
|
||||
@ -1094,6 +1094,12 @@ span.tabspan {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
.butActionRefused {
|
||||
display: none;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -1257,6 +1257,12 @@ span.tabspan {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
.butActionRefused {
|
||||
display: none;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -1230,6 +1230,12 @@ span.tabspan {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
.butActionRefused {
|
||||
display: none;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@ -1368,6 +1368,12 @@ span.tabspan {
|
||||
box-shadow: 4px 4px 4px #CCC;
|
||||
}
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { ?>
|
||||
.butActionRefused {
|
||||
display: none;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
span.butAction, span.butActionDelete {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user