Merge pull request #43 from LDAPAccountManager/responsiveSettings
Responsive settings
This commit is contained in:
commit
839941187c
|
@ -2716,6 +2716,8 @@ class htmlSubTitle extends htmlElement {
|
||||||
private $image = null;
|
private $image = null;
|
||||||
/** optional ID for this element (e.g. to use for JavaScript) */
|
/** optional ID for this element (e.g. to use for JavaScript) */
|
||||||
private $id = null;
|
private $id = null;
|
||||||
|
/** show large icon */
|
||||||
|
private $largeIcon = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -2723,13 +2725,15 @@ class htmlSubTitle extends htmlElement {
|
||||||
* @param String $label label
|
* @param String $label label
|
||||||
* @param String $image optional image
|
* @param String $image optional image
|
||||||
* @param String $id optional ID for this element (e.g. to use for JavaScript)
|
* @param String $id optional ID for this element (e.g. to use for JavaScript)
|
||||||
|
* @param bool $largeIcon show large (32x32px) icon instead of small one (16x16px)
|
||||||
*/
|
*/
|
||||||
function __construct($label, $image = null, $id = null) {
|
function __construct($label, $image = null, $id = null, $largeIcon = false) {
|
||||||
$this->label = htmlspecialchars($label);
|
$this->label = htmlspecialchars($label);
|
||||||
$this->image = htmlspecialchars($image);
|
$this->image = htmlspecialchars($image);
|
||||||
$this->id = htmlspecialchars($id);
|
$this->id = htmlspecialchars($id);
|
||||||
// the title should not end at a table cell
|
// the title should not end at a table cell
|
||||||
$this->colspan = 100;
|
$this->colspan = 100;
|
||||||
|
$this->largeIcon = $largeIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2751,7 +2755,8 @@ class htmlSubTitle extends htmlElement {
|
||||||
echo "<div $idValue class=\"subTitle\">\n";
|
echo "<div $idValue class=\"subTitle\">\n";
|
||||||
echo "<h4 class=\"subTitleText\">\n";
|
echo "<h4 class=\"subTitleText\">\n";
|
||||||
if ($this->image != null) {
|
if ($this->image != null) {
|
||||||
echo '<img height=16 width=16 src="' . $this->image . '" alt="' . $this->label . '"> ';
|
$size = $this->largeIcon ? 32 : 16;
|
||||||
|
echo '<img height=' . $size . ' width=' . $size . ' src="' . $this->image . '" alt="' . $this->label . '"> ';
|
||||||
}
|
}
|
||||||
echo $this->label;
|
echo $this->label;
|
||||||
echo "</h4>\n";
|
echo "</h4>\n";
|
||||||
|
@ -3724,6 +3729,8 @@ class htmlResponsiveInputField extends htmlInputField {
|
||||||
private $label;
|
private $label;
|
||||||
/** help ID */
|
/** help ID */
|
||||||
private $helpID;
|
private $helpID;
|
||||||
|
/** help module name */
|
||||||
|
private $helpModule = null;
|
||||||
/** render HTML of parent class */
|
/** render HTML of parent class */
|
||||||
private $renderParentHtml = false;
|
private $renderParentHtml = false;
|
||||||
|
|
||||||
|
@ -3733,13 +3740,21 @@ class htmlResponsiveInputField extends htmlInputField {
|
||||||
* @param String $label descriptive label
|
* @param String $label descriptive label
|
||||||
* @param String $fieldName unique field name
|
* @param String $fieldName unique field name
|
||||||
* @param String $fieldValue value of input field (optional)
|
* @param String $fieldValue value of input field (optional)
|
||||||
* @param String $helpID help ID (optional)
|
* @param String|array $helpID help ID or array of help ID + module name (optional)
|
||||||
|
* @param bool $required field is required
|
||||||
*/
|
*/
|
||||||
function __construct($label, $fieldName, $fieldValue = null, $helpID = null) {
|
function __construct($label, $fieldName, $fieldValue = null, $helpID = null, $required = false) {
|
||||||
parent::__construct($fieldName, $fieldValue);
|
parent::__construct($fieldName, $fieldValue);
|
||||||
$this->label = $label;
|
$this->label = $label;
|
||||||
$this->helpID = $helpID;
|
if (is_string($helpID)) {
|
||||||
|
$this->helpID = $helpID;
|
||||||
|
}
|
||||||
|
elseif (is_array($helpID)) {
|
||||||
|
$this->helpID = $helpID[0];
|
||||||
|
$this->helpModule = $helpID[1];
|
||||||
|
}
|
||||||
$this->fieldSize = null;
|
$this->fieldSize = null;
|
||||||
|
$this->required = $required;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3762,7 +3777,7 @@ class htmlResponsiveInputField extends htmlInputField {
|
||||||
$labelGroup->addElement(new htmlImage($graphicsPath . '/required.png', 16, 16, _('required'), _('required')));
|
$labelGroup->addElement(new htmlImage($graphicsPath . '/required.png', 16, 16, _('required'), _('required')));
|
||||||
}
|
}
|
||||||
if (!empty($this->helpID)) {
|
if (!empty($this->helpID)) {
|
||||||
$helpLinkLabel = new htmlHelpLink($this->helpID);
|
$helpLinkLabel = new htmlHelpLink($this->helpID, $this->helpModule);
|
||||||
$helpLinkLabel->setCSSClasses(array('hide-on-tablet', 'margin-left5'));
|
$helpLinkLabel->setCSSClasses(array('hide-on-tablet', 'margin-left5'));
|
||||||
$labelGroup->addElement($helpLinkLabel);
|
$labelGroup->addElement($helpLinkLabel);
|
||||||
}
|
}
|
||||||
|
@ -3771,7 +3786,7 @@ class htmlResponsiveInputField extends htmlInputField {
|
||||||
$fieldGroup = new htmlGroup();
|
$fieldGroup = new htmlGroup();
|
||||||
$fieldGroup->addElement($this);
|
$fieldGroup->addElement($this);
|
||||||
if (!empty($this->helpID)) {
|
if (!empty($this->helpID)) {
|
||||||
$helpLinkField = new htmlHelpLink($this->helpID);
|
$helpLinkField = new htmlHelpLink($this->helpID, $this->helpModule);
|
||||||
$helpLinkField->setCSSClasses(array('hide-on-mobile'));
|
$helpLinkField->setCSSClasses(array('hide-on-mobile'));
|
||||||
$fieldGroup->addElement($helpLinkField);
|
$fieldGroup->addElement($helpLinkField);
|
||||||
}
|
}
|
||||||
|
@ -3873,6 +3888,8 @@ class htmlResponsiveSelect extends htmlSelect {
|
||||||
private $label;
|
private $label;
|
||||||
/** help ID */
|
/** help ID */
|
||||||
private $helpID;
|
private $helpID;
|
||||||
|
/** help module name */
|
||||||
|
private $helpModule = null;
|
||||||
/** render HTML of parent class */
|
/** render HTML of parent class */
|
||||||
private $renderParentHtml = false;
|
private $renderParentHtml = false;
|
||||||
|
|
||||||
|
@ -3883,13 +3900,19 @@ class htmlResponsiveSelect extends htmlSelect {
|
||||||
* @param array $elements list of elememts
|
* @param array $elements list of elememts
|
||||||
* @param array $selectedElements list of selected elements
|
* @param array $selectedElements list of selected elements
|
||||||
* @param String $label descriptive label
|
* @param String $label descriptive label
|
||||||
* @param String $helpID help ID (optional, default none)
|
* @param String|array $helpID help ID or array of help ID + module name (optional)
|
||||||
* @param int $size size (optional, default = 1)
|
* @param int $size size (optional, default = 1)
|
||||||
*/
|
*/
|
||||||
function __construct($name, $elements, $selectedElements, $label, $helpID = null, $size = 1) {
|
function __construct($name, $elements, $selectedElements, $label, $helpID = null, $size = 1) {
|
||||||
parent::__construct($name, $elements, $selectedElements, $size);
|
parent::__construct($name, $elements, $selectedElements, $size);
|
||||||
$this->label = htmlspecialchars($label);
|
$this->label = $label;
|
||||||
$this->helpID = $helpID;
|
if (is_string($helpID)) {
|
||||||
|
$this->helpID = $helpID;
|
||||||
|
}
|
||||||
|
elseif (is_array($helpID)) {
|
||||||
|
$this->helpID = $helpID[0];
|
||||||
|
$this->helpModule = $helpID[1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3907,7 +3930,7 @@ class htmlResponsiveSelect extends htmlSelect {
|
||||||
$labelGroup = new htmlGroup();
|
$labelGroup = new htmlGroup();
|
||||||
$labelGroup->addElement(new htmlOutputText($this->label));
|
$labelGroup->addElement(new htmlOutputText($this->label));
|
||||||
if (!empty($this->helpID)) {
|
if (!empty($this->helpID)) {
|
||||||
$helpLinkLabel = new htmlHelpLink($this->helpID);
|
$helpLinkLabel = new htmlHelpLink($this->helpID, $this->helpModule);
|
||||||
$helpLinkLabel->setCSSClasses(array('hide-on-tablet', 'margin-left5'));
|
$helpLinkLabel->setCSSClasses(array('hide-on-tablet', 'margin-left5'));
|
||||||
$labelGroup->addElement($helpLinkLabel);
|
$labelGroup->addElement($helpLinkLabel);
|
||||||
}
|
}
|
||||||
|
@ -3916,7 +3939,7 @@ class htmlResponsiveSelect extends htmlSelect {
|
||||||
$fieldGroup = new htmlGroup();
|
$fieldGroup = new htmlGroup();
|
||||||
$fieldGroup->addElement($this);
|
$fieldGroup->addElement($this);
|
||||||
if (!empty($this->helpID)) {
|
if (!empty($this->helpID)) {
|
||||||
$helpLink = new htmlHelpLink($this->helpID);
|
$helpLink = new htmlHelpLink($this->helpID, $this->helpModule);
|
||||||
$helpLink->setCSSClasses(array('hide-on-mobile'));
|
$helpLink->setCSSClasses(array('hide-on-mobile'));
|
||||||
$fieldGroup->addElement($helpLink);
|
$fieldGroup->addElement($helpLink);
|
||||||
}
|
}
|
||||||
|
@ -4009,8 +4032,12 @@ class htmlResponsiveInputCheckbox extends htmlInputCheckbox {
|
||||||
private $label;
|
private $label;
|
||||||
/** help ID */
|
/** help ID */
|
||||||
private $helpID;
|
private $helpID;
|
||||||
|
/** help module name */
|
||||||
|
private $helpModule = null;
|
||||||
/** render HTML of parent class */
|
/** render HTML of parent class */
|
||||||
private $renderParentHtml = false;
|
private $renderParentHtml = false;
|
||||||
|
/** long label */
|
||||||
|
private $longLabel = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
@ -4018,12 +4045,20 @@ class htmlResponsiveInputCheckbox extends htmlInputCheckbox {
|
||||||
* @param String $name unique name
|
* @param String $name unique name
|
||||||
* @param boolean $checked checked
|
* @param boolean $checked checked
|
||||||
* @param String $label descriptive label
|
* @param String $label descriptive label
|
||||||
* @param String $helpID help ID
|
* @param String|array $helpID help ID or array of help ID + module name (optional)
|
||||||
|
* @param bool $longLabel more space for label (default: false)
|
||||||
*/
|
*/
|
||||||
function __construct($name, $checked, $label, $helpID = null) {
|
function __construct($name, $checked, $label, $helpID = null, $longLabel = false) {
|
||||||
parent::__construct($name, $checked);
|
parent::__construct($name, $checked);
|
||||||
$this->label = htmlspecialchars($label);
|
$this->label = $label;
|
||||||
$this->helpID = $helpID;
|
if (is_string($helpID)) {
|
||||||
|
$this->helpID = $helpID;
|
||||||
|
}
|
||||||
|
elseif (is_array($helpID)) {
|
||||||
|
$this->helpID = $helpID[0];
|
||||||
|
$this->helpModule = $helpID[1];
|
||||||
|
}
|
||||||
|
$this->longLabel = $longLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4037,19 +4072,25 @@ class htmlResponsiveInputCheckbox extends htmlInputCheckbox {
|
||||||
// HTML of parent class is rendered on second call (done by htmlResponsiveRow)
|
// HTML of parent class is rendered on second call (done by htmlResponsiveRow)
|
||||||
$this->renderParentHtml = true;
|
$this->renderParentHtml = true;
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
|
$tabletColumnsLabel = 6;
|
||||||
|
$tabletColumnsBox = 6;
|
||||||
|
if ($this->longLabel) {
|
||||||
|
$tabletColumnsLabel = 10;
|
||||||
|
$tabletColumnsBox = 2;
|
||||||
|
}
|
||||||
// label text
|
// label text
|
||||||
$labelGroup = new htmlGroup();
|
$labelGroup = new htmlGroup();
|
||||||
$labelGroup->addElement(new htmlOutputText($this->label));
|
$labelGroup->addElement(new htmlOutputText($this->label));
|
||||||
$row->add($labelGroup, 6, 6, 6, 'responsiveLabel');
|
$row->add($labelGroup, 10, $tabletColumnsLabel, $tabletColumnsLabel, 'responsiveLabel nowrap');
|
||||||
// input field
|
// input field
|
||||||
$fieldGroup = new htmlGroup();
|
$fieldGroup = new htmlGroup();
|
||||||
$fieldGroup->addElement($this);
|
$fieldGroup->addElement($this);
|
||||||
if (!empty($this->helpID)) {
|
if (!empty($this->helpID)) {
|
||||||
$helpLink = new htmlHelpLink($this->helpID);
|
$helpLink = new htmlHelpLink($this->helpID, $this->helpModule);
|
||||||
$helpLink->setCSSClasses(array('margin-left5 align-unset-img'));
|
$helpLink->setCSSClasses(array('margin-left5 align-unset-img'));
|
||||||
$fieldGroup->addElement($helpLink);
|
$fieldGroup->addElement($helpLink);
|
||||||
}
|
}
|
||||||
$row->add($fieldGroup, 6, 6, 6, 'responsiveField nowrap');
|
$row->add($fieldGroup, 2, $tabletColumnsBox, $tabletColumnsBox, 'responsiveField nowrap');
|
||||||
return $row->generateHTML($module, $input, $values, $restricted, $tabindex, $scope);
|
return $row->generateHTML($module, $input, $values, $restricted, $tabindex, $scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
||||||
Copyright (C) 2009 - 2012 Pavel Pozdnyak
|
Copyright (C) 2009 - 2012 Pavel Pozdnyak
|
||||||
2009 - 2015 Roland Gruber
|
2009 - 2017 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -1222,79 +1222,44 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
* @see htmlElement
|
* @see htmlElement
|
||||||
*/
|
*/
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$return = parent::get_configOptions($scopes, $allScopes);
|
$configContainer = new htmlResponsiveRow();
|
||||||
// config options
|
$configContainer->add(new htmlResponsiveInputField(_('Asterisk realm'), 'asteriskAccount_AsteriskRealm', null, 'AsteriskRealm'), 12);
|
||||||
$configContainer = new htmlTable();
|
$configContainer->addVerticalSpacer('1rem');
|
||||||
$configRealmTable = new htmlTable();
|
$configHiddenHead = new htmlGroup();
|
||||||
$configRealmTable->addElement(new htmlTableExtendedInputField(_('Asterisk realm'), 'asteriskAccount_AsteriskRealm', null, 'AsteriskRealm'));
|
|
||||||
$configContainer->addElement($configRealmTable, true);
|
|
||||||
$configContainer->addElement(new htmlSpacer(null, '10px'), true);
|
|
||||||
$configHiddenHead = new htmlTable();
|
|
||||||
$configHiddenHead->addElement(new htmlOutputText(_('Hidden options')));
|
$configHiddenHead->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configHiddenHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$configHiddenHead->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->add($configHiddenHead, 12);
|
||||||
$configContainer->addElement($configHiddenHead, true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountUserAgent', false, _('User agent'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountUserAgent', false, _('User agent'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountAMAFlags', false, _('AMA flags'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountCallGroup', false, _('Call groups'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountAMAFlags', false, _('AMA flags'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountDTMFMode', false, _('DTFM flags'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountFromUser', false, _('From user'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountCallGroup', false, _('Call groups'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountFromDomain', false, _('From domain'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountFullContact', false, _('Full contact'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountDTMFMode', false, _('DTFM flags'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountInsecure', false, _('Insecure'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountMailbox', false, _('Mailbox'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountFromUser', false, _('From user'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountNAT', false, _('NAT'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountDeny', false, _('Deny'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountFromDomain', false, _('From domain'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountPermit', false, _('Permit'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountPickupGroup', false, _('Pickup group'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountFullContact', false, _('Full contact'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountPort', false, _('Port'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountQualify', false, _('Qualify'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountInsecure', false, _('Insecure'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRestrictCID', false, _('Restrict caller ID'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRTPTimeout', false, _('RTP timeout'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountMailbox', false, _('Mailbox'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRTPHoldTimeout', false, _('RTP hold timeout'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountDisallowedCodec', false, _('Disallowed codec'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountNAT', false, _('NAT'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountAllowedCodec', false, _('Allowed codec'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountMusicOnHold', false, _('Music on hold'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountDeny', false, _('Deny'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountExpirationTimestamp', false, _('Expiration timestamp'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRegistrationContext', false, _('Registration context'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountPermit', false, _('Permit'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRegistrationExten', false, _('Registration extension'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountCanCallForward', false, _('Can call forward'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountPickupGroup', false, _('Pickup group'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountIPAddress', false, _('IP address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountDefaultUser', false, _('Default user'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountPort', false, _('Port'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountRegistrationServer', false, _('Registration server'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('asteriskAccount_hideAstAccountLastQualifyMilliseconds', false, _('Last qualify milliseconds'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountQualify', false, _('Qualify'), null, false));
|
$configContainer->add(new htmlOutputText(''), 0, 4);
|
||||||
$configContainerOptions->addNewLine();
|
return $configContainer;
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRestrictCID', false, _('Restrict caller ID'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRTPTimeout', false, _('RTP timeout'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRTPHoldTimeout', false, _('RTP hold timeout'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountDisallowedCodec', false, _('Disallowed codec'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountAllowedCodec', false, _('Allowed codec'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountMusicOnHold', false, _('Music on hold'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountExpirationTimestamp', false, _('Expiration timestamp'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRegistrationContext', false, _('Registration context'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRegistrationExten', false, _('Registration extension'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountCanCallForward', false, _('Can call forward'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountIPAddress', false, _('IP address'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountDefaultUser', false, _('Default user'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountRegistrationServer', false, _('Registration server'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('asteriskAccount_hideAstAccountLastQualifyMilliseconds', false, _('Last qualify milliseconds'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
|
||||||
$return[] = $configContainer;
|
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2011 J de Jong
|
Copyright (C) 2011 J de Jong
|
||||||
2012 - 2015 Roland Gruber
|
2012 - 2017 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -94,10 +94,6 @@ class authorizedServiceObject extends baseModule {
|
||||||
"Text" => _("These services will show up as hint if you enter a new service.")
|
"Text" => _("These services will show up as hint if you enter a new service.")
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// config options
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
$configContainer->addElement(new htmlTableExtendedInputTextarea('authorizedServiceObject_services', "sshd\r\nimap", 30, 5, _('Predefined services'), 'predefinedServices'));
|
|
||||||
$return['config_options']['all'] = $configContainer;
|
|
||||||
// upload fields
|
// upload fields
|
||||||
$return['upload_columns'] = array(
|
$return['upload_columns'] = array(
|
||||||
array(
|
array(
|
||||||
|
@ -252,6 +248,16 @@ class authorizedServiceObject extends baseModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see baseModule::get_configOptions()
|
||||||
|
*/
|
||||||
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
|
$configContainer = new htmlResponsiveRow();
|
||||||
|
$configContainer->add(new htmlResponsiveInputTextarea('authorizedServiceObject_services', "sshd\r\nimap", 30, 5, _('Predefined services'), 'predefinedServices'), 12);
|
||||||
|
return $configContainer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -293,32 +293,22 @@ class freeRadius extends baseModule {
|
||||||
* @see htmlElement
|
* @see htmlElement
|
||||||
*/
|
*/
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
$configContainer->addElement(new htmlTableExtendedInputField(_('Profile DN'), 'freeRadius_profileDN', '', 'profileDN'), true);
|
$configContainer->add(new htmlResponsiveInputField(_('Profile DN'), 'freeRadius_profileDN', '', 'profileDN'), 12);
|
||||||
$configContainer->addVerticalSpace('10px');
|
$configContainer->addVerticalSpacer('1rem');
|
||||||
$configContainerHead = new htmlTable();
|
$hiddenGroup = new htmlGroup();
|
||||||
$configContainerHead->colspan = 5;
|
$hiddenGroup->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
$hiddenGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$configContainer->add($hiddenGroup, 12);
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->addVerticalSpacer('0.5rem');
|
||||||
$configContainerOptions->colspan = 5;
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusFramedIPAddress', false, _('IP address'), null, true), 12, 4);
|
||||||
$configContainer->addElement($configContainerHead, true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusFramedIPNetmask', false, _('Net mask'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusFramedIPAddress', false, _('IP address'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusRealm', false, _('Realm'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusGroupName', false, _('Group names'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusFramedIPNetmask', false, _('Net mask'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusExpiration', false, _('Expiration date'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusIdleTimeout', false, _('Idle timeout'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusRealm', false, _('Realm'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideRadiusProfileDn', false, _('Profile'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('freeRadius_hideDialupAccess', false, _('Enabled'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusGroupName', false, _('Group names'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusExpiration', false, _('Expiration date'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusIdleTimeout', false, _('Idle timeout'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusProfileDn', false, _('Profile'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideDialupAccess', false, _('Enabled'), null, false));
|
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
|
||||||
return $configContainer;
|
return $configContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ $Id$
|
||||||
|
|
||||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2010 - 2011 Pavel Pozdniak
|
Copyright (C) 2010 - 2011 Pavel Pozdniak
|
||||||
2010 - 2015 Roland Gruber
|
2010 - 2017 Roland Gruber
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -460,43 +460,39 @@ class imapAccess extends baseModule {
|
||||||
*/
|
*/
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
// configuration settings
|
// configuration settings
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
$configServer = new htmlTableExtendedInputField(_('Server address'), 'ImapAccess_ImapServerAddress', '', 'ImapServerAddress');
|
$configServer = new htmlResponsiveInputField(_('Server address'), 'ImapAccess_ImapServerAddress', '', 'ImapServerAddress');
|
||||||
$configServer->setRequired(true);
|
$configServer->setRequired(true);
|
||||||
$configContainer->addElement($configServer, true);
|
$configContainer->add($configServer, 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedSelect('ImapAccess_ImapServerEncriptionProtocol', array('TLS', 'SSL'), array('TLS'), _("Encryption protocol"), 'ImapServerEncryptionProtocol'), true);
|
$configContainer->add(new htmlResponsiveSelect('ImapAccess_ImapServerEncriptionProtocol', array('TLS', 'SSL'), array('TLS'), _("Encryption protocol"), 'ImapServerEncryptionProtocol'), 12);
|
||||||
$configCertValidate = new htmlTableExtendedSelect('ImapAccess_ImapValidateServerCert', array(_('Yes') => 'validate-cert', _('No') => 'novalidate-cert'), array('validate-cert'), _("Validate server certificate"), 'ImapValidateServerCert');
|
$configCertValidate = new htmlResponsiveSelect('ImapAccess_ImapValidateServerCert', array(_('Yes') => 'validate-cert', _('No') => 'novalidate-cert'), array('validate-cert'), _("Validate server certificate"), 'ImapValidateServerCert');
|
||||||
$configCertValidate->setHasDescriptiveElements(true);
|
$configCertValidate->setHasDescriptiveElements(true);
|
||||||
$configContainer->addElement($configCertValidate, true);
|
$configContainer->add($configCertValidate, 12);
|
||||||
$configUser = new htmlTableExtendedInputField(_('IMAP admin user'), 'ImapAccess_ImapAdmin', '', 'ImapAdmin');
|
$configUser = new htmlResponsiveInputField(_('IMAP admin user'), 'ImapAccess_ImapAdmin', '', 'ImapAdmin');
|
||||||
$configUser->setRequired(true);
|
$configUser->setRequired(true);
|
||||||
$configContainer->addElement($configUser, true);
|
$configContainer->add($configUser, 12);
|
||||||
$pwdSelectOptions = array(
|
$pwdSelectOptions = array(
|
||||||
_('LAM user password') => 'lam_user_pass',
|
_('LAM user password') => 'lam_user_pass',
|
||||||
_('Ask') => 'ask_pass',
|
_('Ask') => 'ask_pass',
|
||||||
_('Server profile') => 'config');
|
_('Server profile') => 'config');
|
||||||
$configPasswordType = new htmlTableExtendedSelect('ImapAccess_ImapAdminPasswordSelect', $pwdSelectOptions, array('ask_pass'), _("IMAP password input"), 'ImapAdminPasswordSelect');
|
$configPasswordType = new htmlResponsiveSelect('ImapAccess_ImapAdminPasswordSelect', $pwdSelectOptions, array('ask_pass'), _("IMAP password input"), 'ImapAdminPasswordSelect');
|
||||||
$configPasswordType->setHasDescriptiveElements(true);
|
$configPasswordType->setHasDescriptiveElements(true);
|
||||||
$configPasswordType->setTableRowsToShow(array('config' => array('ImapAccess_ImapAdminPassword')));
|
$configPasswordType->setTableRowsToShow(array('config' => array('ImapAccess_ImapAdminPassword')));
|
||||||
$configPasswordType->setTableRowsToHide(array('lam_user_pass' => array('ImapAccess_ImapAdminPassword'), 'ask_pass' => array('ImapAccess_ImapAdminPassword')));
|
$configPasswordType->setTableRowsToHide(array('lam_user_pass' => array('ImapAccess_ImapAdminPassword'), 'ask_pass' => array('ImapAccess_ImapAdminPassword')));
|
||||||
$configContainer->addElement($configPasswordType, true);
|
$configContainer->add($configPasswordType, 12);
|
||||||
$adminPwdInput = new htmlTableExtendedInputField(_('Admin password'), 'ImapAccess_ImapAdminPassword', null, 'ImapAdminPasswordSelect');
|
$adminPwdInput = new htmlResponsiveInputField(_('Admin password'), 'ImapAccess_ImapAdminPassword', null, 'ImapAdminPasswordSelect');
|
||||||
$adminPwdInput->setIsPassword(true);
|
$adminPwdInput->setIsPassword(true);
|
||||||
$adminPwdInput->setObfuscate(true);
|
$adminPwdInput->setObfuscate(true);
|
||||||
$configContainer->addElement($adminPwdInput, true);
|
$configContainer->add($adminPwdInput, 12);
|
||||||
$mailDomainsInput = new htmlTableExtendedInputField(_('Mail domains'), 'ImapAccess_ImapDomain', '', 'ImapMailDomain');
|
$mailDomainsInput = new htmlResponsiveInputField(_('Mail domains'), 'ImapAccess_ImapDomain', '', 'ImapMailDomain');
|
||||||
$mailDomainsInput->setRequired(true);
|
$mailDomainsInput->setRequired(true);
|
||||||
$configContainer->addElement($mailDomainsInput, true);
|
$configContainer->add($mailDomainsInput, 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputField(_('Prefix for mailboxes'), 'ImapAccess_ImapUserPrefix', '', 'ImapUserPrefix'), true);
|
$configContainer->add(new htmlResponsiveInputField(_('Prefix for mailboxes'), 'ImapAccess_ImapUserPrefix', '', 'ImapUserPrefix'), 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputTextarea('ImapAccess_initialFolders', '', 10, 3, _('Initial folders'), 'initialFolders'), true);
|
$configContainer->add(new htmlResponsiveInputTextarea('ImapAccess_initialFolders', '', 10, 3, _('Initial folders'), 'initialFolders'), 12);
|
||||||
$configUserName = new htmlTableExtendedSelect('ImapAccess_UserNameAttribute', array('mail', 'uid', 'userPrincipalName'), array('mail'), _("User name attribute"), 'ImapUserNameAttr');
|
$configUserName = new htmlResponsiveSelect('ImapAccess_UserNameAttribute', array('mail', 'uid', 'userPrincipalName'), array('mail'), _("User name attribute"), 'ImapUserNameAttr');
|
||||||
$configContainer->addElement($configUserName, true);
|
$configContainer->add($configUserName, 12);
|
||||||
$configPathSeparator = new htmlTableExtendedSelect('ImapAccess_pathSeparator', array('.', '/'), array('.'), _("Path separator"), 'pathSeparator');
|
$configPathSeparator = new htmlResponsiveSelect('ImapAccess_pathSeparator', array('.', '/'), array('.'), _("Path separator"), 'pathSeparator');
|
||||||
$configContainer->addElement($configPathSeparator, true);
|
$configContainer->add($configPathSeparator, 12);
|
||||||
$configContainer->addElement(new htmlEqualWidth(array('ImapAccess_ImapServerAddress', 'ImapAccess_initialFolders', 'ImapAccess_UserNameAttribute',
|
|
||||||
'ImapAccess_ImapServerEncriptionProtocol', 'ImapAccess_ImapValidateServerCert', 'ImapAccess_ImapAdminPasswordSelect',
|
|
||||||
'ImapAccess_pathSeparator'
|
|
||||||
)));
|
|
||||||
return $configContainer;
|
return $configContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3625,23 +3625,11 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of configuration options.
|
* {@inheritDoc}
|
||||||
*
|
* @see baseModule::get_configOptions()
|
||||||
* Calling this method does not require the existence of an enclosing {@link accountContainer}.<br>
|
*/
|
||||||
* <br>
|
|
||||||
* The field names are used as keywords to load and save settings.
|
|
||||||
* We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.
|
|
||||||
*
|
|
||||||
* @param array $scopes account types (user, group, host)
|
|
||||||
* @param array $allScopes list of all active account modules and their scopes (module => array(scopes))
|
|
||||||
* @return mixed htmlElement or array of htmlElement
|
|
||||||
*
|
|
||||||
* @see htmlElement
|
|
||||||
*/
|
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$return = parent::get_configOptions($scopes, $allScopes);
|
$configContainer = new htmlResponsiveRow();
|
||||||
// configuration settings
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
if (isset($_SESSION['conf_config'])) {
|
if (isset($_SESSION['conf_config'])) {
|
||||||
// add password hash type if posixAccount is inactive
|
// add password hash type if posixAccount is inactive
|
||||||
$unixModuleFound = false;
|
$unixModuleFound = false;
|
||||||
|
@ -3656,87 +3644,57 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
if (!$unixModuleFound) {
|
if (!$unixModuleFound) {
|
||||||
$optionsSelected = array('SSHA');
|
$optionsSelected = array('SSHA');
|
||||||
$hashOption = new htmlTable();
|
$hashOption = new htmlResponsiveSelect('posixAccount_pwdHash', getSupportedHashTypes(), $optionsSelected, _("Password hash type"), 'pwdHash');
|
||||||
$hashOption->addElement(new htmlTableExtendedSelect('posixAccount_pwdHash', getSupportedHashTypes(), $optionsSelected, _("Password hash type"), 'pwdHash'));
|
$configContainer->add($hashOption, 12);
|
||||||
$configContainer->addElement($hashOption, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$configContainerHead = new htmlTable();
|
$configContainerHead = new htmlGroup();
|
||||||
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->add($configContainerHead, 12);
|
||||||
$configContainer->addElement($configContainerHead, true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideDescription', false, _('Description'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideDescription', false, _('Description'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideStreet', false, _('Street'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostOfficeBox', false, _('Post office box'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideStreet', false, _('Street'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostalCode', false, _('Postal code'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideLocation', false, _('Location'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostOfficeBox', false, _('Post office box'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideState', false, _('State'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePostalAddress', false, _('Postal address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostalCode', false, _('Postal code'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideRegisteredAddress', false, _('Registered address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideOfficeName', false, _('Office name'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideLocation', false, _('Location'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideRoomNumber', false, _('Room number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideTelephoneNumber', false, _('Telephone number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideState', false, _('State'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideHomeTelephoneNumber', false, _('Home telephone number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideMobileNumber', false, _('Mobile number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePostalAddress', false, _('Postal address'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideFaxNumber', false, _('Fax number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidePager', true, _('Pager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideRegisteredAddress', false, _('Registered address'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEMailAddress', false, _('Email address'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideJobTitle', false, _('Job title'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideOfficeName', false, _('Office name'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideCarLicense', false, _('Car license'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEmployeeType', false, _('Employee type'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideRoomNumber', false, _('Room number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideBusinessCategory', false, _('Business category'), null, true), 12, 4);
|
||||||
$configContainerOptions->addNewLine();
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideDepartments', false, _('Department'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideTelephoneNumber', false, _('Telephone number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideManager', false, _('Manager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideOu', false, _('Organisational unit'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideHomeTelephoneNumber', false, _('Home telephone number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideO', false, _('Organisation'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideEmployeeNumber', false, _('Employee number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideMobileNumber', false, _('Mobile number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideInitials', false, _('Initials'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideLabeledURI', false, _('Web site'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideFaxNumber', false, _('Fax number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideuserCertificate', false, _('User certificates'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hidejpegPhoto', false, _('Photo'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidePager', true, _('Pager'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEMailAddress', false, _('Email address'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideJobTitle', false, _('Job title'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideCarLicense', false, _('Car license'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEmployeeType', false, _('Employee type'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideBusinessCategory', false, _('Business category'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideDepartments', false, _('Department'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideManager', false, _('Manager'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideOu', false, _('Organisational unit'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideO', false, _('Organisation'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideEmployeeNumber', false, _('Employee number'), null, false));
|
|
||||||
$configContainerOptions->addNewLine();
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideInitials', false, _('Initials'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideLabeledURI', false, _('Web site'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideuserCertificate', false, _('User certificates'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hidejpegPhoto', false, _('Photo'), null, false));
|
|
||||||
if (isset($_SESSION['conf_config'])) {
|
if (isset($_SESSION['conf_config'])) {
|
||||||
$confActiveUnixUserModules = $_SESSION['conf_config']->get_AccountModules('user');
|
$confActiveUnixUserModules = $_SESSION['conf_config']->get_AccountModules('user');
|
||||||
// option to hide uid
|
// option to hide uid
|
||||||
if (!in_array('posixAccount', $confActiveUnixUserModules)) {
|
if (!in_array('posixAccount', $confActiveUnixUserModules)) {
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('inetOrgPerson_hideUID', false, _('User name'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_hideUID', false, _('User name'), null, false));
|
}
|
||||||
|
else {
|
||||||
|
$configContainer->add(new htmlOutputText(''), 0, 4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
$configContainer->addVerticalSpacer('1rem');
|
||||||
$advancedOptions = new htmlTable();
|
$advancedOptions = new htmlResponsiveRow();
|
||||||
$addressbookTable = new htmlTable();
|
$advancedOptions->add(new htmlResponsiveInputCheckbox('inetOrgPerson_addAddressbook', false, _('Add addressbook (ou=addressbook)'), 'addAddressbook'), 12);
|
||||||
$addressbookTable->addElement(new htmlTableExtendedInputCheckbox('inetOrgPerson_addAddressbook', false, _('Add addressbook (ou=addressbook)'), 'addAddressbook'));
|
$advancedOptions->add(new htmlSubTitle(_('Read-only fields')), 12);
|
||||||
$advancedOptions->addElement($addressbookTable, true);
|
|
||||||
$advancedOptions->addElement(new htmlSubTitle(_('Read-only fields')), true);
|
|
||||||
$readOnlyOptions = array(
|
$readOnlyOptions = array(
|
||||||
_('Description') => 'inetOrgPerson_readOnly_description', _('Street') => 'inetOrgPerson_readOnly_street',
|
_('Description') => 'inetOrgPerson_readOnly_description', _('Street') => 'inetOrgPerson_readOnly_street',
|
||||||
_('First name') => 'inetOrgPerson_readOnly_givenName', _('Last name') => 'inetOrgPerson_readOnly_sn',
|
_('First name') => 'inetOrgPerson_readOnly_givenName', _('Last name') => 'inetOrgPerson_readOnly_sn',
|
||||||
|
@ -3761,31 +3719,18 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$readOnlyOptions[_('Common name')] = 'inetOrgPerson_readOnly_cn';
|
$readOnlyOptions[_('Common name')] = 'inetOrgPerson_readOnly_cn';
|
||||||
}
|
}
|
||||||
ksort($readOnlyOptions);
|
ksort($readOnlyOptions);
|
||||||
$readOnlyCounter = 0;
|
|
||||||
$readOnlyOptionsTable = new htmlTable();
|
|
||||||
$readOnlyOptionsTable->colspan = 5;
|
|
||||||
foreach ($readOnlyOptions as $label => $id) {
|
foreach ($readOnlyOptions as $label => $id) {
|
||||||
$readOnlyOptionsTable->addElement(new htmlTableExtendedInputCheckbox($id, false, $label, null, false));
|
$advancedOptions->add(new htmlResponsiveInputCheckbox($id, false, $label, null, true), 12, 4);
|
||||||
$readOnlyCounter++;
|
|
||||||
if (($readOnlyCounter % 5) == 0) {
|
|
||||||
$readOnlyOptionsTable->addNewLine();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$advancedOptions->addElement($readOnlyOptionsTable, true);
|
$advancedOptions->add(new htmlSubTitle(_('Photo')), 12);
|
||||||
$advancedOptions->addElement(new htmlSubTitle(_('Photo')), true);
|
|
||||||
$photoTable = new htmlTable();
|
|
||||||
$photoTable->colspan = 2;
|
|
||||||
if (extension_loaded('imagick')) {
|
if (extension_loaded('imagick')) {
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum width (px)'), 'inetOrgPerson_jpegPhoto_maxWidth', null, 'crop'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum width (px)'), 'inetOrgPerson_jpegPhoto_maxWidth', null, 'crop'), 12);
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum height (px)'), 'inetOrgPerson_jpegPhoto_maxHeight', null, 'crop'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum height (px)'), 'inetOrgPerson_jpegPhoto_maxHeight', null, 'crop'), 12);
|
||||||
}
|
}
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum file size (kB)'), 'inetOrgPerson_jpegPhoto_maxSize'), true);
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum file size (kB)'), 'inetOrgPerson_jpegPhoto_maxSize'), 12);
|
||||||
$advancedOptions->addElement($photoTable, true);
|
|
||||||
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
||||||
$advancedOptionsAccordion->colspan = 5;
|
$configContainer->add($advancedOptionsAccordion, 12);
|
||||||
$configContainer->addElement($advancedOptionsAccordion);
|
return $configContainer;
|
||||||
$return[] = $configContainer;
|
|
||||||
return $return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,10 +110,6 @@ class kolabUser extends baseModule {
|
||||||
'type' => 'ext_preg',
|
'type' => 'ext_preg',
|
||||||
'regex' => 'digit',
|
'regex' => 'digit',
|
||||||
'error_message' => $this->messages['mailQuota'][0]);
|
'error_message' => $this->messages['mailQuota'][0]);
|
||||||
// config options
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
$configContainer->addElement(new htmlTableExtendedInputCheckbox('kolabUser_mailrecipient', true, _('Manage object class "mailrecipient"'), 'mailrecipient'), true);
|
|
||||||
$return['config_options']['all'] = $configContainer;
|
|
||||||
// self service field settings
|
// self service field settings
|
||||||
$return['selfServiceFieldSettings'] = array(
|
$return['selfServiceFieldSettings'] = array(
|
||||||
'kolabDelegate' => _('Delegates'),
|
'kolabDelegate' => _('Delegates'),
|
||||||
|
@ -993,6 +989,16 @@ class kolabUser extends baseModule {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see baseModule::get_configOptions()
|
||||||
|
*/
|
||||||
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
|
$configContainer = new htmlResponsiveRow();
|
||||||
|
$configContainer->add(new htmlResponsiveInputCheckbox('kolabUser_mailrecipient', true, _('Manage object class "mailrecipient"'), 'mailrecipient'), 12);
|
||||||
|
return $configContainer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -567,16 +567,15 @@ class nisMailAliasUser extends baseModule {
|
||||||
* @see htmlElement
|
* @see htmlElement
|
||||||
*/
|
*/
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
$configContainerHead = new htmlTable();
|
$hiddenGroup = new htmlGroup();
|
||||||
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
$hiddenGroup->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$hiddenGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->addLabel($hiddenGroup);
|
||||||
$configContainer->addElement($configContainerHead, true);
|
$configContainer->addField(new htmlOutputText(''));
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('nisMailAliasUser_hideUserAliases', false, _('Aliases for user name'), null, false));
|
$configContainer->addVerticalSpacer('0.5rem');
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('nisMailAliasUser_hideUserAliases', false, _('Aliases for user name')), 12);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('nisMailAliasUser_hideMailAliases', false, _('Aliases for email'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('nisMailAliasUser_hideMailAliases', false, _('Aliases for email')), 12);
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
|
||||||
return $configContainer;
|
return $configContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1909,17 +1909,17 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
*/
|
*/
|
||||||
function get_configOptions($scopes, $allScopes) {
|
function get_configOptions($scopes, $allScopes) {
|
||||||
$return = array();
|
$return = array();
|
||||||
|
$generatorOptions = array(
|
||||||
|
_('Fixed range') => 'range',
|
||||||
|
_('Samba ID pool') => 'sambaPool',
|
||||||
|
_('Windows domain info') => 'windowsDomain',
|
||||||
|
_('Magic number') => 'magicNumber'
|
||||||
|
);
|
||||||
if (in_array('user', $scopes)) {
|
if (in_array('user', $scopes)) {
|
||||||
// user options
|
// user options
|
||||||
$configUserContainer = new htmlTable();
|
$configUserContainer = new htmlResponsiveRow();
|
||||||
$configUserContainer->addElement(new htmlSubTitle(_("Users")), true);
|
$configUserContainer->add(new htmlSubTitle(_("Users")), 12);
|
||||||
$generatorOptions = array(
|
$uidGeneratorSelect = new htmlResponsiveSelect('posixAccount_uidGeneratorUsers', $generatorOptions, array('range'), _('UID generator'), 'uidGenerator');
|
||||||
_('Fixed range') => 'range',
|
|
||||||
_('Samba ID pool') => 'sambaPool',
|
|
||||||
_('Windows domain info') => 'windowsDomain',
|
|
||||||
_('Magic number') => 'magicNumber'
|
|
||||||
);
|
|
||||||
$uidGeneratorSelect = new htmlTableExtendedSelect('posixAccount_uidGeneratorUsers', $generatorOptions, array('range'), _('UID generator'), 'uidGenerator');
|
|
||||||
$uidGeneratorSelect->setHasDescriptiveElements(true);
|
$uidGeneratorSelect->setHasDescriptiveElements(true);
|
||||||
$uidGeneratorSelect->setTableRowsToHide(array(
|
$uidGeneratorSelect->setTableRowsToHide(array(
|
||||||
'range' => array('posixAccount_sambaIDPoolDNUsers', 'posixAccount_windowsIDPoolDNUsers', 'posixAccount_magicNumberUser'),
|
'range' => array('posixAccount_sambaIDPoolDNUsers', 'posixAccount_windowsIDPoolDNUsers', 'posixAccount_magicNumberUser'),
|
||||||
|
@ -1933,30 +1933,30 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
'windowsDomain' => array('posixAccount_windowsIDPoolDNUsers'),
|
'windowsDomain' => array('posixAccount_windowsIDPoolDNUsers'),
|
||||||
'magicNumber' => array('posixAccount_magicNumberUser')
|
'magicNumber' => array('posixAccount_magicNumberUser')
|
||||||
));
|
));
|
||||||
$configUserContainer->addElement($uidGeneratorSelect, true);
|
$configUserContainer->add($uidGeneratorSelect, 12);
|
||||||
$uidUsersGeneratorDN = new htmlTableExtendedInputField(_('Samba ID pool DN'), 'posixAccount_sambaIDPoolDNUsers', null, 'sambaIDPoolDN');
|
$uidUsersGeneratorDN = new htmlResponsiveInputField(_('Samba ID pool DN'), 'posixAccount_sambaIDPoolDNUsers', null, 'sambaIDPoolDN');
|
||||||
$uidUsersGeneratorDN->setRequired(true);
|
$uidUsersGeneratorDN->setRequired(true);
|
||||||
$configUserContainer->addElement($uidUsersGeneratorDN, true);
|
$configUserContainer->add($uidUsersGeneratorDN, 12);
|
||||||
$uidUsersGeneratorWinDN = new htmlTableExtendedInputField(_('Windows domain info DN'), 'posixAccount_windowsIDPoolDNUsers', null, 'windowsIDPoolDN');
|
$uidUsersGeneratorWinDN = new htmlResponsiveInputField(_('Windows domain info DN'), 'posixAccount_windowsIDPoolDNUsers', null, 'windowsIDPoolDN');
|
||||||
$uidUsersGeneratorWinDN->setRequired(true);
|
$uidUsersGeneratorWinDN->setRequired(true);
|
||||||
$configUserContainer->addElement($uidUsersGeneratorWinDN, true);
|
$configUserContainer->add($uidUsersGeneratorWinDN, 12);
|
||||||
$minUid = new htmlTableExtendedInputField(_('Minimum UID number'), 'posixAccount_minUID', null, 'minMaxUser');
|
$minUid = new htmlResponsiveInputField(_('Minimum UID number'), 'posixAccount_minUID', null, 'minMaxUser');
|
||||||
$minUid->setRequired(true);
|
$minUid->setRequired(true);
|
||||||
$configUserContainer->addElement($minUid, true);
|
$configUserContainer->add($minUid, 12);
|
||||||
$maxUid = new htmlTableExtendedInputField(_('Maximum UID number'), 'posixAccount_maxUID', null, 'minMaxUser');
|
$maxUid = new htmlResponsiveInputField(_('Maximum UID number'), 'posixAccount_maxUID', null, 'minMaxUser');
|
||||||
$maxUid->setRequired(true);
|
$maxUid->setRequired(true);
|
||||||
$configUserContainer->addElement($maxUid, true);
|
$configUserContainer->add($maxUid, 12);
|
||||||
$magicNumberUser = new htmlTableExtendedInputField(_('Magic number'), 'posixAccount_magicNumberUser', null, 'magicNumber');
|
$magicNumberUser = new htmlResponsiveInputField(_('Magic number'), 'posixAccount_magicNumberUser', null, 'magicNumber');
|
||||||
$magicNumberUser->setRequired(true);
|
$magicNumberUser->setRequired(true);
|
||||||
$configUserContainer->addElement($magicNumberUser, true);
|
$configUserContainer->add($magicNumberUser, 12);
|
||||||
$configUserContainer->addElement(new htmlTableExtendedInputField(_('Suffix for UID/user name check'), 'posixAccount_uidCheckSuffixUser', '', 'uidCheckSuffix'), true);
|
$configUserContainer->add(new htmlResponsiveInputField(_('Suffix for UID/user name check'), 'posixAccount_uidCheckSuffixUser', '', 'uidCheckSuffix'), 12);
|
||||||
$return[] = $configUserContainer;
|
$return[] = $configUserContainer;
|
||||||
}
|
}
|
||||||
// host options
|
// host options
|
||||||
if (in_array('host', $scopes)) {
|
if (in_array('host', $scopes)) {
|
||||||
$configHostContainer = new htmlTable();
|
$configHostContainer = new htmlResponsiveRow();
|
||||||
$configHostContainer->addElement(new htmlSubTitle(_("Hosts")), true);
|
$configHostContainer->add(new htmlSubTitle(_("Hosts")), 12);
|
||||||
$uidHostGeneratorSelect = new htmlTableExtendedSelect('posixAccount_uidGeneratorHosts', $generatorOptions, array('range'), _('UID generator'), 'uidGenerator');
|
$uidHostGeneratorSelect = new htmlResponsiveSelect('posixAccount_uidGeneratorHosts', $generatorOptions, array('range'), _('UID generator'), 'uidGenerator');
|
||||||
$uidHostGeneratorSelect->setHasDescriptiveElements(true);
|
$uidHostGeneratorSelect->setHasDescriptiveElements(true);
|
||||||
$uidHostGeneratorSelect->setTableRowsToHide(array(
|
$uidHostGeneratorSelect->setTableRowsToHide(array(
|
||||||
'range' => array('posixAccount_sambaIDPoolDNHosts', 'posixAccount_windowsIDPoolDNHosts', 'posixAccount_magicNumberHost'),
|
'range' => array('posixAccount_sambaIDPoolDNHosts', 'posixAccount_windowsIDPoolDNHosts', 'posixAccount_magicNumberHost'),
|
||||||
|
@ -1970,60 +1970,56 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
'windowsDomain' => array('posixAccount_windowsIDPoolDNHosts'),
|
'windowsDomain' => array('posixAccount_windowsIDPoolDNHosts'),
|
||||||
'magicNumber' => array('posixAccount_magicNumberHost')
|
'magicNumber' => array('posixAccount_magicNumberHost')
|
||||||
));
|
));
|
||||||
$configHostContainer->addElement($uidHostGeneratorSelect, true);
|
$configHostContainer->add($uidHostGeneratorSelect, 12);
|
||||||
$uidHostsGeneratorDN = new htmlTableExtendedInputField(_('Samba ID pool DN'), 'posixAccount_sambaIDPoolDNHosts', null, 'sambaIDPoolDN');
|
$uidHostsGeneratorDN = new htmlResponsiveInputField(_('Samba ID pool DN'), 'posixAccount_sambaIDPoolDNHosts', null, 'sambaIDPoolDN');
|
||||||
$uidHostsGeneratorDN->setRequired(true);
|
$uidHostsGeneratorDN->setRequired(true);
|
||||||
$configHostContainer->addElement($uidHostsGeneratorDN, true);
|
$configHostContainer->add($uidHostsGeneratorDN, 12);
|
||||||
$uidHostsGeneratorWinDN = new htmlTableExtendedInputField(_('Windows domain info DN'), 'posixAccount_windowsIDPoolDNHosts', null, 'windowsIDPoolDN');
|
$uidHostsGeneratorWinDN = new htmlResponsiveInputField(_('Windows domain info DN'), 'posixAccount_windowsIDPoolDNHosts', null, 'windowsIDPoolDN');
|
||||||
$uidHostsGeneratorWinDN->setRequired(true);
|
$uidHostsGeneratorWinDN->setRequired(true);
|
||||||
$configHostContainer->addElement($uidHostsGeneratorWinDN, true);
|
$configHostContainer->add($uidHostsGeneratorWinDN, 12);
|
||||||
$minUid = new htmlTableExtendedInputField(_('Minimum UID number'), 'posixAccount_minMachine', null, 'minMaxHost');
|
$minUid = new htmlResponsiveInputField(_('Minimum UID number'), 'posixAccount_minMachine', null, 'minMaxHost');
|
||||||
$minUid->setRequired(true);
|
$minUid->setRequired(true);
|
||||||
$configHostContainer->addElement($minUid, true);
|
$configHostContainer->add($minUid, 12);
|
||||||
$maxUid = new htmlTableExtendedInputField(_('Maximum UID number'), 'posixAccount_maxMachine', null, 'minMaxHost');
|
$maxUid = new htmlResponsiveInputField(_('Maximum UID number'), 'posixAccount_maxMachine', null, 'minMaxHost');
|
||||||
$maxUid->setRequired(true);
|
$maxUid->setRequired(true);
|
||||||
$configHostContainer->addElement($maxUid, true);
|
$configHostContainer->add($maxUid, 12);
|
||||||
$magicNumberHost = new htmlTableExtendedInputField(_('Magic number'), 'posixAccount_magicNumberHost', null, 'magicNumber');
|
$magicNumberHost = new htmlResponsiveInputField(_('Magic number'), 'posixAccount_magicNumberHost', null, 'magicNumber');
|
||||||
$magicNumberHost->setRequired(true);
|
$magicNumberHost->setRequired(true);
|
||||||
$configHostContainer->addElement($magicNumberHost, true);
|
$configHostContainer->add($magicNumberHost, 12);
|
||||||
$configHostContainer->addElement(new htmlTableExtendedInputField(_('Suffix for UID/user name check'), 'posixAccount_uidCheckSuffixHost', '', 'uidCheckSuffix'), true);
|
$configHostContainer->add(new htmlResponsiveInputField(_('Suffix for UID/user name check'), 'posixAccount_uidCheckSuffixHost', '', 'uidCheckSuffix'), 12);
|
||||||
$return[] = $configHostContainer;
|
$return[] = $configHostContainer;
|
||||||
}
|
}
|
||||||
// common options
|
// common options
|
||||||
$configOptionsContainer = new htmlTable();
|
$configOptionsContainer = new htmlResponsiveRow();
|
||||||
$configOptionsContainer->addElement(new htmlSubTitle(_('Options')), true);
|
$configOptionsContainer->add(new htmlSubTitle(_('Options')), 12);
|
||||||
$configOptionsContainer->addElement(new htmlTableExtendedSelect('posixAccount_pwdHash', getSupportedHashTypes(),
|
$configOptionsContainer->add(new htmlResponsiveSelect('posixAccount_pwdHash', getSupportedHashTypes(),
|
||||||
array('SSHA'), _("Password hash type"), 'pwdHash'), true);
|
array('SSHA'), _("Password hash type"), 'pwdHash'), 12);
|
||||||
$configOptionsContainer->addElement(new htmlTableExtendedInputTextarea('posixAccount_shells', implode("\r\n", $this->getShells()), 30, 4, _('Login shells'), 'loginShells'), true);
|
$configOptionsContainer->add(new htmlResponsiveInputTextarea('posixAccount_shells', implode("\r\n", $this->getShells()), 30, 4, _('Login shells'), 'loginShells'), 12);
|
||||||
$hiddenOptionsContainer = new htmlGroup();
|
$hiddenOptionsContainerHead = new htmlGroup();
|
||||||
$hiddenOptionsContainer->colspan = 5;
|
|
||||||
$hiddenOptionsContainerHead = new htmlTable();
|
|
||||||
$hiddenOptionsContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
$hiddenOptionsContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$hiddenOptionsContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
$hiddenOptionsContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$hiddenOptionsContainer->addElement($hiddenOptionsContainerHead);
|
$configOptionsContainer->addLabel($hiddenOptionsContainerHead, 12);
|
||||||
$configContainerOptions = new htmlTable();
|
$configOptionsContainer->addField(new htmlOutputText(''));
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('posixAccount_hidegecos', false, _('Gecos'), null, false));
|
$configOptionsContainer->addVerticalSpacer('0.5rem');
|
||||||
|
$configOptionsContainer->add(new htmlResponsiveInputCheckbox('posixAccount_hidegecos', false, _('Gecos'), null, false), 12);
|
||||||
if (isset($_SESSION['conf_config'])) {
|
if (isset($_SESSION['conf_config'])) {
|
||||||
$confActiveGONModules = array_merge($_SESSION['conf_config']->get_AccountModules('group'), $_SESSION['conf_config']->get_AccountModules('gon'));
|
$confActiveGONModules = array_merge($_SESSION['conf_config']->get_AccountModules('group'), $_SESSION['conf_config']->get_AccountModules('gon'));
|
||||||
if (in_array('groupOfNames', $confActiveGONModules) || in_array('groupOfMembers', $confActiveGONModules) || in_array('groupOfUniqueNames', $confActiveGONModules)) {
|
if (in_array('groupOfNames', $confActiveGONModules) || in_array('groupOfMembers', $confActiveGONModules) || in_array('groupOfUniqueNames', $confActiveGONModules)) {
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configOptionsContainer->add(new htmlResponsiveInputCheckbox('posixAccount_hidegon', false, _('Groups of names'), null, false), 12);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('posixAccount_hidegon', false, _('Groups of names'), null, false));
|
$configOptionsContainer->add(new htmlResponsiveInputCheckbox('posixAccount_hideposixGroups', false, _('Unix groups'), null, false), 12);
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('posixAccount_hideposixGroups', false, _('Unix groups'), null, false));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$hiddenOptionsContainer->addElement($configContainerOptions);
|
$configOptionsContainer->addVerticalSpacer('1rem');
|
||||||
$configOptionsContainer->addElement($hiddenOptionsContainer, true);
|
$advancedOptions = new htmlResponsiveRow();
|
||||||
$advancedOptions = new htmlTable();
|
$advancedOptions->add(new htmlResponsiveInputCheckbox('posixAccount_primaryGroupAsSecondary', false, _('Set primary group as memberUid'), 'primaryGroupAsSecondary'), 12);
|
||||||
$advancedOptions->addElement(new htmlTableExtendedInputCheckbox('posixAccount_primaryGroupAsSecondary', false, _('Set primary group as memberUid'), 'primaryGroupAsSecondary'), true);
|
|
||||||
$isWindows = array_key_exists('windowsUser', $allScopes);
|
$isWindows = array_key_exists('windowsUser', $allScopes);
|
||||||
if ($isWindows) {
|
if ($isWindows) {
|
||||||
$advancedOptions->addElement(new htmlTableExtendedInputCheckbox('posixAccount_noObjectClass', false, _('Do not add object class'), 'noObjectClass'), true);
|
$advancedOptions->add(new htmlResponsiveInputCheckbox('posixAccount_noObjectClass', false, _('Do not add object class'), 'noObjectClass'), 12);
|
||||||
}
|
}
|
||||||
$advancedOptions->addElement(new htmlTableExtendedInputField(_('User name suggestion'), 'posixAccount_userNameSuggestion', '@givenname@%sn%', 'userNameSuggestion'));
|
$advancedOptions->add(new htmlResponsiveInputField(_('User name suggestion'), 'posixAccount_userNameSuggestion', '@givenname@%sn%', 'userNameSuggestion'), 12);
|
||||||
$advancedOptionsAccordion = new htmlAccordion('posixAccountAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
$advancedOptionsAccordion = new htmlAccordion('posixAccountAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
||||||
$advancedOptionsAccordion->colspan = 5;
|
$advancedOptionsAccordion->colspan = 5;
|
||||||
$configOptionsContainer->addElement($advancedOptionsAccordion);
|
$configOptionsContainer->add($advancedOptionsAccordion, 12);
|
||||||
$return[] = $configOptionsContainer;
|
$return[] = $configOptionsContainer;
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
|
|
|
@ -541,23 +541,20 @@ class posixGroup extends baseModule implements passwordService {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of elements for the configuration.
|
* {@inheritDoc}
|
||||||
*
|
* @see baseModule::get_configOptions()
|
||||||
* @param array $scopes account types (user, group, host)
|
*/
|
||||||
* @param array $allScopes list of all modules and active scopes
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
* @return array configuration elements
|
|
||||||
*/
|
|
||||||
function get_configOptions($scopes, $allScopes) {
|
|
||||||
// configuration options
|
// configuration options
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
$configContainer->addElement(new htmlSubTitle(_("Groups")), true);
|
$configContainer->add(new htmlSubTitle(_("Groups")), 12);
|
||||||
$genOptions = array(
|
$genOptions = array(
|
||||||
_('Fixed range') => 'range',
|
_('Fixed range') => 'range',
|
||||||
_('Samba ID pool') => 'sambaPool',
|
_('Samba ID pool') => 'sambaPool',
|
||||||
_('Windows domain info') => 'windowsDomain',
|
_('Windows domain info') => 'windowsDomain',
|
||||||
_('Magic number') => 'magicNumber'
|
_('Magic number') => 'magicNumber'
|
||||||
);
|
);
|
||||||
$gidGeneratorSelect = new htmlTableExtendedSelect('posixGroup_gidGenerator', $genOptions, array('range'), _('GID generator'), 'gidGenerator');
|
$gidGeneratorSelect = new htmlResponsiveSelect('posixGroup_gidGenerator', $genOptions, array('range'), _('GID generator'), 'gidGenerator');
|
||||||
$gidGeneratorSelect->setHasDescriptiveElements(true);
|
$gidGeneratorSelect->setHasDescriptiveElements(true);
|
||||||
$gidGeneratorSelect->setTableRowsToHide(array(
|
$gidGeneratorSelect->setTableRowsToHide(array(
|
||||||
'range' => array('posixGroup_sambaIDPoolDN', 'posixGroup_windowsIDPoolDN', 'posixGroup_magicNumber'),
|
'range' => array('posixGroup_sambaIDPoolDN', 'posixGroup_windowsIDPoolDN', 'posixGroup_magicNumber'),
|
||||||
|
@ -571,31 +568,31 @@ class posixGroup extends baseModule implements passwordService {
|
||||||
'windowsDomain' => array('posixGroup_windowsIDPoolDN'),
|
'windowsDomain' => array('posixGroup_windowsIDPoolDN'),
|
||||||
'magicNumber' => array('posixGroup_magicNumber')
|
'magicNumber' => array('posixGroup_magicNumber')
|
||||||
));
|
));
|
||||||
$configContainer->addElement($gidGeneratorSelect, true);
|
$configContainer->add($gidGeneratorSelect, 12);
|
||||||
$minGidInput = new htmlTableExtendedInputField(_('Minimum GID number'), 'posixGroup_minGID', null, 'minMaxGID');
|
$minGidInput = new htmlResponsiveInputField(_('Minimum GID number'), 'posixGroup_minGID', null, 'minMaxGID');
|
||||||
$minGidInput->setRequired(true);
|
$minGidInput->setRequired(true);
|
||||||
$configContainer->addElement($minGidInput, true);
|
$configContainer->add($minGidInput, 12);
|
||||||
$maxGidInput = new htmlTableExtendedInputField(_('Maximum GID number'), 'posixGroup_maxGID', null, 'minMaxGID');
|
$maxGidInput = new htmlResponsiveInputField(_('Maximum GID number'), 'posixGroup_maxGID', null, 'minMaxGID');
|
||||||
$maxGidInput->setRequired(true);
|
$maxGidInput->setRequired(true);
|
||||||
$configContainer->addElement($maxGidInput, true);
|
$configContainer->add($maxGidInput, 12);
|
||||||
$gidGeneratorDN = new htmlTableExtendedInputField(_('Samba ID pool DN'), 'posixGroup_sambaIDPoolDN', null, 'sambaIDPoolDN');
|
$gidGeneratorDN = new htmlResponsiveInputField(_('Samba ID pool DN'), 'posixGroup_sambaIDPoolDN', null, 'sambaIDPoolDN');
|
||||||
$gidGeneratorDN->setRequired(true);
|
$gidGeneratorDN->setRequired(true);
|
||||||
$configContainer->addElement($gidGeneratorDN, true);
|
$configContainer->add($gidGeneratorDN, 12);
|
||||||
$winGeneratorDN = new htmlTableExtendedInputField(_('Windows domain info DN'), 'posixGroup_windowsIDPoolDN', null, 'windowsIDPoolDN');
|
$winGeneratorDN = new htmlResponsiveInputField(_('Windows domain info DN'), 'posixGroup_windowsIDPoolDN', null, 'windowsIDPoolDN');
|
||||||
$winGeneratorDN->setRequired(true);
|
$winGeneratorDN->setRequired(true);
|
||||||
$configContainer->addElement($winGeneratorDN, true);
|
$configContainer->add($winGeneratorDN, 12);
|
||||||
$magicNumber = new htmlTableExtendedInputField(_('Magic number'), 'posixGroup_magicNumber', null, 'magicNumber');
|
$magicNumber = new htmlResponsiveInputField(_('Magic number'), 'posixGroup_magicNumber', null, 'magicNumber');
|
||||||
$magicNumber->setRequired(true);
|
$magicNumber->setRequired(true);
|
||||||
$configContainer->addElement($magicNumber, true);
|
$configContainer->add($magicNumber, 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputField(_('Suffix for GID/group name check'), 'posixGroup_gidCheckSuffix', '', 'gidCheckSuffix'), true);
|
$configContainer->add(new htmlResponsiveInputField(_('Suffix for GID/group name check'), 'posixGroup_gidCheckSuffix', '', 'gidCheckSuffix'), 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputCheckbox('posixGroup_hidememberUid', false, _('Disable membership management'), 'hidememberUid'), true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('posixGroup_hidememberUid', false, _('Disable membership management'), 'hidememberUid'), 12);
|
||||||
if ((!empty($allScopes['groupOfNames']) && in_array('group', $allScopes['groupOfNames']))
|
if ((!empty($allScopes['groupOfNames']) && in_array('group', $allScopes['groupOfNames']))
|
||||||
|| (!empty($allScopes['groupOfUniqueNames']) && in_array('group', $allScopes['groupOfUniqueNames']))) {
|
|| (!empty($allScopes['groupOfUniqueNames']) && in_array('group', $allScopes['groupOfUniqueNames']))) {
|
||||||
$configContainer->addElement(new htmlTableExtendedInputCheckbox('posixGroup_autoSyncGon', false, _('Force sync with group of names'), 'autoSyncGon'), true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('posixGroup_autoSyncGon', false, _('Force sync with group of names'), 'autoSyncGon'), 12);
|
||||||
}
|
}
|
||||||
// display password hash option only if posixAccount module is not used
|
// display password hash option only if posixAccount module is not used
|
||||||
if (!isset($allScopes['posixAccount'])) {
|
if (!isset($allScopes['posixAccount'])) {
|
||||||
$configContainer->addElement(new htmlTableExtendedSelect('posixAccount_pwdHash', getSupportedHashTypes(), array('SSHA'), _("Password hash type"), 'pwdHash'));
|
$configContainer->add(new htmlResponsiveSelect('posixAccount_pwdHash', getSupportedHashTypes(), array('SSHA'), _("Password hash type"), 'pwdHash'), 12);
|
||||||
}
|
}
|
||||||
return $configContainer;
|
return $configContainer;
|
||||||
}
|
}
|
||||||
|
|
|
@ -516,26 +516,14 @@ class puppetClient extends baseModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of configuration options.
|
* {@inheritDoc}
|
||||||
*
|
* @see baseModule::get_configOptions()
|
||||||
* Calling this method does not require the existence of an enclosing {@link accountContainer}.<br>
|
*/
|
||||||
* <br>
|
|
||||||
* The field names are used as keywords to load and save settings.
|
|
||||||
* We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.
|
|
||||||
*
|
|
||||||
* @param array $scopes account types (user, group, host)
|
|
||||||
* @param array $allScopes list of all active account modules and their scopes (module => array(scopes))
|
|
||||||
* @return mixed htmlElement or array of htmlElement
|
|
||||||
*
|
|
||||||
* @see htmlElement
|
|
||||||
*/
|
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
$return = parent::get_configOptions($scopes, $allScopes);
|
$return = new htmlResponsiveRow();
|
||||||
// config options
|
// config options
|
||||||
$configContainer = new htmlTable();
|
$return->add(new htmlResponsiveInputTextarea('puppetClient_environments', "production\r\ntesting", 30, 5, _('Predefined environments'), 'predefinedEnvironments'), 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_environments', "production\r\ntesting", 30, 5, _('Predefined environments'), 'predefinedEnvironments'), true);
|
$return->add(new htmlResponsiveInputTextarea('puppetClient_enforceClasses', '', 30, 5, _('Enforce classes'), 'enforceClasses'), 12);
|
||||||
$configContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_enforceClasses', '', 30, 5, _('Enforce classes'), 'enforceClasses'), true);
|
|
||||||
$return[] = $configContainer;
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -259,10 +259,6 @@ class pykotaUser extends baseModule {
|
||||||
$selfServiceContainer->addElement(new htmlHelpLink('jobSuffix', get_class($this)), true);
|
$selfServiceContainer->addElement(new htmlHelpLink('jobSuffix', get_class($this)), true);
|
||||||
$return['selfServiceSettings'] = $selfServiceContainer;
|
$return['selfServiceSettings'] = $selfServiceContainer;
|
||||||
}
|
}
|
||||||
// config options
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
$configContainer->addElement(new htmlTableExtendedInputField(_('Job suffix'), 'pykotaUser_jobSuffix', '', 'jobSuffix'), true);
|
|
||||||
$return['config_options']['all'] = $configContainer;
|
|
||||||
// configuration checks
|
// configuration checks
|
||||||
$return['config_checks']['all']['pykotaUser_jobSuffix'] = array (
|
$return['config_checks']['all']['pykotaUser_jobSuffix'] = array (
|
||||||
'type' => 'ext_preg',
|
'type' => 'ext_preg',
|
||||||
|
@ -1210,6 +1206,16 @@ class pykotaUser extends baseModule {
|
||||||
return array_values($jobs);
|
return array_values($jobs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see baseModule::get_configOptions()
|
||||||
|
*/
|
||||||
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
|
$configContainer = new htmlResponsiveRow();
|
||||||
|
$configContainer->add(new htmlResponsiveInputField(_('Job suffix'), 'pykotaUser_jobSuffix', '', 'jobSuffix'), 12);
|
||||||
|
return $configContainer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1869,49 +1869,37 @@ class sambaSamAccount extends baseModule implements passwordService {
|
||||||
if (!in_array('user', $scopes)) {
|
if (!in_array('user', $scopes)) {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
// password history
|
// password history
|
||||||
$history = new htmlTable();
|
|
||||||
$historyOptions = array(
|
$historyOptions = array(
|
||||||
_('yes - ordered ascending') => 'yes_deleteLast',
|
_('yes - ordered ascending') => 'yes_deleteLast',
|
||||||
_('yes - ordered descending') => 'yes_deleteFirst',
|
_('yes - ordered descending') => 'yes_deleteFirst',
|
||||||
_('no') => 'no'
|
_('no') => 'no'
|
||||||
);
|
);
|
||||||
$historySelect = new htmlTableExtendedSelect('sambaSamAccount_history', $historyOptions, array('yes_deleteLast'), _("Password history"), 'history');
|
$historySelect = new htmlResponsiveSelect('sambaSamAccount_history', $historyOptions, array('yes_deleteLast'), _("Password history"), 'history');
|
||||||
$historySelect->setHasDescriptiveElements(true);
|
$historySelect->setHasDescriptiveElements(true);
|
||||||
$history->addElement($historySelect, true);
|
$configContainer->add($historySelect, 12);
|
||||||
$configContainer->addElement($history, true);
|
|
||||||
// disable LM passwords
|
// disable LM passwords
|
||||||
$disableLM = new htmlTable();
|
|
||||||
$yesNo = array(_('yes') => 'yes', _('no') => 'no');
|
$yesNo = array(_('yes') => 'yes', _('no') => 'no');
|
||||||
$lmYesNoSelect = new htmlTableExtendedSelect('sambaSamAccount_lmHash', $yesNo, array('yes'), _("Disable LM hashes"), 'lmHash');
|
$lmYesNoSelect = new htmlResponsiveSelect('sambaSamAccount_lmHash', $yesNo, array('yes'), _("Disable LM hashes"), 'lmHash');
|
||||||
$lmYesNoSelect->setHasDescriptiveElements(true);
|
$lmYesNoSelect->setHasDescriptiveElements(true);
|
||||||
$disableLM->addElement($lmYesNoSelect, true);
|
$configContainer->add($lmYesNoSelect, 12);
|
||||||
$configContainer->addElement($disableLM, true);
|
|
||||||
// hidden options
|
// hidden options
|
||||||
$configContainer->addElement(new htmlSpacer(null, '10px'), true);
|
$configContainer->addVerticalSpacer('1rem');
|
||||||
$configHiddenLabelGroup = new htmlGroup();
|
$configHiddenLabelGroup = new htmlGroup();
|
||||||
$configHiddenLabelGroup->addElement(new htmlOutputText(_('Hidden options') . ' '));
|
$configHiddenLabelGroup->addElement(new htmlOutputText(_('Hidden options') . ' '));
|
||||||
$configHiddenLabelGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
$configHiddenLabelGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainer->addElement($configHiddenLabelGroup, true);
|
$configContainer->add($configHiddenLabelGroup, 12);
|
||||||
$hiddenContainer = new htmlTable();
|
$configContainer->addVerticalSpacer('0.5rem');
|
||||||
$hiddenContainer->colspan = 5;
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideHomeDrive', false, _('Home drive'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideHomeDrive', false, _('Home drive'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideHomePath', false, _('Home path'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideProfilePath', false, _('Profile path'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideHomePath', false, _('Home path'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideLogonScript', false, _('Logon script'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideSambaPwdLastSet', false, _('Last password change'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideProfilePath', false, _('Profile path'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideWorkstations', false, _('Samba workstations'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideLogonHours', false, _('Logon hours'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideLogonScript', false, _('Logon script'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('sambaSamAccount_hideTerminalServer', false, _('Terminal server options'), null, true), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
$configContainer->add(new htmlOutputText(''), 12, 4);
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideSambaPwdLastSet', false, _('Last password change'), null, false));
|
|
||||||
$hiddenContainer->addNewLine();
|
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideWorkstations', false, _('Samba workstations'), null, false));
|
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideLogonHours', false, _('Logon hours'), null, false));
|
|
||||||
$hiddenContainer->addElement(new htmlOutputText(' '));
|
|
||||||
$hiddenContainer->addElement(new htmlTableExtendedInputCheckbox('sambaSamAccount_hideTerminalServer', false, _('Terminal server options'), null, false));
|
|
||||||
$configContainer->addElement($hiddenContainer);
|
|
||||||
$return[] = $configContainer;
|
$return[] = $configContainer;
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,20 +165,6 @@ class windowsGroup extends baseModule {
|
||||||
"Text" => _('NIS domain name.')
|
"Text" => _('NIS domain name.')
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
// configuration settings
|
|
||||||
$configContainer = new htmlTable();
|
|
||||||
$configContainerHead = new htmlTable();
|
|
||||||
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
|
||||||
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
|
||||||
$configContainerOptions = new htmlTable();
|
|
||||||
$configContainer->addElement($configContainerHead, true);
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemail', false, _('Email address'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemanagedBy', false, _('Managed by'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemsSFU30Name', true, _('NIS name'), null, false));
|
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemsSFU30NisDomain', true, _('NIS domain'), null, false));
|
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
|
||||||
$return['config_options']['all'] = $configContainer;
|
|
||||||
// upload fields
|
// upload fields
|
||||||
$return['upload_columns'] = array(
|
$return['upload_columns'] = array(
|
||||||
array(
|
array(
|
||||||
|
@ -1104,6 +1090,26 @@ class windowsGroup extends baseModule {
|
||||||
return $effectiveMembers;
|
return $effectiveMembers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @see baseModule::get_configOptions()
|
||||||
|
*/
|
||||||
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
|
$configContainer = new htmlResponsiveRow();
|
||||||
|
$configContainerHead = new htmlGroup();
|
||||||
|
$configContainerHead->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
|
$configContainerHead->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
|
$configContainer->add($configContainerHead, 12);
|
||||||
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsGroup_hidemail', false, _('Email address'), null, true), 12, 4);
|
||||||
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsGroup_hidemanagedBy', false, _('Managed by'), null, true), 12, 4);
|
||||||
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsGroup_hidemsSFU30Name', true, _('NIS name'), null, true), 12, 4);
|
||||||
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsGroup_hidemsSFU30NisDomain', true, _('NIS domain'), null, true), 12, 4);
|
||||||
|
for ($i = 0; $i < 2; $i++) {
|
||||||
|
$configContainer->add(new htmlOutputText(''), 0, 4);
|
||||||
|
}
|
||||||
|
return $configContainer;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3184,67 +3184,52 @@ class windowsUser extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of configuration options.
|
* {@inheritDoc}
|
||||||
*
|
* @see baseModule::get_configOptions()
|
||||||
* Calling this method does not require the existence of an enclosing {@link accountContainer}.<br>
|
*/
|
||||||
* <br>
|
|
||||||
* The field names are used as keywords to load and save settings.
|
|
||||||
* We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.
|
|
||||||
*
|
|
||||||
* @param array $scopes account types (user, group, host)
|
|
||||||
* @param array $allScopes list of all active account modules and their scopes (module => array(scopes))
|
|
||||||
* @return mixed htmlElement or array of htmlElement
|
|
||||||
*
|
|
||||||
* @see htmlElement
|
|
||||||
*/
|
|
||||||
public function get_configOptions($scopes, $allScopes) {
|
public function get_configOptions($scopes, $allScopes) {
|
||||||
// configuration options
|
// configuration options
|
||||||
$configContainer = new htmlTable();
|
$configContainer = new htmlResponsiveRow();
|
||||||
$configContainerHead = new htmlTable();
|
$configContainer->add(new htmlResponsiveInputTextarea('windowsUser_domains', '', 30, 3, _('Domains'), 'domains'), 12);
|
||||||
$configContainerHead->addElement(new htmlTableExtendedInputTextarea('windowsUser_domains', '', 30, 3, _('Domains'), 'domains'));
|
|
||||||
$configContainer->addElement($configContainerHead, true);
|
|
||||||
$configContainer->addVerticalSpace('10px');
|
|
||||||
$configHiddenGroup = new htmlGroup();
|
$configHiddenGroup = new htmlGroup();
|
||||||
$configHiddenGroup->addElement(new htmlOutputText(_('Hidden options')));
|
$configHiddenGroup->addElement(new htmlOutputText(_('Hidden options')));
|
||||||
$configHiddenGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
$configHiddenGroup->addElement(new htmlHelpLink('hiddenOptions'));
|
||||||
$configContainer->addElement($configHiddenGroup, true);
|
$configContainer->add($configHiddenGroup, 12);
|
||||||
$configContainerOptions = new htmlTable();
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideproxyAddresses', true, _('Proxy-Addresses'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideproxyAddresses', true, _('Proxy-Addresses'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidefacsimileTelephoneNumber', false, _('Fax number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidefacsimileTelephoneNumber', false, _('Fax number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidemobile', true, _('Mobile'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidemobile', true, _('Mobile'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideotherMobile', true, _('Other mobiles'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideotherMobile', true, _('Other mobiles'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidepager', true, _('Pager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidepager', true, _('Pager'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideotherPager', true, _('Other pagers'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideotherPager', true, _('Other pagers'), null, false), true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidesAMAccountName', true, _('User name (pre W2K)'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidesAMAccountName', true, _('User name (pre W2K)'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidemsSFU30Name', true, _('NIS name'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidemsSFU30Name', true, _('NIS name'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidemsSFU30NisDomain', true, _('NIS domain'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidemsSFU30NisDomain', true, _('NIS domain'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidepwdLastSet', false, _('Last password change'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidepwdLastSet', false, _('Last password change'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidelastLogonTimestamp', false, _('Last login'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidelastLogonTimestamp', false, _('Last login'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidejpegPhoto', true, _('Photo'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidejpegPhoto', true, _('Photo'), null, false), true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidetitle', true, _('Job title'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidetitle', true, _('Job title'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidecarLicense', true, _('Car license'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidecarLicense', true, _('Car license'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideemployeeNumber', true, _('Employee number'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideemployeeNumber', true, _('Employee number'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideemployeeType', true, _('Employee type'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideemployeeType', true, _('Employee type'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidebusinessCategory', true, _('Business category'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidebusinessCategory', true, _('Business category'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidecompany', true, _('Company'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidecompany', true, _('Company'), null, false), true);
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidedepartment', true, _('Department'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidedepartment', true, _('Department'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideou', true, _('Organisational unit'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideou', true, _('Organisational unit'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hideo', true, _('Organisation'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hideo', true, _('Organisation'), null, false));
|
$configContainer->add(new htmlResponsiveInputCheckbox('windowsUser_hidemanager', true, _('Manager'), null, true), 12, 4);
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsUser_hidemanager', true, _('Manager'), null, false));
|
for ($i = 0; $i < 2; $i++) {
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
$configContainer->add(new htmlOutputText(''), 0, 4);
|
||||||
$advancedOptions = new htmlTable();
|
|
||||||
$advancedOptions->addElement(new htmlSubTitle(_('Photo')), true);
|
|
||||||
$photoTable = new htmlTable();
|
|
||||||
$photoTable->colspan = 2;
|
|
||||||
if (extension_loaded('imagick')) {
|
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum width (px)'), 'windowsUser_jpegPhoto_maxWidth', null, 'crop'), true);
|
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum height (px)'), 'windowsUser_jpegPhoto_maxHeight', null, 'crop'), true);
|
|
||||||
}
|
}
|
||||||
$photoTable->addElement(new htmlTableExtendedInputField(_('Maximum file size (kB)'), 'windowsUser_jpegPhoto_maxSize'), true);
|
$advancedOptions = new htmlResponsiveRow();
|
||||||
$advancedOptions->addElement($photoTable, true);
|
$advancedOptions->add(new htmlSubTitle(_('Photo')), 12);
|
||||||
|
if (extension_loaded('imagick')) {
|
||||||
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum width (px)'), 'windowsUser_jpegPhoto_maxWidth', null, 'crop'), 12);
|
||||||
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum height (px)'), 'windowsUser_jpegPhoto_maxHeight', null, 'crop'), 12);
|
||||||
|
}
|
||||||
|
$advancedOptions->add(new htmlResponsiveInputField(_('Maximum file size (kB)'), 'windowsUser_jpegPhoto_maxSize'), 12);
|
||||||
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
$advancedOptionsAccordion = new htmlAccordion('inetOrgPersonAdvancedOptions', array(_('Advanced options') => $advancedOptions), false);
|
||||||
$advancedOptionsAccordion->colspan = 5;
|
$advancedOptionsAccordion->colspan = 5;
|
||||||
$configContainer->addElement($advancedOptionsAccordion);
|
$configContainer->add($advancedOptionsAccordion, 12);
|
||||||
return $configContainer;
|
return $configContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -183,7 +183,7 @@ printConfigurationPageTabs(ConfigurationPageTab::GENERAL);
|
||||||
|
|
||||||
$row = new htmlResponsiveRow();
|
$row = new htmlResponsiveRow();
|
||||||
|
|
||||||
$serverSettings = new htmlSubTitle(_("Server settings"), '../../graphics/schemaBrowser.png');
|
$serverSettings = new htmlSubTitle(_("Server settings"), '../../graphics/profiles.png', null, true);
|
||||||
$row->add($serverSettings, 12);
|
$row->add($serverSettings, 12);
|
||||||
// server URL
|
// server URL
|
||||||
$urlInput = new htmlResponsiveInputField(_("Server address"), 'serverurl', $conf->get_ServerURL(), '201');
|
$urlInput = new htmlResponsiveInputField(_("Server address"), 'serverurl', $conf->get_ServerURL(), '201');
|
||||||
|
@ -236,7 +236,7 @@ $row->add($advancedOptions, 12);
|
||||||
$row->addVerticalSpacer('2rem');
|
$row->addVerticalSpacer('2rem');
|
||||||
|
|
||||||
// language
|
// language
|
||||||
$row->add(new htmlSubTitle(_("Language settings"), '../../graphics/languageSmall.png'), 12);
|
$row->add(new htmlSubTitle(_("Language settings"), '../../graphics/language.png', null, true), 12);
|
||||||
// read available languages
|
// read available languages
|
||||||
$possibleLanguages = getLanguages();
|
$possibleLanguages = getLanguages();
|
||||||
$defaultLanguage = array('en_GB.utf8');
|
$defaultLanguage = array('en_GB.utf8');
|
||||||
|
@ -271,7 +271,7 @@ $row->add(new htmlResponsiveSelect('timeZone', $timezones, array($conf->getTimeZ
|
||||||
$row->addVerticalSpacer('2rem');
|
$row->addVerticalSpacer('2rem');
|
||||||
|
|
||||||
// lamdaemon settings
|
// lamdaemon settings
|
||||||
$row->add(new htmlSubTitle(_("Lamdaemon settings"), '../../graphics/lamdaemonSmall.png'), 12);
|
$row->add(new htmlSubTitle(_("Lamdaemon settings"), '../../graphics/lamdaemon.png', null, true), 12);
|
||||||
$row->add(new htmlResponsiveInputField(_("Server list"), 'scriptservers', $conf->get_scriptServers(), '218'), 12);
|
$row->add(new htmlResponsiveInputField(_("Server list"), 'scriptservers', $conf->get_scriptServers(), '218'), 12);
|
||||||
$row->add(new htmlResponsiveInputField(_("Path to external script"), 'scriptpath', $conf->get_scriptPath(), '210'), 12);
|
$row->add(new htmlResponsiveInputField(_("Path to external script"), 'scriptpath', $conf->get_scriptPath(), '210'), 12);
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ $row->addVerticalSpacer('2rem');
|
||||||
// LAM Pro settings
|
// LAM Pro settings
|
||||||
if (isLAMProVersion()) {
|
if (isLAMProVersion()) {
|
||||||
// password reset page
|
// password reset page
|
||||||
$row->add(new htmlSubTitle(_("Password reset page settings"), '../../graphics/key.png'), 12);
|
$row->add(new htmlSubTitle(_("Password reset page settings"), '../../graphics/keyBig.png', null, true), 12);
|
||||||
|
|
||||||
$pwdResetAllowSpecific = true;
|
$pwdResetAllowSpecific = true;
|
||||||
if ($conf->getPwdResetAllowSpecificPassword() == 'false') {
|
if ($conf->getPwdResetAllowSpecificPassword() == 'false') {
|
||||||
|
@ -345,7 +345,7 @@ if (isLAMProVersion()) {
|
||||||
$row->addVerticalSpacer('2rem');
|
$row->addVerticalSpacer('2rem');
|
||||||
|
|
||||||
// mail settings
|
// mail settings
|
||||||
$row->add(new htmlSubTitle(_("Password mail settings"), '../../graphics/mail.png'), 12);
|
$row->add(new htmlSubTitle(_("Password mail settings"), '../../graphics/mailBig.png', null, true), 12);
|
||||||
|
|
||||||
$pwdMailFrom = new htmlResponsiveInputField(_('From address'), 'pwdResetMail_from', $conf->getLamProMailFrom(), '550');
|
$pwdMailFrom = new htmlResponsiveInputField(_('From address'), 'pwdResetMail_from', $conf->getLamProMailFrom(), '550');
|
||||||
$row->add($pwdMailFrom, 12);
|
$row->add($pwdMailFrom, 12);
|
||||||
|
@ -375,7 +375,7 @@ if (isLAMProVersion()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// tool settings
|
// tool settings
|
||||||
$row->add(new htmlSubTitle(_("Tool settings"), '../../graphics/tools.png'), 12);
|
$row->add(new htmlSubTitle(_("Tool settings"), '../../graphics/bigTools.png',null, true), 12);
|
||||||
$toolSettings = $conf->getToolSettings();
|
$toolSettings = $conf->getToolSettings();
|
||||||
$row->add(new htmlOutputText(_('Hidden tools')), 12);
|
$row->add(new htmlOutputText(_('Hidden tools')), 12);
|
||||||
$row->addVerticalSpacer('0.5rem');
|
$row->addVerticalSpacer('0.5rem');
|
||||||
|
@ -392,7 +392,8 @@ for ($i = 0; $i < sizeof($tools); $i++) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$toolSettingsContent = new htmlResponsiveRow();
|
$toolSettingsContent = new htmlResponsiveRow();
|
||||||
for ($r = 0; $r < (sizeof($tools)); $r++) {
|
$toolsSize = sizeof($tools);
|
||||||
|
for ($r = 0; $r < $toolsSize; $r++) {
|
||||||
$tool = $tools[$r];
|
$tool = $tools[$r];
|
||||||
$toolClass = get_class($tool);
|
$toolClass = get_class($tool);
|
||||||
$toolName = substr($toolClass, strrpos($toolClass, '\\') + 1);
|
$toolName = substr($toolClass, strrpos($toolClass, '\\') + 1);
|
||||||
|
@ -400,14 +401,17 @@ for ($r = 0; $r < (sizeof($tools)); $r++) {
|
||||||
if (isset($toolSettings['tool_hide_' . $toolName]) && ($toolSettings['tool_hide_' . $toolName] === 'true')) {
|
if (isset($toolSettings['tool_hide_' . $toolName]) && ($toolSettings['tool_hide_' . $toolName] === 'true')) {
|
||||||
$selected = true;
|
$selected = true;
|
||||||
}
|
}
|
||||||
$toolSettingsContent->add(new htmlResponsiveInputCheckbox('tool_hide_' . $toolName, $selected, $tool->getName(), null, false), 12);
|
$toolSettingsContent->add(new htmlResponsiveInputCheckbox('tool_hide_' . $toolName, $selected, $tool->getName(), null, false), 12, 4);
|
||||||
|
}
|
||||||
|
for ($i = $toolsSize % 3; $i < 3; $i++) {
|
||||||
|
$toolSettingsContent->add(new htmlOutputText(''), 0, 4);
|
||||||
}
|
}
|
||||||
$row->add($toolSettingsContent, 12);
|
$row->add($toolSettingsContent, 12);
|
||||||
|
|
||||||
$row->addVerticalSpacer('2rem');
|
$row->addVerticalSpacer('2rem');
|
||||||
|
|
||||||
// security setings
|
// security setings
|
||||||
$row->add(new htmlSubTitle(_("Security settings"), '../../graphics/lock.png'), 12);
|
$row->add(new htmlSubTitle(_("Security settings"), '../../graphics/security.png', null, true), 12);
|
||||||
// login method
|
// login method
|
||||||
$loginOptions = array(
|
$loginOptions = array(
|
||||||
_('Fixed list') => LAMConfig::LOGIN_LIST,
|
_('Fixed list') => LAMConfig::LOGIN_LIST,
|
||||||
|
@ -477,7 +481,7 @@ if (extension_loaded('curl')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// new password
|
// new password
|
||||||
$row->add(new htmlSubTitle(_("Profile password")), 12);
|
$row->add(new htmlSubTitle(_("Profile password"), '../../graphics/keyBig.png', null, true), 12);
|
||||||
$password1 = new htmlResponsiveInputField(_("New password"), 'passwd1', null, '212');
|
$password1 = new htmlResponsiveInputField(_("New password"), 'passwd1', null, '212');
|
||||||
$password1->setIsPassword(true);
|
$password1->setIsPassword(true);
|
||||||
$password2 = new htmlResponsiveInputField(_("Reenter password"), 'passwd2');
|
$password2 = new htmlResponsiveInputField(_("Reenter password"), 'passwd2');
|
||||||
|
|
|
@ -211,8 +211,12 @@ function config_showAccountModules($type, &$container) {
|
||||||
|
|
||||||
// add account module selection
|
// add account module selection
|
||||||
$container->add(new htmlSubTitle($type->getAlias(), '../../graphics/' . $type->getIcon()), 12);
|
$container->add(new htmlSubTitle($type->getAlias(), '../../graphics/' . $type->getIcon()), 12);
|
||||||
$container->add(new htmlOutputText(_("Selected modules")), 12, 6);
|
if (sizeof($selOptions) > 0) {
|
||||||
$container->add(new htmlOutputText(_("Available modules")), 0, 6);
|
$container->add(new htmlOutputText(_("Selected modules")), 12, 6);
|
||||||
|
}
|
||||||
|
if (sizeof($availOptions) > 0) {
|
||||||
|
$container->add(new htmlOutputText(_("Available modules")), 0, 6);
|
||||||
|
}
|
||||||
$container->addVerticalSpacer('1rem');
|
$container->addVerticalSpacer('1rem');
|
||||||
// selected modules
|
// selected modules
|
||||||
if (sizeof($selOptions) > 0) {
|
if (sizeof($selOptions) > 0) {
|
||||||
|
|
|
@ -4,6 +4,8 @@ use \moduleCache;
|
||||||
use \htmlSpacer;
|
use \htmlSpacer;
|
||||||
use \htmlTable;
|
use \htmlTable;
|
||||||
use \htmlButton;
|
use \htmlButton;
|
||||||
|
use \htmlResponsiveRow;
|
||||||
|
use \htmlSubTitle;
|
||||||
/*
|
/*
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
@ -104,40 +106,9 @@ if (isset($_POST['saveSettings']) || isset($_POST['editmodules'])
|
||||||
$allTypes = \LAM\TYPES\getTypes();
|
$allTypes = \LAM\TYPES\getTypes();
|
||||||
|
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
|
printHeaderContents(_("LDAP Account Manager Configuration"), '../..');
|
||||||
echo "<title>" . _("LDAP Account Manager Configuration") . "</title>\n";
|
echo "</head><body class=\"admin\">\n";
|
||||||
|
printJsIncludes('../..');
|
||||||
// include all CSS files
|
|
||||||
$cssDirName = dirname(__FILE__) . '/../../style';
|
|
||||||
$cssDir = dir($cssDirName);
|
|
||||||
$cssFiles = array();
|
|
||||||
$cssEntry = $cssDir->read();
|
|
||||||
while ($cssEntry !== false) {
|
|
||||||
if (substr($cssEntry, strlen($cssEntry) - 4, 4) == '.css') {
|
|
||||||
$cssFiles[] = $cssEntry;
|
|
||||||
}
|
|
||||||
$cssEntry = $cssDir->read();
|
|
||||||
}
|
|
||||||
sort($cssFiles);
|
|
||||||
foreach ($cssFiles as $cssEntry) {
|
|
||||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/" . $cssEntry . "\">\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"../../graphics/favicon.ico\">\n";
|
|
||||||
echo "<link rel=\"icon\" href=\"../../graphics/logo136.png\">\n";
|
|
||||||
echo "</head><body>\n";
|
|
||||||
// include all JavaScript files
|
|
||||||
$jsDirName = dirname(__FILE__) . '/../lib';
|
|
||||||
$jsDir = dir($jsDirName);
|
|
||||||
$jsFiles = array();
|
|
||||||
while ($jsEntry = $jsDir->read()) {
|
|
||||||
if (substr($jsEntry, strlen($jsEntry) - 3, 3) != '.js') continue;
|
|
||||||
$jsFiles[] = $jsEntry;
|
|
||||||
}
|
|
||||||
sort($jsFiles);
|
|
||||||
foreach ($jsFiles as $jsEntry) {
|
|
||||||
echo "<script type=\"text/javascript\" src=\"../lib/" . $jsEntry . "\"></script>\n";
|
|
||||||
}
|
|
||||||
printConfigurationPageHeaderBar($conf);
|
printConfigurationPageHeaderBar($conf);
|
||||||
|
|
||||||
// print error messages
|
// print error messages
|
||||||
|
@ -179,20 +150,25 @@ $modules = array_keys($options);
|
||||||
$_SESSION['conf_types'] = array();
|
$_SESSION['conf_types'] = array();
|
||||||
for ($i = 0; $i < sizeof($modules); $i++) {
|
for ($i = 0; $i < sizeof($modules); $i++) {
|
||||||
if (sizeof($options[$modules[$i]]) < 1) continue;
|
if (sizeof($options[$modules[$i]]) < 1) continue;
|
||||||
echo "<fieldset class=\"ui-corner-all user-border user-bright\">\n";
|
|
||||||
$icon = '';
|
|
||||||
$module = moduleCache::getModule($modules[$i], 'none');
|
$module = moduleCache::getModule($modules[$i], 'none');
|
||||||
$iconImage = $module->getIcon();
|
$iconImage = $module->getIcon();
|
||||||
if ($iconImage != null) {
|
if ($iconImage != null) {
|
||||||
if (!(strpos($iconImage, 'http') === 0) && !(strpos($iconImage, '/') === 0)) {
|
if (!(strpos($iconImage, 'http') === 0) && !(strpos($iconImage, '/') === 0)) {
|
||||||
$iconImage = '../../graphics/' . $iconImage;
|
$iconImage = '../../graphics/' . $iconImage;
|
||||||
}
|
}
|
||||||
$icon = '<img align="middle" src="' . $iconImage . '" alt="' . $iconImage . '"> ';
|
|
||||||
}
|
}
|
||||||
echo "<legend>$icon" . getModuleAlias($modules[$i], "none") . "</legend>\n";
|
$row = new htmlResponsiveRow();
|
||||||
$configTypes = parseHtml($modules[$i], $options[$modules[$i]], $old_options, false, $tabindex, 'none');
|
$row->add(new htmlSubTitle(getModuleAlias($modules[$i], "none"), $iconImage, null, true), 12);
|
||||||
|
if (is_array($options[$modules[$i]])) {
|
||||||
|
foreach ($options[$modules[$i]] as $option) {
|
||||||
|
$row->add($option, 12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$row->add($options[$modules[$i]], 12);
|
||||||
|
}
|
||||||
|
$configTypes = parseHtml($modules[$i], $row, $old_options, false, $tabindex, 'none');
|
||||||
$_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']);
|
$_SESSION['conf_types'] = array_merge($configTypes, $_SESSION['conf_types']);
|
||||||
echo "</fieldset>\n";
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue