responsive
This commit is contained in:
parent
fa259a2168
commit
47c55d76c5
|
@ -237,7 +237,7 @@ class courierMailAccount extends baseModule {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
public function display_html_attributes() {
|
public function display_html_attributes() {
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
if ($this->isExtensionEnabled()) {
|
if ($this->isExtensionEnabled()) {
|
||||||
if ($this->isUnixDisabled($this->getAccountContainer()->get_type()->getModules())) {
|
if ($this->isUnixDisabled($this->getAccountContainer()->get_type()->getModules())) {
|
||||||
// home directory
|
// home directory
|
||||||
|
@ -254,7 +254,7 @@ class courierMailAccount extends baseModule {
|
||||||
$unitIndex = floor(log(substr($this->attributes['quota'][0], 0, -1), 1000));
|
$unitIndex = floor(log(substr($this->attributes['quota'][0], 0, -1), 1000));
|
||||||
$value = round((float) (substr($this->attributes['quota'][0], 0, -1)) / pow(1000, $unitIndex), 2);
|
$value = round((float) (substr($this->attributes['quota'][0], 0, -1)) / pow(1000, $unitIndex), 2);
|
||||||
}
|
}
|
||||||
$return->addElement(new htmlOutputText(_('Mailbox quota')));
|
$return->addLabel(new htmlOutputText(_('Mailbox quota')));
|
||||||
$tempTable = new htmlTable();
|
$tempTable = new htmlTable();
|
||||||
$boxInput = new htmlInputField('quotaValue', $value);
|
$boxInput = new htmlInputField('quotaValue', $value);
|
||||||
$boxInput->setFieldSize(5);
|
$boxInput->setFieldSize(5);
|
||||||
|
@ -270,25 +270,24 @@ class courierMailAccount extends baseModule {
|
||||||
$unitSelect = new htmlSelect('quotaUnit', $units, $selected);
|
$unitSelect = new htmlSelect('quotaUnit', $units, $selected);
|
||||||
$unitSelect->setSortElements(false);
|
$unitSelect->setSortElements(false);
|
||||||
$tempTable->addElement($unitSelect);
|
$tempTable->addElement($unitSelect);
|
||||||
$return->addElement($tempTable);
|
$tempTable->addElement(new htmlHelpLink('quota'));
|
||||||
$return->addElement(new htmlHelpLink('quota'), true);
|
$return->addField($tempTable);
|
||||||
// check boxes for account access control
|
// check boxes for account access control
|
||||||
$disableimap = isset($this->attributes['disableimap'][0]) && ($this->attributes['disableimap'][0] != 0);
|
$disableimap = isset($this->attributes['disableimap'][0]) && ($this->attributes['disableimap'][0] != 0);
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('disableimap', $disableimap, _('Disable IMAP access'), 'disableimap'), true);
|
$return->add(new htmlResponsiveInputCheckbox('disableimap', $disableimap, _('Disable IMAP access'), 'disableimap'), 12);
|
||||||
$disablepop3 = isset($this->attributes['disablepop3'][0]) && ($this->attributes['disablepop3'][0] != 0);
|
$disablepop3 = isset($this->attributes['disablepop3'][0]) && ($this->attributes['disablepop3'][0] != 0);
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('disablepop3', $disablepop3, _('Disable POP3 access'), 'disablepop3'), true);
|
$return->add(new htmlResponsiveInputCheckbox('disablepop3', $disablepop3, _('Disable POP3 access'), 'disablepop3'), 12);
|
||||||
$disablewebmail = isset($this->attributes['disablewebmail'][0]) && ($this->attributes['disablewebmail'][0] != 0);
|
$disablewebmail = isset($this->attributes['disablewebmail'][0]) && ($this->attributes['disablewebmail'][0] != 0);
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('disablewebmail', $disablewebmail, _('Disable webmail access'), 'disablewebmail'), true);
|
$return->add(new htmlResponsiveInputCheckbox('disablewebmail', $disablewebmail, _('Disable webmail access'), 'disablewebmail'), 12);
|
||||||
$disableshared = isset($this->attributes['disableshared'][0]) && ($this->attributes['disableshared'][0] != 0);
|
$disableshared = isset($this->attributes['disableshared'][0]) && ($this->attributes['disableshared'][0] != 0);
|
||||||
$return->addElement(new htmlTableExtendedInputCheckbox('disableshared', $disableshared, _('Disable shared folder access'), 'disableshared'), true);
|
$return->add(new htmlResponsiveInputCheckbox('disableshared', $disableshared, _('Disable shared folder access'), 'disableshared'), 12);
|
||||||
// remove extension
|
// remove extension
|
||||||
$return->addElement(new htmlSpacer(null, '20px'), true);
|
$return->addVerticalSpacer('2rem');
|
||||||
$remButton = new htmlButton('remObjectClass', _('Remove Courier mail extension'));
|
$remButton = new htmlButton('remObjectClass', _('Remove Courier mail extension'));
|
||||||
$remButton->colspan = 3;
|
$return->add($remButton, 12, 12, 12, 'text-center');
|
||||||
$return->addElement($remButton);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$return->addElement(new htmlButton('addObjectClass', _('Add Courier mail extension')));
|
$return->add(new htmlButton('addObjectClass', _('Add Courier mail extension')), 12);
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* 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) 2017 Lars Althof
|
* Copyright (C) 2017 Lars Althof
|
||||||
* 2017 Roland Gruber
|
* 2017 - 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
|
||||||
|
@ -145,22 +145,16 @@ class courierMailAlias extends baseModule {
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
$mail = (!empty($this->attributes['mail'][0])) ? $this->attributes['mail'][0] : '';
|
$this->addSimpleInputTextField($return, 'mail', _('Email address'), true);
|
||||||
$boxInput = new htmlTableExtendedInputField (_('Email address'), 'mail', $mail, 'mail', true);
|
|
||||||
$boxInput->setFieldSize(40);
|
|
||||||
$boxInput->setFieldMaxLength(40);
|
|
||||||
$return->addElement($boxInput, true);
|
|
||||||
$this->addMultiValueInputTextField($return, 'maildrop', _('Recipient address'), true);
|
$this->addMultiValueInputTextField($return, 'maildrop', _('Recipient address'), true);
|
||||||
$return->addElement(new htmlOutputText(_('Mail source')));
|
$return->addVerticalSpacer('0.5rem');
|
||||||
$selectedSource = (!empty($this->attributes['mailsource'][0])) ? $this->attributes['mailsource'][0] : "-";
|
$selectedSource = (!empty($this->attributes['mailsource'][0])) ? $this->attributes['mailsource'][0] : "-";
|
||||||
$return->addElement(new htmlSelect('mailsource', array('-', 'esmtp', 'local'), array($selectedSource)));
|
$return->add(new htmlResponsiveSelect('mailsource', array('-', 'esmtp', 'local'), array($selectedSource), _('Mail source'), 'mailsource'), 12);
|
||||||
$return->addElement(new htmlHelpLink('mailsource'), true);
|
|
||||||
$description = (!empty($this->attributes['description'][0])) ? $this->attributes['description'][0] : '';
|
$description = (!empty($this->attributes['description'][0])) ? $this->attributes['description'][0] : '';
|
||||||
$boxInput = new htmlTableExtendedInputField(_('Description'), 'description', $description, 'description');
|
$boxInput = new htmlResponsiveInputField(_('Description'), 'description', $description, 'description');
|
||||||
$boxInput->setFieldSize(40);
|
|
||||||
$boxInput->setFieldMaxLength(100);
|
$boxInput->setFieldMaxLength(100);
|
||||||
$return->addElement($boxInput, true);
|
$return->add($boxInput, 12);
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue