moved additional filter and hidden type to advanced options

This commit is contained in:
Roland Gruber 2013-04-29 18:16:14 +00:00
parent bc08c52c70
commit ebafcf33b1
1 changed files with 40 additions and 29 deletions

View File

@ -233,12 +233,22 @@ if (sizeof($activeTypes) > 0) {
$activeContainer = new htmlTable(); $activeContainer = new htmlTable();
for ($i = 0; $i < sizeof($activeTypes); $i++) { for ($i = 0; $i < sizeof($activeTypes); $i++) {
// title // title
$activeContainer->addElement(new htmlImage('../../graphics/' . $activeTypes[$i] . '.png')); $titleGroup = new htmlGroup();
$titleGroup->colspan = 10;
$titleGroup->addElement(new htmlImage('../../graphics/' . $activeTypes[$i] . '.png'));
$titleText = new htmlOutputText(getTypeAlias($activeTypes[$i])); $titleText = new htmlOutputText(getTypeAlias($activeTypes[$i]));
$titleText->setIsBold(true); $titleText->setIsBold(true);
$activeContainer->addElement($titleText); $titleGroup->addElement($titleText);
$activeContainer->addElement(new htmlSpacer('10px', null)); $titleGroup->addElement(new htmlSpacer('10px', null));
$activeContainer->addElement(new htmlOutputText(getTypeDescription($activeTypes[$i])), true); $titleGroup->addElement(new htmlOutputText(getTypeDescription($activeTypes[$i])));
$activeContainer->addElement($titleGroup);
// delete button
$delButton = new htmlButton('rem_'. $activeTypes[$i], 'del.png', true);
$delButton->colspan = 3;
$delButton->alignment = htmlElement::ALIGN_RIGHT;
$delButton->setTitle(_("Remove this account type"));
$activeContainer->addElement($delButton, true); //del.png
$activeContainer->addElement(new htmlSpacer(null, '5px'), true);
// LDAP suffix // LDAP suffix
$suffixText = new htmlOutputText(_("LDAP suffix")); $suffixText = new htmlOutputText(_("LDAP suffix"));
$suffixText->colspan = 2; $suffixText->colspan = 2;
@ -249,20 +259,6 @@ if (sizeof($activeTypes) > 0) {
$activeContainer->addElement($suffixInput); $activeContainer->addElement($suffixInput);
$activeContainer->addElement(new htmlHelpLink('202')); $activeContainer->addElement(new htmlHelpLink('202'));
$activeContainer->addElement(new htmlSpacer('10px', null)); $activeContainer->addElement(new htmlSpacer('10px', null));
// LDAP filter
$filter = '';
if (isset($typeSettings['filter_' . $activeTypes[$i]])) {
$filter = $typeSettings['filter_' . $activeTypes[$i]];
}
$filterText = new htmlOutputText(_("Additional LDAP filter"));
$filterText->colspan = 2;
$activeContainer->addElement($filterText);
$activeContainer->addElement(new htmlSpacer('10px', null));
$filterInput = new htmlInputField('filter_' . $activeTypes[$i], $filter);
$filterInput->setFieldSize(40);
$activeContainer->addElement($filterInput);
$activeContainer->addElement(new htmlHelpLink('260'));
$activeContainer->addNewLine();
// list attributes // list attributes
if (isset($typeSettings['attr_' . $activeTypes[$i]])) { if (isset($typeSettings['attr_' . $activeTypes[$i]])) {
$attributes = $typeSettings['attr_' . $activeTypes[$i]]; $attributes = $typeSettings['attr_' . $activeTypes[$i]];
@ -278,7 +274,23 @@ if (sizeof($activeTypes) > 0) {
$attrsInput->setFieldSize(40); $attrsInput->setFieldSize(40);
$activeContainer->addElement($attrsInput); $activeContainer->addElement($attrsInput);
$activeContainer->addElement(new htmlHelpLink('206')); $activeContainer->addElement(new htmlHelpLink('206'));
$activeContainer->addElement(new htmlSpacer('10px', null)); $activeContainer->addNewLine();
// advanced options
$advancedOptionsContent = new htmlTable();
// LDAP filter
$filter = '';
if (isset($typeSettings['filter_' . $activeTypes[$i]])) {
$filter = $typeSettings['filter_' . $activeTypes[$i]];
}
$filterText = new htmlOutputText(_("Additional LDAP filter"));
$filterText->colspan = 2;
$advancedOptionsContent->addElement($filterText);
$advancedOptionsContent->addElement(new htmlSpacer('10px', null));
$filterInput = new htmlInputField('filter_' . $activeTypes[$i], $filter);
$filterInput->setFieldSize(40);
$advancedOptionsContent->addElement($filterInput);
$advancedOptionsContent->addElement(new htmlHelpLink('260'));
$advancedOptionsContent->addElement(new htmlSpacer('10px', null));
// hidden type // hidden type
$hidden = false; $hidden = false;
if (isset($typeSettings['hidden_' . $activeTypes[$i]])) { if (isset($typeSettings['hidden_' . $activeTypes[$i]])) {
@ -286,16 +298,15 @@ if (sizeof($activeTypes) > 0) {
} }
$hiddenText = new htmlOutputText(_('Hidden')); $hiddenText = new htmlOutputText(_('Hidden'));
$hiddenText->colspan = 2; $hiddenText->colspan = 2;
$activeContainer->addElement($hiddenText); $advancedOptionsContent->addElement($hiddenText);
$activeContainer->addElement(new htmlSpacer('10px', null)); $advancedOptionsContent->addElement(new htmlSpacer('10px', null));
$activeContainer->addElement(new htmlInputCheckbox('hidden_' . $activeTypes[$i], $hidden)); $advancedOptionsContent->addElement(new htmlInputCheckbox('hidden_' . $activeTypes[$i], $hidden));
$activeContainer->addElement(new htmlHelpLink('261')); $advancedOptionsContent->addElement(new htmlHelpLink('261'));
$activeContainer->addNewLine(); $advancedOptionsContent->addNewLine();
// delete button // build advanced options box
$delButton = new htmlButton('rem_'. $activeTypes[$i], _("Remove this account type")); $advancedOptions = new htmlAccordion('advancedOptions_' . $activeTypes[$i], array(_('Advanced options') => $advancedOptionsContent), false);
$delButton->colspan = 5; $advancedOptions->colspan = 15;
$delButton->setIconClass('deleteButton'); $activeContainer->addElement($advancedOptions, true);
$activeContainer->addElement($delButton, true); //del.png
$activeContainer->addElement(new htmlSpacer(null, '40px'), true); $activeContainer->addElement(new htmlSpacer(null, '40px'), true);
} }