From 8e083898e2d6cf5fcbcce2381965fb4325945b0f Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 19 May 2018 09:48:12 +0200 Subject: [PATCH] responsive tools --- lam/lib/modules/hostObject.inc | 7 +++---- lam/lib/modules/imapAccess.inc | 4 ++-- lam/lib/modules/inetLocalMailRecipient.inc | 10 +++++----- lam/lib/modules/kolabGroup.inc | 7 +++---- lam/lib/modules/kolabSharedFolder.inc | 7 +++---- lam/lib/modules/kolabUser.inc | 9 ++++----- lam/lib/modules/ldapPublicKey.inc | 4 ++-- lam/lib/modules/posixGroup.inc | 4 ++-- lam/lib/modules/puppetClient.inc | 17 ++++++++--------- lam/lib/modules/pykotaGroup.inc | 11 +++++------ lam/lib/modules/pykotaPrinter.inc | 7 +++---- lam/lib/modules/pykotaUser.inc | 19 +++++++++---------- 12 files changed, 49 insertions(+), 57 deletions(-) diff --git a/lam/lib/modules/hostObject.inc b/lam/lib/modules/hostObject.inc index 58d27cdb..e99fe470 100644 --- a/lam/lib/modules/hostObject.inc +++ b/lam/lib/modules/hostObject.inc @@ -1,9 +1,8 @@ _('Host list') ); - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('hostObject_addExt', false, _('Automatically add this extension'), 'autoAdd')); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('hostObject_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); $return['profile_options'] = $profileContainer; return $return; } diff --git a/lam/lib/modules/imapAccess.inc b/lam/lib/modules/imapAccess.inc index 1ff7f3ad..893636c6 100644 --- a/lam/lib/modules/imapAccess.inc +++ b/lam/lib/modules/imapAccess.inc @@ -136,8 +136,8 @@ class imapAccess extends baseModule { 'required_message' => $this->messages['config'][1], 'error_message' => $this->messages['config'][1]); // profile options - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Quota'), 'ImapAccess_QuotaLimit', null, 'ImapUserQuotaLimit'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputField(_('Quota'), 'ImapAccess_QuotaLimit', null, 'ImapUserQuotaLimit'), 12); $return['profile_options'] = $profileContainer; $return['profile_checks']['ImapAccess_QuotaLimit'] = array( 'type' => 'ext_preg', diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index 704ce4fc..890c3377 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -91,11 +91,11 @@ class inetLocalMailRecipient extends baseModule { "Text" => _("This is the mail server for the user.") )); // profile options - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('inetLocalMailRecipient_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Routing address'), 'inetLocalMailRecipient_mailRoutingAddress', null, 'mailRoutingAddress'), true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Local address'), 'inetLocalMailRecipient_mailLocalAddress', null, 'localAdr'), true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Mail server'), 'inetLocalMailRecipient_host', null, 'mailHost'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('inetLocalMailRecipient_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); + $profileContainer->add(new htmlResponsiveInputField(_('Routing address'), 'inetLocalMailRecipient_mailRoutingAddress', null, 'mailRoutingAddress'), 12); + $profileContainer->add(new htmlResponsiveInputField(_('Local address'), 'inetLocalMailRecipient_mailLocalAddress', null, 'localAdr'), 12); + $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'inetLocalMailRecipient_host', null, 'mailHost'), 12); $return['profile_options'] = $profileContainer; // profile checks $return['profile_checks']['inetLocalMailRecipient_host'] = array( diff --git a/lam/lib/modules/kolabGroup.inc b/lam/lib/modules/kolabGroup.inc index a3d1f550..6dfbe908 100644 --- a/lam/lib/modules/kolabGroup.inc +++ b/lam/lib/modules/kolabGroup.inc @@ -1,10 +1,9 @@ addElement(new htmlTableExtendedInputCheckbox('kolabGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('kolabGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); $return['profile_options'] = $profileContainer; // upload fields $return['upload_columns'] = array( diff --git a/lam/lib/modules/kolabSharedFolder.inc b/lam/lib/modules/kolabSharedFolder.inc index eadf3b8c..36c450cf 100644 --- a/lam/lib/modules/kolabSharedFolder.inc +++ b/lam/lib/modules/kolabSharedFolder.inc @@ -1,9 +1,8 @@ addElement(new htmlTableExtendedInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), 12); $return['profile_options'] = $profileContainer; // profile checks $return['profile_checks']['kolab_mailHost'] = array( diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index e3dd0460..d9cf748d 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -3,10 +3,9 @@ use \LAM\PDF\PDFTable; use \LAM\PDF\PDFTableCell; use \LAM\PDF\PDFTableRow; /* -$Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2017 Roland Gruber + Copyright (C) 2004 - 2018 Roland Gruber 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 @@ -97,9 +96,9 @@ class kolabUser extends baseModule { $return['attributes'][] = 'mailQuota'; } // profile options - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Mailbox quota'), 'kolab_mailQuota', null, 'mailQuota'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), 12); + $profileContainer->add(new htmlResponsiveInputField(_('Mailbox quota'), 'kolab_mailQuota', null, 'mailQuota'), 12); $return['profile_options'] = $profileContainer; // profile checks $return['profile_checks']['kolab_mailHost'] = array( diff --git a/lam/lib/modules/ldapPublicKey.inc b/lam/lib/modules/ldapPublicKey.inc index b1c611a1..1f48fae4 100644 --- a/lam/lib/modules/ldapPublicKey.inc +++ b/lam/lib/modules/ldapPublicKey.inc @@ -99,8 +99,8 @@ class ldapPublicKey extends baseModule { ), ); // profile options - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('ldapPublicKey_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('ldapPublicKey_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); $return['profile_options'] = $profileContainer; // upload fields $return['upload_columns'] = array( diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 3f212ad3..c8eb9748 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -432,8 +432,8 @@ class posixGroup extends baseModule implements passwordService { $return['attributes'] = array('gidNumber', $this->passwordAttrName, 'memberUid'); // profile options if (!$this->autoAddObjectClasses) { - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('posixGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('posixGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); $return['profile_options'] = $profileContainer; } // available PDF fields diff --git a/lam/lib/modules/puppetClient.inc b/lam/lib/modules/puppetClient.inc index e20f4985..3ea7700f 100644 --- a/lam/lib/modules/puppetClient.inc +++ b/lam/lib/modules/puppetClient.inc @@ -3,10 +3,9 @@ use \LAM\PDF\PDFTable; use \LAM\PDF\PDFTableCell; use \LAM\PDF\PDFTableRow; /* -$Id$ This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2012 - 2017 Roland Gruber + Copyright (C) 2012 - 2018 Roland Gruber 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 @@ -169,17 +168,17 @@ class puppetClient extends baseModule { 'puppetvar' => _('Variables'), ); // profile options - $profileContainer = new htmlTable(); - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('puppetClient_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); - $profileEnvironment = new htmlTableExtendedInputField(_('Environment'), 'puppetClient_environment', null, 'environment'); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputCheckbox('puppetClient_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); + $profileEnvironment = new htmlResponsiveInputField(_('Environment'), 'puppetClient_environment', null, 'environment'); $autocompleteEnvironment = array(); if (isset($this->moduleSettings['puppetClient_environments'])) { $autocompleteEnvironment = $this->moduleSettings['puppetClient_environments']; } $profileEnvironment->enableAutocompletion($autocompleteEnvironment); - $profileContainer->addElement($profileEnvironment, true); - $profileContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_puppetclass', '', 60, 5, _('Classes'), 'puppetclass'), true); - $profileContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_puppetvar', '', 60, 5, _('Variables'), 'puppetvar'), true); + $profileContainer->add($profileEnvironment, 12); + $profileContainer->add(new htmlResponsiveInputTextarea('puppetClient_puppetclass', '', 60, 5, _('Classes'), 'puppetclass'), 12); + $profileContainer->add(new htmlResponsiveInputTextarea('puppetClient_puppetvar', '', 60, 5, _('Variables'), 'puppetvar'), 12); $return['profile_options'] = $profileContainer; // profile checks $return['profile_checks']['puppetClient_environment'] = array('type' => 'ext_preg', 'regex' => 'ascii', 'error_message' => $this->messages['environment'][0]); @@ -433,7 +432,7 @@ class puppetClient extends baseModule { array_unshift($possibleParentNodes, '-'); $possibleParentNodes = array_values($possibleParentNodes); if (sizeof($possibleParentNodes) > 0) { - $return->addElement(new htmlTableExtendedSelect('puppetClient_parentnode', $possibleParentNodes, array(), _('Parent node'), 'parentnode'), true); + $return->add(new htmlResponsiveSelect('puppetClient_parentnode', $possibleParentNodes, array(), _('Parent node'), 'parentnode'), 12); } return $return; } diff --git a/lam/lib/modules/pykotaGroup.inc b/lam/lib/modules/pykotaGroup.inc index 8da87e50..321f679d 100644 --- a/lam/lib/modules/pykotaGroup.inc +++ b/lam/lib/modules/pykotaGroup.inc @@ -1,10 +1,9 @@ limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); + $profileContainer = new htmlResponsiveRow(); + $pykotaLimitByProfileOption = new htmlResponsiveSelect('pykotaGroup_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); $pykotaLimitByProfileOption->setHasDescriptiveElements(true); $pykotaLimitByProfileOption->setSortElements(false); - $profileContainer->addElement($pykotaLimitByProfileOption, true); + $profileContainer->add($pykotaLimitByProfileOption, 12); if (!$this->isStructural()) { - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('pykotaGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); + $profileContainer->add(new htmlResponsiveInputCheckbox('pykotaGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); } $return['profile_options'] = $profileContainer; $return['profile_mappings']['pykotaGroup_pykotaLimitBy'] = 'pykotaLimitBy'; diff --git a/lam/lib/modules/pykotaPrinter.inc b/lam/lib/modules/pykotaPrinter.inc index d0104a27..2fcec9b9 100644 --- a/lam/lib/modules/pykotaPrinter.inc +++ b/lam/lib/modules/pykotaPrinter.inc @@ -1,9 +1,8 @@ addElement(new htmlTableExtendedInputField(_('Maximum job size'), 'pykotaPrinter_pykotaMaxJobSize', '', 'pykotaMaxJobSize'), true); + $profileContainer = new htmlResponsiveRow(); + $profileContainer->add(new htmlResponsiveInputField(_('Maximum job size'), 'pykotaPrinter_pykotaMaxJobSize', '', 'pykotaMaxJobSize'), 12); $return['profile_options'] = $profileContainer; $return['profile_mappings']['pykotaPrinter_pykotaMaxJobSize'] = 'pykotaMaxJobSize'; $return['profile_checks']['pykotaPrinter_pykotaMaxJobSize'] = array( diff --git a/lam/lib/modules/pykotaUser.inc b/lam/lib/modules/pykotaUser.inc index b97863e9..c9e984c3 100644 --- a/lam/lib/modules/pykotaUser.inc +++ b/lam/lib/modules/pykotaUser.inc @@ -4,10 +4,9 @@ use \LAM\PDF\PDFTableCell; use \LAM\PDF\PDFTableRow; use \LAM\TYPES\TypeManager; /* -$Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2017 Roland Gruber + Copyright (C) 2013 - 2018 Roland Gruber 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 @@ -166,16 +165,16 @@ class pykotaUser extends baseModule { ), ); // profile options - $profileContainer = new htmlTable(); - $pykotaLimitByProfileOption = new htmlTableExtendedSelect('pykotaUser_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); + $profileContainer = new htmlResponsiveRow(); + if (!$this->isStructural()) { + $profileContainer->add(new htmlResponsiveInputCheckbox('pykotaUser_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12); + } + $pykotaLimitByProfileOption = new htmlResponsiveSelect('pykotaUser_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); $pykotaLimitByProfileOption->setHasDescriptiveElements(true); $pykotaLimitByProfileOption->setSortElements(false); - $profileContainer->addElement($pykotaLimitByProfileOption, true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Balance'), 'pykotaUser_pykotaBalance', '', 'pykotaBalance'), true); - $profileContainer->addElement(new htmlTableExtendedInputField(_('Overcharge factor'), 'pykotaUser_pykotaOverCharge', '', 'pykotaOverCharge'), true); - if (!$this->isStructural()) { - $profileContainer->addElement(new htmlTableExtendedInputCheckbox('pykotaUser_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); - } + $profileContainer->add($pykotaLimitByProfileOption, 12); + $profileContainer->add(new htmlResponsiveInputField(_('Balance'), 'pykotaUser_pykotaBalance', '', 'pykotaBalance'), 12); + $profileContainer->add(new htmlResponsiveInputField(_('Overcharge factor'), 'pykotaUser_pykotaOverCharge', '', 'pykotaOverCharge'), 12); $return['profile_options'] = $profileContainer; $return['profile_mappings']['pykotaUser_pykotaLimitBy'] = 'pykotaLimitBy'; $return['profile_mappings']['pykotaUser_pykotaOverCharge'] = 'pykotaOverCharge';