feature 2559: minor redesign on configuration screens

* hide "rate_anonymous" when "rate" is deactivated
* hide "email_admin_on_new_user" when "allow_user_registration" is deactivated
* move history settings on main tab
* turn the 3 lines for history into a single line with 3 checkboxes
* for comments, turn the "notify admin" settings into a single line with 4 checkboxes

TODO: remove obsolete language keys


git-svn-id: http://piwigo.org/svn/trunk@13004 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2012-01-31 15:19:09 +00:00
parent 7157b8a8f4
commit d03e85cfb5
6 changed files with 235 additions and 219 deletions
+3 -30
View File
@@ -52,18 +52,15 @@ $main_checkboxes = array(
'rate_anonymous',
'email_admin_on_new_user',
'allow_user_customization',
'log',
'history_admin',
'history_guest',
);
$sizes_checkboxes = array(
'original_resize',
);
$history_checkboxes = array(
'log',
'history_admin',
'history_guest'
);
$comments_checkboxes = array(
'activate_comments',
'comments_forall',
@@ -207,14 +204,6 @@ if (isset($_POST['submit']))
break;
}
case 'history' :
{
foreach( $history_checkboxes as $checkbox)
{
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
}
break;
}
case 'comments' :
{
// the number of comments per page must be an integer between 5 and 50
@@ -295,7 +284,6 @@ $tabsheet = new tabsheet();
$tabsheet->add('main', l10n('Main'), $conf_link.'main');
$tabsheet->add('sizes', l10n('Photo Sizes'), $conf_link.'sizes');
$tabsheet->add('display', l10n('Display'), $conf_link.'display');
$tabsheet->add('history', l10n('History'), $conf_link.'history');
$tabsheet->add('comments', l10n('Comments'), $conf_link.'comments');
$tabsheet->add('default', l10n('Guest Settings'), $conf_link.'default');
// TabSheet selection
@@ -387,21 +375,6 @@ switch ($page['section'])
}
break;
}
case 'history' :
{
//Necessary for merge_block_vars
foreach ($history_checkboxes as $checkbox)
{
$template->append(
'history',
array(
$checkbox => $conf[$checkbox]
),
true
);
}
break;
}
case 'comments' :
{
$template->assign(