diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc
index c98f93da..f9e4c084 100644
--- a/lam/lib/lists.inc
+++ b/lam/lib/lists.inc
@@ -90,6 +90,9 @@ class lamList {
/** configuration options */
private $configOptions;
+
+ /** tabindex for GUI elements */
+ protected $tabindex = 1;
/** ID for list size config option */
const LIST_SIZE_OPTION_NAME = "L_SIZE";
@@ -144,6 +147,7 @@ class lamList {
* Prints the HTML code to display the list view.
*/
public function showPage() {
+ $this->tabindex = 1;
// do POST actions
$postFragment = $this->listDoPost();
// get some parameters
@@ -396,8 +400,7 @@ class lamList {
else {
$classes = ' ' . $this->type . 'list-dark';
}
- echo("
type . "&DN=" . rawurlencode($info[$i]['dn']) . "'\">\n");
echo " addElement(new htmlButton('createPDFCancel', _('Cancel')));
$container->addElement($buttonContainer);
- $tabindex = 1;
- parseHtml(null, $container, array(), false, $tabindex, $this->type);
+ parseHtml(null, $container, array(), false, $this->tabindex, $this->type);
$this->listPrintFooter();
}
@@ -670,14 +672,19 @@ class lamList {
*/
protected function listShowOUSelection() {
if (sizeof($this->possibleSuffixes) > 1) {
- echo ("type . " rightToLeftText\" size=1 name=\"suffix\" onchange=\"listOUchanged('" . $this->type . "', this)\">\n");
+ $group = new htmlGroup();
+ $suffixList = array();
for ($i = 0; $i < sizeof($this->possibleSuffixes); $i++) {
- if ($this->suffix == $this->possibleSuffixes[$i]) {
- echo ("possibleSuffixes[$i] . "\" selected>" . getAbstractDN($this->possibleSuffixes[$i]) . " \n");
- }
- else echo("possibleSuffixes[$i] . "\">" . getAbstractDN($this->possibleSuffixes[$i]) . " \n");
+ $suffixList[getAbstractDN($this->possibleSuffixes[$i])] = $this->possibleSuffixes[$i];
}
- echo (" \n");
+ $suffixSelect = new htmlSelect('suffix', $suffixList, array($this->suffix));
+ $suffixSelect->setOnchangeEvent("listOUchanged('" . $this->type . "', this)");
+ $suffixSelect->setRightToLeftTextDirection(true);
+ $suffixSelect->setSortElements(false);
+ $suffixSelect->setHasDescriptiveElements(true);
+ $group->addElement($suffixSelect);
+ $group->addElement(new htmlSpacer('5px', null));
+ parseHtml(null, $group, array(), true, $this->tabindex, $this->type);
}
}
@@ -921,14 +928,13 @@ class lamList {
echo "';
diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc
index bacd850e..adb3b942 100644
--- a/lam/lib/modules.inc
+++ b/lam/lib/modules.inc
@@ -899,6 +899,7 @@ class accountContainer {
* @param boolean $stopProcessing true if page should end after displaying the messages
*/
private function printModuleContent($result, $stopProcessing) {
+ $tabindex = 1;
$this->printPageHeader();
$this->printPasswordPromt();
// display error messages
@@ -915,7 +916,7 @@ class accountContainer {
echo "type."list-bright\" border=0 width=\"100%\" style=\"border-collapse: collapse;\">\n";
if (checkIfWriteAccessIsAllowed()) {
echo "type."list-bright\">\n";
- $this->printCommonControls();
+ $this->printCommonControls($tabindex);
echo " \n";
}
echo "type."list-bright\" valign=\"top\">";
@@ -926,35 +927,28 @@ class accountContainer {
echo $this->titleBarTitle;
echo ' ';
echo '';
- echo _('Suffix');
- echo " \n";
- // loop through all suffixes
- $rootsuffix = $_SESSION['config']->get_Suffix($this->type);
- foreach ($this->getOUs() as $suffix) {
- echo 'dnSuffix == $suffix) {
- echo 'selected';
- }
- echo ">" . getAbstractDN($suffix) . " \n";
- }
- if (!($this->dnSuffix == '') && !in_array($this->dnSuffix, $this->getOUs())) {
- echo '' . getAbstractDN($this->dnSuffix) . " \n";;
- }
- echo " \n";
- echo ' ';
+ $group = new htmlGroup();
+ // suffix
+ $group->addElement(new htmlOutputText(_('Suffix')));
+ $suffixList = array();
+ foreach ($this->getOUs() as $suffix) {
+ $suffixList[getAbstractDN($suffix)] = $suffix;
+ }
+ if (!($this->dnSuffix == '') && !in_array($this->dnSuffix, $this->getOUs())) {
+ $suffixList[getAbstractDN($this->dnSuffix)] = $this->dnSuffix;
+ }
+ $selectedSuffix = array($this->dnSuffix);
+ $suffixSelect = new htmlSelect('accountContainerSuffix', $suffixList, $selectedSuffix);
+ $suffixSelect->setHasDescriptiveElements(true);
+ $suffixSelect->setRightToLeftTextDirection(true);
+ $group->addElement($suffixSelect);
+ $group->addElement(new htmlSpacer('10px', null));
// RDN selection
+ $group->addElement(new htmlOutputText(_('RDN identifier')));
$rdnlist = getRDNAttributes($this->type);
- echo _('RDN identifier');
- echo " \n";
- for ($i = 0; $i < sizeof($rdnlist); $i++) {
- echo "rdn === $rdnlist[$i]) {
- echo 'selected';
- }
- echo ">" . $rdnlist[$i] . " \n";
- }
- echo " \n";
- printHelpLink(getHelp('', '301'), '301');
+ $group->addElement(new htmlSelect('accountContainerRDN', $rdnlist, array($this->rdn)));
+ $group->addElement(new htmlHelpLink('301'));
+ parseHtml(null, $group, array(), true, $tabindex, $this->type);
echo ' ';
echo '
';
if ($this->titleBarSubtitle != null) {
@@ -1129,64 +1123,51 @@ class accountContainer {
/**
* Prints common controls like the save button and the ou selection.
+ *
+ * @param int $tabindex tabindex for GUI elements
*/
- private function printCommonControls() {
- echo "";
- echo "";
+ private function printCommonControls(&$tabindex) {
+ $table = new htmlTable('100%');
+ $leftButtonGroup = new htmlGroup();
+ $leftButtonGroup->alignment = htmlElement::ALIGN_LEFT;
// save button
- echo "" . _('Save') . " \n";
+ $saveButton = new htmlButton('accountContainerSaveAccount', _('Save'));
+ $saveButton->setIconClass('saveButton');
+ $leftButtonGroup->addElement($saveButton);
+ $leftButtonGroup->addElement(new htmlSpacer('1px', null));
// reset button
- if ($this->dn_orig!='') {
- echo "" . _('Reset changes') . " \n";
- }
+ $resetButton = new htmlButton('accountContainerReset', _('Reset changes'));
+ $resetButton->setIconClass('undoButton');
+ $leftButtonGroup->addElement($resetButton);
+ // set password button
if ($this->showSetPasswordButton()) {
- echo " ";
- echo '' . _('Set password') . " \n";
+ $leftButtonGroup->addElement(new htmlSpacer('15px', null));
+ $passwordButton = new htmlButton('accountContainerPassword', _('Set password'));
+ $passwordButton->setIconClass('passwordButton');
+ $passwordButton->setOnClick('passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
+ . _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange\');');
+ $leftButtonGroup->addElement($passwordButton);
}
- echo " ";
- echo "";
+ $table->addElement($leftButtonGroup);
+
+ $rightGroup = new htmlGroup();
+ $rightGroup->alignment = htmlElement::ALIGN_RIGHT;
// profile selection
$profilelist = getAccountProfiles($this->type);
if (sizeof($profilelist) > 0) {
- sort($profilelist);
- echo "\n";
- for ($i = 0; $i < sizeof($profilelist); $i++) {
- $selected = '';
- if ($profilelist[$i] === $this->lastLoadedProfile) {
- $selected = 'selected';
- }
- echo "" . $profilelist[$i] . " \n";
- }
- echo " \n";
- echo "" . _('Load profile') . " \n";
- printHelpLink(getHelp('', '401'), '401');
+ $rightGroup->addElement(new htmlSelect('accountContainerSelectLoadProfile', $profilelist, array($this->lastLoadedProfile)));
+ $profileButton = new htmlButton('accountContainerLoadProfile', _('Load profile'));
+ $profileButton->setIconClass('loadProfileButton');
+ $rightGroup->addElement($profileButton);
+ $rightGroup->addElement(new htmlSpacer('1px', null));
+ $rightGroup->addElement(new htmlHelpLink('401'));
}
- echo " ";
- echo "
";
+ $table->addElement($rightGroup);
+
+ parseHtml(null, $table, array(), false, $tabindex, $this->type);
?>
\n";
?>
+
+
-
+
";
}
?>
+
-
+
-
+
-
+