diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css index 493e8eba..b341e5b4 100644 --- a/lam/style/500_layout.css +++ b/lam/style/500_layout.css @@ -347,6 +347,7 @@ table.collapse { /** titles */ .titleText { color: black; + text-align: left; } /** subtitles */ @@ -358,6 +359,7 @@ table.collapse { .subTitleText { margin: 0px 0px 0px 10px; color: black; + text-align: left; } .hidden { diff --git a/lam/templates/config/conflogin.php b/lam/templates/config/conflogin.php index 1199d390..f2c5e8a3 100644 --- a/lam/templates/config/conflogin.php +++ b/lam/templates/config/conflogin.php @@ -56,6 +56,7 @@ session_regenerate_id(true); setlanguage(); +$message = null; // get error message from confmain.php if (isset($_SESSION['conf_message'])) { $message = $_SESSION['conf_message']; diff --git a/lam/templates/config/profmanage.php b/lam/templates/config/profmanage.php index 02f4765d..08ace0af 100644 --- a/lam/templates/config/profmanage.php +++ b/lam/templates/config/profmanage.php @@ -1,9 +1,23 @@ - - - <?php - echo _("Profile management"); - ?> - - read(); - while ($cssEntry !== false) { - if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') { - $cssFiles[] = $cssEntry; - } - $cssEntry = $cssDir->read(); - } - sort($cssFiles); - foreach ($cssFiles as $cssEntry) { - echo "\n"; - } - ?> - - - +
@@ -180,66 +169,44 @@ echo $_SESSION['header'];
-
read()) { - if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue; - $jsFiles[] = $jsEntry; -} -sort($jsFiles); -foreach ($jsFiles as $jsEntry) { - echo "\n"; -} - -// print messages -if (isset($error) || isset($msg)) { - if (isset($error)) { - StatusMessage("ERROR", $error); - } - if (isset($msg)) { - StatusMessage("INFO", $msg); - } -} - -// check if config.cfg is valid -if (!isset($cfg->default)) { - StatusMessage("ERROR", _("Please set up your master configuration file (config/config.cfg) first!"), ""); - echo "\n\n"; - die(); -} +printJsIncludes('../..'); ?> -
addElement(new htmlTitle(_("Profile management")), true); +$row = new htmlResponsiveRow(); + +// print messages +if (isset($error)) { + $row->add(new htmlStatusMessage('ERROR', $error), 12); + $row->addVerticalSpacer('1rem'); +} +if (isset($msg)) { + $row->add(new htmlStatusMessage('INFO', $msg), 12); + $row->addVerticalSpacer('1rem'); +} + +$box = new htmlResponsiveRow(); +$box->add(new htmlTitle(_("Profile management")), 12); // new profile -$container->addElement(new htmlSubTitle(_("Add profile")), true); -$newProfileInput = new htmlTableExtendedInputField(_("Profile name"), 'addprofile', null, '230'); -$newProfileInput->setFieldSize(15); -$container->addElement($newProfileInput, true); -$profileNewPwd1 = new htmlTableExtendedInputField(_("Profile password"), 'addpassword'); +$box->add(new htmlSubTitle(_("Add profile")), 12); +$newProfileInput = new htmlResponsiveInputField(_("Profile name"), 'addprofile', null, '230'); +$box->add($newProfileInput, 12); +$profileNewPwd1 = new htmlResponsiveInputField(_("Profile password"), 'addpassword'); $profileNewPwd1->setIsPassword(true); -$profileNewPwd1->setFieldSize(15); -$container->addElement($profileNewPwd1, true); -$profileNewPwd2 = new htmlTableExtendedInputField(_("Reenter password"), 'addpassword2'); +$box->add($profileNewPwd1, 12); +$profileNewPwd2 = new htmlResponsiveInputField(_("Reenter password"), 'addpassword2'); $profileNewPwd2->setIsPassword(true); -$profileNewPwd2->setFieldSize(15); $profileNewPwd2->setSameValueFieldID('addpassword'); -$container->addElement($profileNewPwd2, true); +$box->add($profileNewPwd2, 12); $existing = array(); foreach ($files as $file) { $existing[$file] = $file . '.conf'; @@ -252,86 +219,89 @@ $templates = array( _('Built-in templates') => $builtIn, _('Existing server profiles') => $existing, ); -$addTemplateSelect = new htmlTableExtendedSelect('addTemplate', $templates, array('unix.conf.sample'), _('Template'), '267'); +$addTemplateSelect = new htmlResponsiveSelect('addTemplate', $templates, array('unix.conf.sample'), _('Template'), '267'); $addTemplateSelect->setContainsOptgroups(true); $addTemplateSelect->setHasDescriptiveElements(true); -$container->addElement($addTemplateSelect, true); +$box->add($addTemplateSelect, 12); +$box->addVerticalSpacer('0.5rem'); $newProfileButton = new htmlButton('btnAddProfile', _('Add')); $newProfileButton->setOnClick("jQuery('#action').val('add');showConfirmationDialog('" . _("Add profile") . "', '" . _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); -$container->addElement($newProfileButton, true); -$container->addElement($topicSpacer, true); +$box->addLabel($newProfileButton); +$box->add(new htmlOutputText(''), 0, 6); // rename profile -$container->addElement(new htmlSubTitle(_("Rename profile")), true); -$container->addElement(new htmlTableExtendedSelect('oldfilename', $files, array(), _('Profile name'), '231'), true); -$oldProfileInput = new htmlTableExtendedInputField(_('New profile name'), 'renfilename'); -$oldProfileInput->setFieldSize(15); -$container->addElement($oldProfileInput, true); +$box->add(new htmlSubTitle(_("Rename profile")), 12); +$box->add(new htmlResponsiveSelect('oldfilename', $files, array(), _('Profile name'), '231'), 12); +$oldProfileInput = new htmlResponsiveInputField(_('New profile name'), 'renfilename'); +$box->add($oldProfileInput, 12); +$box->addVerticalSpacer('0.5rem'); $renameProfileButton = new htmlButton('btnRenameProfile', _('Rename')); $renameProfileButton->setOnClick("jQuery('#action').val('rename');showConfirmationDialog('" . _("Rename profile") . "', '" . _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); -$container->addElement($renameProfileButton, true); -$container->addElement($topicSpacer, true); +$box->addLabel($renameProfileButton); +$box->add(new htmlOutputText(''), 0, 6); // delete profile -$container->addElement(new htmlSubTitle(_("Delete profile")), true); -$container->addElement(new htmlTableExtendedSelect('delfilename', $files, array(), _('Profile name'), '232'), true); +$box->add(new htmlSubTitle(_("Delete profile")), 12); +$box->add(new htmlResponsiveSelect('delfilename', $files, array(), _('Profile name'), '232'), 12); +$box->addVerticalSpacer('0.5rem'); $deleteProfileButton = new htmlButton('btnDeleteProfile', _('Delete')); $deleteProfileButton->setOnClick("jQuery('#action').val('delete');showConfirmationDialog('" . _("Delete profile") . "', '" . _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); -$container->addElement($deleteProfileButton, true); -$container->addElement($topicSpacer, true); +$box->addLabel($deleteProfileButton); +$box->add(new htmlOutputText(''), 0, 6); // set password -$container->addElement(new htmlSubTitle(_("Set profile password")), true); -$container->addElement(new htmlTableExtendedSelect('setprofile', $files, array(), _('Profile name'), '233'), true); -$profileSetPwd1 = new htmlTableExtendedInputField(_("Profile password"), 'setpassword'); +$box->add(new htmlSubTitle(_("Set profile password")), 12); +$box->add(new htmlResponsiveSelect('setprofile', $files, array(), _('Profile name'), '233'), 12); +$profileSetPwd1 = new htmlResponsiveInputField(_("Profile password"), 'setpassword'); $profileSetPwd1->setIsPassword(true); -$profileSetPwd1->setFieldSize(15); -$container->addElement($profileSetPwd1, true); -$profileSetPwd2 = new htmlTableExtendedInputField(_("Reenter password"), 'setpassword2'); +$box->add($profileSetPwd1, 12); +$profileSetPwd2 = new htmlResponsiveInputField(_("Reenter password"), 'setpassword2'); $profileSetPwd2->setIsPassword(true); -$profileSetPwd2->setFieldSize(15); $profileSetPwd2->setSameValueFieldID('setpassword'); -$container->addElement($profileSetPwd2, true); +$box->add($profileSetPwd2, 12); +$box->addVerticalSpacer('0.5rem'); $setPasswordProfileButton = new htmlButton('btnSetPasswordProfile', _('Set profile password')); $setPasswordProfileButton->setOnClick("jQuery('#action').val('setpass');showConfirmationDialog('" . _("Set profile password") . "', '" . - _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); -$container->addElement($setPasswordProfileButton, true); -$container->addElement($topicSpacer, true); + _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); +$box->addLabel($setPasswordProfileButton, 12); +$box->add(new htmlOutputText(''), 0, 6); + // set default profile $conf = new LAMCfgMain(); $defaultprofile = $conf->default; -$container->addElement(new htmlSubTitle(_("Change default profile")), true); -$container->addElement(new htmlTableExtendedSelect('defaultfilename', $files, array($defaultprofile), _('Profile name'), '234'), true); +$box->add(new htmlSubTitle(_("Change default profile")), 12); +$box->add(new htmlResponsiveSelect('defaultfilename', $files, array($defaultprofile), _('Profile name'), '234'), 12); +$box->addVerticalSpacer('0.5rem'); $defaultProfileButton = new htmlButton('btnDefaultProfile', _('Ok')); $defaultProfileButton->setOnClick("jQuery('#action').val('setdefault');showConfirmationDialog('" . _("Change default profile") . "', '" . _('Ok') . "', '" . _('Cancel') . "', 'passwordDialogDiv', 'profileForm', null); document.getElementById('passwd').focus();"); -$container->addElement($defaultProfileButton, true); -$container->addElement($topicSpacer, true); +$box->addLabel($defaultProfileButton); +$box->add(new htmlOutputText(''), 0, 6); -$container->addElement(new htmlHiddenInput('action', 'none'), true); +$boxDiv = new htmlDiv(null, $box); +$boxDiv->setCSSClasses(array('ui-corner-all', 'roundedShadowBox', 'limitWidth')); +$row->add($boxDiv, 12); -$dialogDivContent = new htmlTable(); -$dialogDivContent->addElement(new htmlOutputText(_("Master password"))); -$masterPassword = new htmlInputField('passwd'); +$row->add(new htmlHiddenInput('action', 'none'), 12); + +// dialog +$dialogDivContent = new htmlResponsiveRow(); +$masterPassword = new htmlResponsiveInputField(_("Master password"), 'passwd', '', '236'); $masterPassword->setIsPassword(true); -$dialogDivContent->addElement($masterPassword); -$dialogDivContent->addElement(new htmlHelpLink('236')); +$dialogDivContent->add($masterPassword, 12); $dialogDiv = new htmlDiv('passwordDialogDiv', $dialogDivContent); $dialogDiv->setCSSClasses(array('hidden')); -$container->addElement($dialogDiv, true); +$row->add($dialogDiv, 12); -$container->setCSSClasses(array('roundedShadowBox', 'ui-corner-all')); +$row->addVerticalSpacer('2rem'); +$backLink = new htmlLink(_("Back to profile login"), 'conflogin.php', '../../graphics/undo.png'); +$row->add($backLink, 12, 12, 12, 'text-left'); -$mainContainer = new htmlGroup(); -$mainContainer->addElement($container); -$mainContainer->addElement(new htmlOutputText('


', false)); -$mainContainer->addElement(new htmlLink(_("Back to profile login"), 'conflogin.php', '../../graphics/undo.png')); - -parseHtml('', $mainContainer, array(), false, $tabindex, 'user'); +parseHtml('', new htmlDiv(null, $row, array('centeredTable')), array(), false, $tabindex, 'user'); ?>