From 368a3988dce4beddfc2077bd22e3965d09ee6bdd Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 17 Aug 2019 10:27:18 +0200 Subject: [PATCH] responsive --- lam/lib/modules/asteriskVoicemail.inc | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index 095d64e1..27b974b9 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -1,10 +1,9 @@ attributes['objectClass'])) { if (!isset($this->attributes['AstVoicemailPassword'])) { $message = new htmlStatusMessage($this->messages['AstVoicemailPassword'][0][0], $this->messages['AstVoicemailPassword'][0][1]); - $message->colspan = 3; - $return->addElement($message, true); + $return->add($message, 12); } // mailbox $this->addSimpleInputTextField($return, 'AstVoicemailMailbox', _("Mailbox"), true); // account context $this->addSimpleInputTextField($return, 'AstContext', _("Account context"), true); - $return->addElement(new htmlSpacer(null, '10px'), true); + $return->addVerticalSpacer('1rem'); // full name $this->addSimpleInputTextField($return, 'AstVoicemailFullname', _("Full name")); @@ -259,14 +257,13 @@ class asteriskVoicemail extends baseModule implements passwordService { // voicemail context $this->addSimpleInputTextField($return, 'AstVoicemailContext', _("Voicemail context")); // remove button - $return->addElement(new htmlSpacer(null, '10px'), true); + $return->addVerticalSpacer('2rem'); $remButton = new htmlButton('remVoicemailObjectClass', _('Remove Asterisk voicemail extension')); - $remButton->colspan = 2; - $return->addElement($remButton); + $return->add($remButton, 12, 12, 12, 'text-center'); } else { // add button - $return->addElement(new htmlButton('addVoicemailObjectClass', _('Add Asterisk voicemail extension'))); + $return->add(new htmlButton('addVoicemailObjectClass', _('Add Asterisk voicemail extension')), 12); } return $return; } @@ -385,7 +382,9 @@ class asteriskVoicemail extends baseModule implements passwordService { $messages = array(); for ($i = 0; $i < sizeof($rawAccounts); $i++) { // add object class - if (!in_array("AsteriskVoiceMail", $partialAccounts[$i]['objectClass'])) $partialAccounts[$i]['objectClass'][] = "AsteriskVoiceMail"; + if (!in_array("AsteriskVoiceMail", $partialAccounts[$i]['objectClass'])) { + $partialAccounts[$i]['objectClass'][] = "AsteriskVoiceMail"; + } //add context if (empty($rawAccounts[$i][$ids['asteriskVoicemail_AstContext']])) { @@ -425,10 +424,8 @@ class asteriskVoicemail extends baseModule implements passwordService { * @return boolean true if LDAP operation can be done */ function module_complete() { - if (in_array('AsteriskVoiceMail', $this->attributes['objectClass'])) { - if(!isset($this->attributes['AstVoicemailPassword'][0]) || $this->attributes['AstVoicemailPassword'][0] == "" ) { - return false; - } + if (in_array('AsteriskVoiceMail', $this->attributes['objectClass']) && empty($this->attributes['AstVoicemailPassword'][0])) { + return false; } return true; }