From 0cd00d3328df5199c23465e1a7784db60d7767fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Bernigaud?= <come.bernigaud@opensides.be> Date: Thu, 31 Jul 2014 15:17:30 +0200 Subject: [PATCH] Fixes #2919 Hiding some sections from setup, various css fixes --- html/themes/default/plugin.css | 8 ++- html/themes/default/setup.css | 22 ++++++ plugins/config/class_configInLdap.inc | 98 +++++++++++++-------------- setup/class_setup.inc | 4 +- setup/class_setupStep_Config.inc | 3 + setup/setup_frame.tpl | 2 +- 6 files changed, 84 insertions(+), 53 deletions(-) diff --git a/html/themes/default/plugin.css b/html/themes/default/plugin.css index e4ef90193..8c36ca46e 100644 --- a/html/themes/default/plugin.css +++ b/html/themes/default/plugin.css @@ -196,6 +196,10 @@ margin-bottom:0.5%; margin-right:0.5%; } +html.ltr .plugin_section.invisible, html.rtl .plugin_section.invisible { +display:none; +} + fieldset.plugin_section.critical legend span, .plugin_section.critical > span.legend { font-weight:bold; background-color:#BCF; @@ -220,7 +224,9 @@ background-color:#DFEFFF; .plugin_section > div > table { width:100%; } - .plugin_section, .plugin_section:nth-child(even), .plugin_section.fullwidth { + html.ltr .plugin_section, html.ltr .plugin_section:nth-child(even), html.ltr .plugin_section.fullwidth, + html.rtl .plugin_section, html.rtl .plugin_section:nth-child(even), html.rtl .plugin_section.fullwidth + { display:block; float:none; clear:both; diff --git a/html/themes/default/setup.css b/html/themes/default/setup.css index 6d6a571da..0d443af97 100644 --- a/html/themes/default/setup.css +++ b/html/themes/default/setup.css @@ -1,6 +1,15 @@ /********* * Setup *********/ +body.setup a.plugtop img { +height:48px; +} +html.ltr body.setup div#header_left .plugtop { +margin-left:80px; +} +html.rtl body.setup div#header_left .plugtop { +margin-right:80px; +} div.setup_menu { background-color:#F8F8F8; @@ -169,3 +178,16 @@ padding-left:25px; html.rtl div.step2_warning_text { padding-right:25px; } + +/* On small screens */ +@media (max-width: 640px) { + body.setup a.plugtop img { + height:32px; + } + html.ltr body.setup div#header_left .plugtop { + margin-left:0px; + } + html.rtl body.setup div#header_left .plugtop { + margin-right:0px; + } +} diff --git a/plugins/config/class_configInLdap.inc b/plugins/config/class_configInLdap.inc index ac83c4f39..7055c1889 100644 --- a/plugins/config/class_configInLdap.inc +++ b/plugins/config/class_configInLdap.inc @@ -239,55 +239,6 @@ class configInLdap extends simplePlugin ), ) ), - 'miscellaneous' => array( - 'name' => _('Miscellaneous'), - 'class' => array('fullwidth'), - 'attrs' => array( - new OrderedArrayAttribute ( - new CompositeAttribute ( - _('Hooks that are called when specific actions happens'), - 'fdTabHook', - array( - new SelectAttribute( - _('tab'), _('The tab that this hook concerns'), - 'hookTab', TRUE, - $plugins - ), - new SelectAttribute( - _('mode'), _('When to call this command'), - 'hookMode', TRUE, - array('postcreate', 'postremove', 'postmodify', - 'precreate', 'preremove', 'premodify', 'check') - ), - new StringAttribute( - _('cmd'), _('The command that will be called'), - 'hookCmd', TRUE - ) - ), - '/^([^\\|]+)\\|([^\\|]+)\\|(.*)$/', - '%s|%s|%s', - '', // acl - _('Hooks') - ), - FALSE, // non-ordered - array(), - TRUE // edition - ), - new BooleanAttribute ( - _('Display hook output'), - _('When enabled successful hook execution output is displayed to the user using a dialog.'), - 'fdDisplayHookOutput' - ), - new SetAttribute( - new StringAttribute ( - _('Available shells'), _('Available POSIX shells for FD users.'), - 'fdShells', FALSE - ), - array('/bin/ash','/bin/bash','/bin/csh','/bin/sh','/bin/ksh', - '/bin/tcsh','/bin/dash','/bin/zsh') - ), - ) - ), 'people_and_group' => array( 'name' => _('People and group storage'), 'class' => array('critical'), @@ -413,6 +364,55 @@ class configInLdap extends simplePlugin ), ) ), + 'miscellaneous' => array( + 'name' => _('Miscellaneous'), + 'class' => array('fullwidth'), + 'attrs' => array( + new OrderedArrayAttribute ( + new CompositeAttribute ( + _('Hooks that are called when specific actions happens'), + 'fdTabHook', + array( + new SelectAttribute( + _('tab'), _('The tab that this hook concerns'), + 'hookTab', TRUE, + $plugins + ), + new SelectAttribute( + _('mode'), _('When to call this command'), + 'hookMode', TRUE, + array('postcreate', 'postremove', 'postmodify', + 'precreate', 'preremove', 'premodify', 'check') + ), + new StringAttribute( + _('cmd'), _('The command that will be called'), + 'hookCmd', TRUE + ) + ), + '/^([^\\|]+)\\|([^\\|]+)\\|(.*)$/', + '%s|%s|%s', + '', // acl + _('Hooks') + ), + FALSE, // non-ordered + array(), + TRUE // edition + ), + new BooleanAttribute ( + _('Display hook output'), + _('When enabled successful hook execution output is displayed to the user using a dialog.'), + 'fdDisplayHookOutput' + ), + new SetAttribute( + new StringAttribute ( + _('Available shells'), _('Available POSIX shells for FD users.'), + 'fdShells', FALSE + ), + array('/bin/ash','/bin/bash','/bin/csh','/bin/sh','/bin/ksh', + '/bin/tcsh','/bin/dash','/bin/zsh') + ), + ) + ), ); } diff --git a/setup/class_setup.inc b/setup/class_setup.inc index abff237c0..71b7afc0c 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -189,9 +189,9 @@ class setup $b_completed = $step->is_completed(); if ($b_completed) { - $s = "<img src='geticon.php?context=status&icon=task-complete&size=16' alt='"._("Completed")."' class='center'> "; + $s = "<img src='geticon.php?context=status&icon=task-complete&size=16' alt='"._("Completed")."' class='center optional'> "; } else { - $s = "<img src='images/empty.png' alt=' ' class='center'> "; + $s = "<img src='images/empty.png' alt=' ' class='center optional'> "; } if ($b_enabled) { diff --git a/setup/class_setupStep_Config.inc b/setup/class_setupStep_Config.inc index ce942fc80..07943c1b3 100644 --- a/setup/class_setupStep_Config.inc +++ b/setup/class_setupStep_Config.inc @@ -52,6 +52,9 @@ class Step_Config extends configInLdap global $config; parent::__construct($config, CONFIGRDN.$config->current['BASE']); + $this->attributesInfo['miscellaneous']['class'] = array('invisible'); + $this->attributesInfo['debug']['class'] = array('invisible'); + $this->fdLanguage = $cv['lang_selected']; } diff --git a/setup/setup_frame.tpl b/setup/setup_frame.tpl index 2d9f8e33a..5659e7796 100644 --- a/setup/setup_frame.tpl +++ b/setup/setup_frame.tpl @@ -1,5 +1,5 @@ <!-- Headline --> -<body> +<body class="setup"> {$php_errors} <form action="setup.php" name="mainform" id="mainform" method="post" enctype="multipart/form-data"> <div class="setup_header"> -- GitLab