responsive
This commit is contained in:
parent
43326b515f
commit
49ae8b49b6
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
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 - 2018 Roland Gruber
|
2009 - 2019 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
|
||||||
|
@ -581,7 +581,7 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
* @return htmlElement HTML meta data
|
* @return htmlElement HTML meta data
|
||||||
*/
|
*/
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
if (in_array('AsteriskSIPUser', $this->attributes['objectClass'])) {
|
if (in_array('AsteriskSIPUser', $this->attributes['objectClass'])) {
|
||||||
// caller ID
|
// caller ID
|
||||||
$this->addSimpleInputTextField($return, 'AstAccountCallerID', _("Caller ID"), true);
|
$this->addSimpleInputTextField($return, 'AstAccountCallerID', _("Caller ID"), true);
|
||||||
|
@ -605,8 +605,8 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
$AstAccountAMAFlagsOptions[] = $this->attributes['AstAccountAMAFlags'][0];
|
$AstAccountAMAFlagsOptions[] = $this->attributes['AstAccountAMAFlags'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$AstAccountAMAFlagsInput = new htmlTableExtendedSelect('AstAccountAMAFlags', $AstAccountAMAFlagsOptions, $AstAccountAMAFlags, _("AMA flags"), 'AstAccountAMAFlags');
|
$AstAccountAMAFlagsInput = new htmlResponsiveSelect('AstAccountAMAFlags', $AstAccountAMAFlagsOptions, $AstAccountAMAFlags, _("AMA flags"), 'AstAccountAMAFlags');
|
||||||
$return->addElement($AstAccountAMAFlagsInput, true);
|
$return->add($AstAccountAMAFlagsInput, 12);
|
||||||
}
|
}
|
||||||
// call groups
|
// call groups
|
||||||
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountCallGroup')) {
|
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountCallGroup')) {
|
||||||
|
@ -622,8 +622,8 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
$AstAccountDTMFModeOptions[] = $this->attributes['AstAccountDTMFMode'][0];
|
$AstAccountDTMFModeOptions[] = $this->attributes['AstAccountDTMFMode'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$AstAccountDTMFModeInput = new htmlTableExtendedSelect('AstAccountDTMFMode', $AstAccountDTMFModeOptions, $AstAccountDTMFMode, _("DTFM flags"), 'AstAccountDTMFMode');
|
$AstAccountDTMFModeInput = new htmlResponsiveSelect('AstAccountDTMFMode', $AstAccountDTMFModeOptions, $AstAccountDTMFMode, _("DTFM flags"), 'AstAccountDTMFMode');
|
||||||
$return->addElement($AstAccountDTMFModeInput, true);
|
$return->add($AstAccountDTMFModeInput, 12);
|
||||||
}
|
}
|
||||||
// from user
|
// from user
|
||||||
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountFromUser')) {
|
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountFromUser')) {
|
||||||
|
@ -647,8 +647,8 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
$AstAccountInsecureOptions[] = $this->attributes['AstAccountInsecure'][0];
|
$AstAccountInsecureOptions[] = $this->attributes['AstAccountInsecure'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$AstAccountInsecureInput = new htmlTableExtendedSelect('AstAccountInsecure', $AstAccountInsecureOptions, $AstAccountInsecure, _("Insecure"), 'AstAccountInsecure');
|
$AstAccountInsecureInput = new htmlResponsiveSelect('AstAccountInsecure', $AstAccountInsecureOptions, $AstAccountInsecure, _("Insecure"), 'AstAccountInsecure');
|
||||||
$return->addElement($AstAccountInsecureInput, true);
|
$return->add($AstAccountInsecureInput, 12);
|
||||||
}
|
}
|
||||||
// mailbox
|
// mailbox
|
||||||
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountMailbox')) {
|
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountMailbox')) {
|
||||||
|
@ -664,8 +664,8 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
$AstAccountNATOptions[] = $this->attributes['AstAccountNAT'][0];
|
$AstAccountNATOptions[] = $this->attributes['AstAccountNAT'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$AstAccountNATInput = new htmlTableExtendedSelect('AstAccountNAT', $AstAccountNATOptions, $AstAccountNAT, _("NAT"), 'AstAccountNAT');
|
$AstAccountNATInput = new htmlResponsiveSelect('AstAccountNAT', $AstAccountNATOptions, $AstAccountNAT, _("NAT"), 'AstAccountNAT');
|
||||||
$return->addElement($AstAccountNATInput, true);
|
$return->add($AstAccountNATInput, 12);
|
||||||
}
|
}
|
||||||
// deny
|
// deny
|
||||||
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountDeny')) {
|
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountDeny')) {
|
||||||
|
@ -736,8 +736,8 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
$AstAccountCanCallForwardOptions[] = $this->attributes['AstAccountCanCallForward'][0];
|
$AstAccountCanCallForwardOptions[] = $this->attributes['AstAccountCanCallForward'][0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$AstAccountCanCallForwardInput = new htmlTableExtendedSelect('AstAccountCanCallForward', $AstAccountCanCallForwardOptions, $AstAccountCanCallForward, _("Can call forward"), 'AstAccountCanCallForward');
|
$AstAccountCanCallForwardInput = new htmlResponsiveSelect('AstAccountCanCallForward', $AstAccountCanCallForwardOptions, $AstAccountCanCallForward, _("Can call forward"), 'AstAccountCanCallForward');
|
||||||
$return->addElement($AstAccountCanCallForwardInput, true);
|
$return->add($AstAccountCanCallForwardInput, 12);
|
||||||
}
|
}
|
||||||
// IP address
|
// IP address
|
||||||
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountIPAddress')) {
|
if (!$this->isBooleanConfigOptionSet('asteriskAccount_hideAstAccountIPAddress')) {
|
||||||
|
@ -757,7 +757,7 @@ class asteriskAccount extends baseModule implements passwordService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$return->addElement(new htmlButton('addObjectClass', _('Add Asterisk account')));
|
$return->add(new htmlButton('addObjectClass', _('Add Asterisk account')), 12);
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,7 +201,7 @@ class asteriskExtension extends baseModule {
|
||||||
* @return htmlElement HTML meta data
|
* @return htmlElement HTML meta data
|
||||||
*/
|
*/
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
|
|
||||||
$extName = '';
|
$extName = '';
|
||||||
if (isset($this->attributes['AstExtension'][0])) {
|
if (isset($this->attributes['AstExtension'][0])) {
|
||||||
|
@ -227,17 +227,13 @@ class asteriskExtension extends baseModule {
|
||||||
/**
|
/**
|
||||||
* This function prints management elements to manipulate owners of an extension.
|
* This function prints management elements to manipulate owners of an extension.
|
||||||
*
|
*
|
||||||
* @param htmlTable container
|
* @param htmlResponsiveRow $renderContainer
|
||||||
*/
|
*/
|
||||||
function render_exten_owners_set_controls($renderContainer) {
|
function render_exten_owners_set_controls($renderContainer) {
|
||||||
$renderContainer->addElement(new htmlSpacer(null, '10px'), true);
|
$renderContainer->addVerticalSpacer('1rem');
|
||||||
$ownersLabel = new htmlOutputText(_("Extension owners"));
|
$title = new htmlSubTitle(_("Extension owners"));
|
||||||
$ownersLabel->setMarkAsRequired(true);
|
$title->setHelpId('member');
|
||||||
$renderContainer->addElement($ownersLabel);
|
$renderContainer->add($title, 12);
|
||||||
$renderContainer->addElement(new htmlAccountPageButton(get_class($this), 'user', 'open', _('Change')));
|
|
||||||
$renderContainer->addElement(new htmlHelpLink('member'));
|
|
||||||
$renderContainer->addNewLine();
|
|
||||||
$renderContainer->addElement(new htmlOutputText(''));
|
|
||||||
$ownerList = new htmlTable();
|
$ownerList = new htmlTable();
|
||||||
if ((!isset($this->extensionOwners) || sizeof($this->extensionOwners) == 0) && isset($this->extensionRows[0]['member'])) {
|
if ((!isset($this->extensionOwners) || sizeof($this->extensionOwners) == 0) && isset($this->extensionRows[0]['member'])) {
|
||||||
$this->extensionOwners = $this->extensionRows[0]['member'];
|
$this->extensionOwners = $this->extensionRows[0]['member'];
|
||||||
|
@ -247,7 +243,9 @@ class asteriskExtension extends baseModule {
|
||||||
$ownerList->addElement(new htmlOutputText(getAbstractDN($this->extensionOwners[$i])), true);
|
$ownerList->addElement(new htmlOutputText(getAbstractDN($this->extensionOwners[$i])), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$renderContainer->addElement($ownerList);
|
$renderContainer->add($ownerList, 12);
|
||||||
|
$renderContainer->addVerticalSpacer('1rem');
|
||||||
|
$renderContainer->add(new htmlAccountPageButton(get_class($this), 'user', 'open', _('Change')), 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -276,7 +274,7 @@ class asteriskExtension extends baseModule {
|
||||||
* Generates the meta HTML for the rules.
|
* Generates the meta HTML for the rules.
|
||||||
*
|
*
|
||||||
* @param String $extension extension name
|
* @param String $extension extension name
|
||||||
* @param htmlTable $renderContainer container
|
* @param htmlResponsiveRow $renderContainer container
|
||||||
*/
|
*/
|
||||||
function render_extensions_by_priority($extension, $renderContainer) {
|
function render_extensions_by_priority($extension, $renderContainer) {
|
||||||
if (!isset($extension) || $extension == "") {
|
if (!isset($extension) || $extension == "") {
|
||||||
|
@ -287,13 +285,13 @@ class asteriskExtension extends baseModule {
|
||||||
|
|
||||||
if ($this->getAccountContainer()->isNewAccount) {
|
if ($this->getAccountContainer()->isNewAccount) {
|
||||||
$suggestedExtName = $this->generateNextExtensionName();
|
$suggestedExtName = $this->generateNextExtensionName();
|
||||||
$extNameInput = new htmlTableExtendedInputField(_("Extension name"), 'AstExtension', $suggestedExtName, 'AstExtension');
|
$extNameInput = new htmlResponsiveInputField(_("Extension name"), 'AstExtension', $suggestedExtName, 'AstExtension');
|
||||||
$extNameInput->setRequired(true);
|
$extNameInput->setRequired(true);
|
||||||
$renderContainer->addElement($extNameInput, true);
|
$renderContainer->add($extNameInput, 12);
|
||||||
} else {
|
} else {
|
||||||
$extNameInput = new htmlTableExtendedInputField(_("Extension name"), 'AstExtension', $extension, 'AstExtension');
|
$extNameInput = new htmlResponsiveInputField(_("Extension name"), 'AstExtension', $extension, 'AstExtension');
|
||||||
$extNameInput->setRequired(true);
|
$extNameInput->setRequired(true);
|
||||||
$renderContainer->addElement($extNameInput, true);
|
$renderContainer->add($extNameInput, 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
$accountContext = '';
|
$accountContext = '';
|
||||||
|
@ -304,17 +302,17 @@ class asteriskExtension extends baseModule {
|
||||||
//LOAD context from attributes, this is treak to deal with profile
|
//LOAD context from attributes, this is treak to deal with profile
|
||||||
$accountContext = $this->attributes['AstContext'][0];
|
$accountContext = $this->attributes['AstContext'][0];
|
||||||
}
|
}
|
||||||
$accountContextInput = new htmlTableExtendedInputField(_("Account context"), 'AstContext', $accountContext, 'AstContext');
|
$accountContextInput = new htmlResponsiveInputField(_("Account context"), 'AstContext', $accountContext, 'AstContext');
|
||||||
$accountContextInput->setRequired(true);
|
$accountContextInput->setRequired(true);
|
||||||
$renderContainer->addElement($accountContextInput, true);
|
$renderContainer->add($accountContextInput, 12);
|
||||||
|
|
||||||
|
|
||||||
$renderContainer->addElement(new htmlSubTitle(_('Rules')));
|
$renderContainer->add(new htmlSubTitle(_('Rules')), 12);
|
||||||
$renderContainer->addElement(new htmlSpacer(null, '20px'), true);
|
$renderContainer->addVerticalSpacer('1rem');
|
||||||
|
|
||||||
for ($i = 0; $i < sizeof($entries); $i++) {
|
for ($i = 0; $i < sizeof($entries); $i++) {
|
||||||
$this->render_extension($entries[$i], $i, $renderContainer);
|
$this->render_extension($entries[$i], $i, $renderContainer);
|
||||||
$renderContainer->addElement(new htmlButton("delete_rule_" . $i, _('Delete rule')), false);
|
$renderContainer->addLabel(new htmlButton("delete_rule_" . $i, _('Delete rule')), false);
|
||||||
|
|
||||||
$upDownButtons = new htmlTable();
|
$upDownButtons = new htmlTable();
|
||||||
if ($i > 0) {
|
if ($i > 0) {
|
||||||
|
@ -324,9 +322,9 @@ class asteriskExtension extends baseModule {
|
||||||
((sizeof($entries) > 1) || ($this->addRuleFlag) )) {
|
((sizeof($entries) > 1) || ($this->addRuleFlag) )) {
|
||||||
$upDownButtons->addElement(new htmlButton('rule_down_button_' . $i, 'down.gif', true));
|
$upDownButtons->addElement(new htmlButton('rule_down_button_' . $i, 'down.gif', true));
|
||||||
}
|
}
|
||||||
$renderContainer->addElement($upDownButtons, true);
|
$renderContainer->addField($upDownButtons, true);
|
||||||
|
|
||||||
$renderContainer->addElement(new htmlSpacer(null, '30px'), true);
|
$renderContainer->addVerticalSpacer('2rem');
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayEntrNum = sizeof($entries);
|
$displayEntrNum = sizeof($entries);
|
||||||
|
@ -337,9 +335,9 @@ class asteriskExtension extends baseModule {
|
||||||
|
|
||||||
if ($this->addRuleFlag) {
|
if ($this->addRuleFlag) {
|
||||||
$upDownButtons = new htmlTable();
|
$upDownButtons = new htmlTable();
|
||||||
$renderContainer->addElement(new htmlButton("delete_rule_" . $i, _('Delete rule')), false);
|
$renderContainer->addLabel(new htmlButton("delete_rule_" . $i, _('Delete rule')), false);
|
||||||
$upDownButtons->addElement(new htmlButton('rule_up_button_' . $i, 'up.gif', true), false);
|
$upDownButtons->addElement(new htmlButton('rule_up_button_' . $i, 'up.gif', true), false);
|
||||||
$renderContainer->addElement($upDownButtons, true);
|
$renderContainer->addField($upDownButtons, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayEntrNum++;
|
$displayEntrNum++;
|
||||||
|
@ -347,9 +345,9 @@ class asteriskExtension extends baseModule {
|
||||||
}
|
}
|
||||||
// the size of found rows plus 1 for new one
|
// the size of found rows plus 1 for new one
|
||||||
$hidenInput = new htmlHiddenInput("extension_rows", $displayEntrNum);
|
$hidenInput = new htmlHiddenInput("extension_rows", $displayEntrNum);
|
||||||
$renderContainer->addElement($hidenInput, true);
|
$renderContainer->add($hidenInput, 12);
|
||||||
|
|
||||||
$renderContainer->addElement(new htmlButton("add_rule", _('Add another rule')), true);
|
$renderContainer->add(new htmlButton("add_rule", _('Add another rule')), 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -357,7 +355,7 @@ class asteriskExtension extends baseModule {
|
||||||
*
|
*
|
||||||
* @param array $extensLine attributes of rule
|
* @param array $extensLine attributes of rule
|
||||||
* @param int $placeInList rule position
|
* @param int $placeInList rule position
|
||||||
* @param htmlTable $renderContainer container
|
* @param htmlResponsiveRow $renderContainer container
|
||||||
*/
|
*/
|
||||||
function render_extension($extensLine, $placeInList, $renderContainer) {
|
function render_extension($extensLine, $placeInList, $renderContainer) {
|
||||||
// application
|
// application
|
||||||
|
@ -365,17 +363,17 @@ class asteriskExtension extends baseModule {
|
||||||
if (isset($extensLine['astapplication'][0])) {
|
if (isset($extensLine['astapplication'][0])) {
|
||||||
$application = $extensLine['astapplication'][0];
|
$application = $extensLine['astapplication'][0];
|
||||||
}
|
}
|
||||||
$applicationInput = new htmlTableExtendedInputField(_("Application"), "AstApplication_" . $placeInList, $application, 'AstApplication');
|
$applicationInput = new htmlResponsiveInputField(_("Application"), "AstApplication_" . $placeInList, $application, 'AstApplication');
|
||||||
$applicationInput->setRequired(true);
|
$applicationInput->setRequired(true);
|
||||||
$renderContainer->addElement($applicationInput, true);
|
$renderContainer->add($applicationInput, 12);
|
||||||
// application data
|
// application data
|
||||||
$applicationData = '';
|
$applicationData = '';
|
||||||
if (isset($extensLine['astapplicationdata'][0])) {
|
if (isset($extensLine['astapplicationdata'][0])) {
|
||||||
$applicationData = $extensLine['astapplicationdata'][0];
|
$applicationData = $extensLine['astapplicationdata'][0];
|
||||||
}
|
}
|
||||||
$renderContainer->addElement(new htmlTableExtendedInputField(_("Application data"), "AstApplicationData_" . $placeInList, $applicationData, 'AstApplicationData'), true);
|
$renderContainer->add(new htmlResponsiveInputField(_("Application data"), "AstApplicationData_" . $placeInList, $applicationData, 'AstApplicationData'), 12);
|
||||||
//delimeter
|
//delimeter
|
||||||
$renderContainer->addElement(new htmlSpacer(null, '5px'), true);
|
$renderContainer->addVerticalSpacer('0.5rem');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -421,10 +419,10 @@ class asteriskExtension extends baseModule {
|
||||||
/**
|
/**
|
||||||
* Displays a list of possible owners of this extension.
|
* Displays a list of possible owners of this extension.
|
||||||
*
|
*
|
||||||
* @return htmlElement HTML meta data
|
* @return htmlResponsiveRow HTML meta data
|
||||||
*/
|
*/
|
||||||
function display_html_user() {
|
function display_html_user() {
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
// load list with all potential owners
|
// load list with all potential owners
|
||||||
$searchScope = 'user';
|
$searchScope = 'user';
|
||||||
if ($this->searchOwnersInTreeSuffix) {
|
if ($this->searchOwnersInTreeSuffix) {
|
||||||
|
@ -452,40 +450,18 @@ class asteriskExtension extends baseModule {
|
||||||
$members[getAbstractDN($memberList[$i])] = $memberList[$i];
|
$members[getAbstractDN($memberList[$i])] = $memberList[$i];
|
||||||
}
|
}
|
||||||
// options
|
// options
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('filterAsteriskUsers', $this->filterOwnerForAsteriskAccounts, _('Show only Asterisk accounts'), 'ownerOptions', false));
|
$return->add(new htmlSubTitle(_("Filters")), 12);
|
||||||
|
$return->add(new htmlResponsiveInputCheckbox('filterAsteriskUsers', $this->filterOwnerForAsteriskAccounts, _('Show only Asterisk accounts'), 'ownerOptions', false), 12);
|
||||||
|
$return->add(new htmlResponsiveInputCheckbox('useTreeSuffix', $this->searchOwnersInTreeSuffix, _('Search tree suffix for users'), 'ownerOptions', false), 12);
|
||||||
$refreshButton = new htmlButton('changeFilter', _('Refresh'));
|
$refreshButton = new htmlButton('changeFilter', _('Refresh'));
|
||||||
$refreshButton->rowspan = 2;
|
$return->add($refreshButton, 12);
|
||||||
$return->addElement($refreshButton, true);
|
$return->addVerticalSpacer('1rem');
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('useTreeSuffix', $this->searchOwnersInTreeSuffix, _('Search tree suffix for users'), 'ownerOptions', false), true);
|
|
||||||
$return->addElement(new htmlSpacer(null, '10px'), true);
|
|
||||||
// owners
|
// owners
|
||||||
$ownerContent = new htmlTable();
|
$this->addDoubleSelectionArea($return, _("Selected users"), _("Available users"), $members, array(), $users_dn, array(), 'owners', true);
|
||||||
$ownerContent->addElement(new htmlOutputText(_("Selected users")));
|
|
||||||
$ownerContent->addElement(new htmlOutputText(""));
|
|
||||||
$ownerContent->addElement(new htmlOutputText(_("Available users")));
|
|
||||||
$ownerContent->addNewLine();
|
|
||||||
$selectedList = new htmlSelect('removeusers', $members, null, 15);
|
|
||||||
$selectedList->setHasDescriptiveElements(true);
|
|
||||||
$selectedList->setMultiSelect(true);
|
|
||||||
$selectedList->setRightToLeftTextDirection(true);
|
|
||||||
$ownerContent->addElement($selectedList);
|
|
||||||
$ownerButtons = new htmlTable();
|
|
||||||
$ownerButtons->addElement(new htmlButton('addusers_button', 'back.gif', true), true);
|
|
||||||
$ownerButtons->addElement(new htmlButton('removeusers_button', 'forward.gif', true));
|
|
||||||
$ownerContent->addElement($ownerButtons);
|
|
||||||
$availableList = new htmlSelect('addusers', $users_dn, null, 15);
|
|
||||||
$availableList->setTransformSingleSelect(false);
|
|
||||||
$availableList->setHasDescriptiveElements(true);
|
|
||||||
$availableList->setMultiSelect(true);
|
|
||||||
$availableList->setRightToLeftTextDirection(true);
|
|
||||||
$ownerContent->addElement($availableList);
|
|
||||||
$ownerContent->colspan = 4;
|
|
||||||
$return->addElement(new htmlSubTitle(_("Extension owners")), true);
|
|
||||||
$return->addElement($ownerContent, true);
|
|
||||||
// back button
|
// back button
|
||||||
$backButton = new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Ok'));
|
$backButton = new htmlAccountPageButton(get_class($this), 'attributes', 'back', _('Ok'));
|
||||||
$backButton->colspan = 3;
|
$backButton->colspan = 3;
|
||||||
$return->addElement($backButton);
|
$return->add($backButton, 12);
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,11 +489,12 @@ class asteriskExtension extends baseModule {
|
||||||
if (!isset($this->extensionOwners)) {
|
if (!isset($this->extensionOwners)) {
|
||||||
$this->extensionOwners = array();
|
$this->extensionOwners = array();
|
||||||
}
|
}
|
||||||
if (isset($_POST['addusers']) && isset($_POST['addusers_button'])) { // Add users to list
|
if (isset($_POST['owners_2']) && isset($_POST['owners_left'])) {
|
||||||
// Add new user
|
// Add new user
|
||||||
$this->extensionOwners = @array_merge($this->extensionOwners, $_POST['addusers']);
|
$this->extensionOwners = @array_merge($this->extensionOwners, $_POST['owners_2']);
|
||||||
} elseif (isset($_POST['removeusers']) && isset($_POST['removeusers_button'])) { // remove users from list
|
}
|
||||||
$this->extensionOwners = array_delete($_POST['removeusers'], $this->extensionOwners);
|
elseif (isset($_POST['owners_1']) && isset($_POST['owners_right'])) {
|
||||||
|
$this->extensionOwners = array_delete($_POST['owners_1'], $this->extensionOwners);
|
||||||
}
|
}
|
||||||
$this->attributes['member'] = $this->extensionOwners;
|
$this->attributes['member'] = $this->extensionOwners;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue