responsive tools

This commit is contained in:
Roland Gruber 2018-05-19 09:48:12 +02:00
parent 88a2bb9479
commit 8e083898e2
12 changed files with 49 additions and 57 deletions

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$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) 2011 - 2015 Roland Gruber Copyright (C) 2011 - 2018 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
@ -97,8 +96,8 @@ class hostObject extends baseModule {
$return['PDF_fields'] = array( $return['PDF_fields'] = array(
'hosts' => _('Host list') 'hosts' => _('Host list')
); );
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('hostObject_addExt', false, _('Automatically add this extension'), 'autoAdd')); $profileContainer->add(new htmlResponsiveInputCheckbox('hostObject_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
return $return; return $return;
} }

View File

@ -136,8 +136,8 @@ class imapAccess extends baseModule {
'required_message' => $this->messages['config'][1], 'required_message' => $this->messages['config'][1],
'error_message' => $this->messages['config'][1]); 'error_message' => $this->messages['config'][1]);
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputField(_('Quota'), 'ImapAccess_QuotaLimit', null, 'ImapUserQuotaLimit'), true); $profileContainer->add(new htmlResponsiveInputField(_('Quota'), 'ImapAccess_QuotaLimit', null, 'ImapUserQuotaLimit'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
$return['profile_checks']['ImapAccess_QuotaLimit'] = array( $return['profile_checks']['ImapAccess_QuotaLimit'] = array(
'type' => 'ext_preg', 'type' => 'ext_preg',

View File

@ -91,11 +91,11 @@ class inetLocalMailRecipient extends baseModule {
"Text" => _("This is the mail server for the user.") "Text" => _("This is the mail server for the user.")
)); ));
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('inetLocalMailRecipient_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); $profileContainer->add(new htmlResponsiveInputCheckbox('inetLocalMailRecipient_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Routing address'), 'inetLocalMailRecipient_mailRoutingAddress', null, 'mailRoutingAddress'), true); $profileContainer->add(new htmlResponsiveInputField(_('Routing address'), 'inetLocalMailRecipient_mailRoutingAddress', null, 'mailRoutingAddress'), 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Local address'), 'inetLocalMailRecipient_mailLocalAddress', null, 'localAdr'), true); $profileContainer->add(new htmlResponsiveInputField(_('Local address'), 'inetLocalMailRecipient_mailLocalAddress', null, 'localAdr'), 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Mail server'), 'inetLocalMailRecipient_host', null, 'mailHost'), true); $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'inetLocalMailRecipient_host', null, 'mailHost'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// profile checks // profile checks
$return['profile_checks']['inetLocalMailRecipient_host'] = array( $return['profile_checks']['inetLocalMailRecipient_host'] = array(

View File

@ -1,10 +1,9 @@
<?php <?php
use LAM\TYPES\TypeManager; use LAM\TYPES\TypeManager;
/* /*
$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) 2013 - 2017 Roland Gruber Copyright (C) 2013 - 2018 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
@ -121,8 +120,8 @@ class kolabGroup extends baseModule {
), ),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('kolabGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); $profileContainer->add(new htmlResponsiveInputCheckbox('kolabGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// upload fields // upload fields
$return['upload_columns'] = array( $return['upload_columns'] = array(

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$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) 2013 - 2015 Roland Gruber Copyright (C) 2013 - 2018 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
@ -93,8 +92,8 @@ class kolabSharedFolder extends baseModule {
$return['attributes'] = array('cn', 'kolabAllowSMTPRecipient', 'kolabAllowSMTPSender', 'kolabDeleteflag', 'acl', $return['attributes'] = array('cn', 'kolabAllowSMTPRecipient', 'kolabAllowSMTPSender', 'kolabDeleteflag', 'acl',
'alias', 'kolabDelegate', 'kolabFolderType', 'kolabTargetFolder', 'mailHost', 'mail'); 'alias', 'kolabDelegate', 'kolabFolderType', 'kolabTargetFolder', 'mailHost', 'mail');
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), true); $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// profile checks // profile checks
$return['profile_checks']['kolab_mailHost'] = array( $return['profile_checks']['kolab_mailHost'] = array(

View File

@ -3,10 +3,9 @@ use \LAM\PDF\PDFTable;
use \LAM\PDF\PDFTableCell; use \LAM\PDF\PDFTableCell;
use \LAM\PDF\PDFTableRow; use \LAM\PDF\PDFTableRow;
/* /*
$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) 2004 - 2017 Roland Gruber Copyright (C) 2004 - 2018 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
@ -97,9 +96,9 @@ class kolabUser extends baseModule {
$return['attributes'][] = 'mailQuota'; $return['attributes'][] = 'mailQuota';
} }
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), true); $profileContainer->add(new htmlResponsiveInputField(_('Mail server'), 'kolab_mailHost', null, 'mailHost'), 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Mailbox quota'), 'kolab_mailQuota', null, 'mailQuota'), true); $profileContainer->add(new htmlResponsiveInputField(_('Mailbox quota'), 'kolab_mailQuota', null, 'mailQuota'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// profile checks // profile checks
$return['profile_checks']['kolab_mailHost'] = array( $return['profile_checks']['kolab_mailHost'] = array(

View File

@ -99,8 +99,8 @@ class ldapPublicKey extends baseModule {
), ),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('ldapPublicKey_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); $profileContainer->add(new htmlResponsiveInputCheckbox('ldapPublicKey_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// upload fields // upload fields
$return['upload_columns'] = array( $return['upload_columns'] = array(

View File

@ -432,8 +432,8 @@ class posixGroup extends baseModule implements passwordService {
$return['attributes'] = array('gidNumber', $this->passwordAttrName, 'memberUid'); $return['attributes'] = array('gidNumber', $this->passwordAttrName, 'memberUid');
// profile options // profile options
if (!$this->autoAddObjectClasses) { if (!$this->autoAddObjectClasses) {
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('posixGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); $profileContainer->add(new htmlResponsiveInputCheckbox('posixGroup_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
} }
// available PDF fields // available PDF fields

View File

@ -3,10 +3,9 @@ use \LAM\PDF\PDFTable;
use \LAM\PDF\PDFTableCell; use \LAM\PDF\PDFTableCell;
use \LAM\PDF\PDFTableRow; use \LAM\PDF\PDFTableRow;
/* /*
$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) 2012 - 2017 Roland Gruber Copyright (C) 2012 - 2018 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
@ -169,17 +168,17 @@ class puppetClient extends baseModule {
'puppetvar' => _('Variables'), 'puppetvar' => _('Variables'),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('puppetClient_addExt', false, _('Automatically add this extension'), 'autoAdd'), true); $profileContainer->add(new htmlResponsiveInputCheckbox('puppetClient_addExt', false, _('Automatically add this extension'), 'autoAdd'), 12);
$profileEnvironment = new htmlTableExtendedInputField(_('Environment'), 'puppetClient_environment', null, 'environment'); $profileEnvironment = new htmlResponsiveInputField(_('Environment'), 'puppetClient_environment', null, 'environment');
$autocompleteEnvironment = array(); $autocompleteEnvironment = array();
if (isset($this->moduleSettings['puppetClient_environments'])) { if (isset($this->moduleSettings['puppetClient_environments'])) {
$autocompleteEnvironment = $this->moduleSettings['puppetClient_environments']; $autocompleteEnvironment = $this->moduleSettings['puppetClient_environments'];
} }
$profileEnvironment->enableAutocompletion($autocompleteEnvironment); $profileEnvironment->enableAutocompletion($autocompleteEnvironment);
$profileContainer->addElement($profileEnvironment, true); $profileContainer->add($profileEnvironment, 12);
$profileContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_puppetclass', '', 60, 5, _('Classes'), 'puppetclass'), true); $profileContainer->add(new htmlResponsiveInputTextarea('puppetClient_puppetclass', '', 60, 5, _('Classes'), 'puppetclass'), 12);
$profileContainer->addElement(new htmlTableExtendedInputTextarea('puppetClient_puppetvar', '', 60, 5, _('Variables'), 'puppetvar'), true); $profileContainer->add(new htmlResponsiveInputTextarea('puppetClient_puppetvar', '', 60, 5, _('Variables'), 'puppetvar'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
// profile checks // profile checks
$return['profile_checks']['puppetClient_environment'] = array('type' => 'ext_preg', 'regex' => 'ascii', 'error_message' => $this->messages['environment'][0]); $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, '-'); array_unshift($possibleParentNodes, '-');
$possibleParentNodes = array_values($possibleParentNodes); $possibleParentNodes = array_values($possibleParentNodes);
if (sizeof($possibleParentNodes) > 0) { 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; return $return;
} }

View File

@ -1,10 +1,9 @@
<?php <?php
use \LAM\TYPES\TypeManager; use \LAM\TYPES\TypeManager;
/* /*
$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) 2013 - 2017 Roland Gruber Copyright (C) 2013 - 2018 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
@ -126,13 +125,13 @@ class pykotaGroup extends baseModule {
), ),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$pykotaLimitByProfileOption = new htmlTableExtendedSelect('pykotaGroup_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); $pykotaLimitByProfileOption = new htmlResponsiveSelect('pykotaGroup_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy');
$pykotaLimitByProfileOption->setHasDescriptiveElements(true); $pykotaLimitByProfileOption->setHasDescriptiveElements(true);
$pykotaLimitByProfileOption->setSortElements(false); $pykotaLimitByProfileOption->setSortElements(false);
$profileContainer->addElement($pykotaLimitByProfileOption, true); $profileContainer->add($pykotaLimitByProfileOption, 12);
if (!$this->isStructural()) { 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_options'] = $profileContainer;
$return['profile_mappings']['pykotaGroup_pykotaLimitBy'] = 'pykotaLimitBy'; $return['profile_mappings']['pykotaGroup_pykotaLimitBy'] = 'pykotaLimitBy';

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$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) 2013 - 2015 Roland Gruber Copyright (C) 2013 - 2018 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
@ -131,8 +130,8 @@ class pykotaPrinter extends baseModule {
), ),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$profileContainer->addElement(new htmlTableExtendedInputField(_('Maximum job size'), 'pykotaPrinter_pykotaMaxJobSize', '', 'pykotaMaxJobSize'), true); $profileContainer->add(new htmlResponsiveInputField(_('Maximum job size'), 'pykotaPrinter_pykotaMaxJobSize', '', 'pykotaMaxJobSize'), 12);
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
$return['profile_mappings']['pykotaPrinter_pykotaMaxJobSize'] = 'pykotaMaxJobSize'; $return['profile_mappings']['pykotaPrinter_pykotaMaxJobSize'] = 'pykotaMaxJobSize';
$return['profile_checks']['pykotaPrinter_pykotaMaxJobSize'] = array( $return['profile_checks']['pykotaPrinter_pykotaMaxJobSize'] = array(

View File

@ -4,10 +4,9 @@ use \LAM\PDF\PDFTableCell;
use \LAM\PDF\PDFTableRow; use \LAM\PDF\PDFTableRow;
use \LAM\TYPES\TypeManager; use \LAM\TYPES\TypeManager;
/* /*
$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) 2013 - 2017 Roland Gruber Copyright (C) 2013 - 2018 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
@ -166,16 +165,16 @@ class pykotaUser extends baseModule {
), ),
); );
// profile options // profile options
$profileContainer = new htmlTable(); $profileContainer = new htmlResponsiveRow();
$pykotaLimitByProfileOption = new htmlTableExtendedSelect('pykotaUser_pykotaLimitBy', $this->limitOptions, array(), _('Limit type'), 'pykotaLimitBy'); 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->setHasDescriptiveElements(true);
$pykotaLimitByProfileOption->setSortElements(false); $pykotaLimitByProfileOption->setSortElements(false);
$profileContainer->addElement($pykotaLimitByProfileOption, true); $profileContainer->add($pykotaLimitByProfileOption, 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Balance'), 'pykotaUser_pykotaBalance', '', 'pykotaBalance'), true); $profileContainer->add(new htmlResponsiveInputField(_('Balance'), 'pykotaUser_pykotaBalance', '', 'pykotaBalance'), 12);
$profileContainer->addElement(new htmlTableExtendedInputField(_('Overcharge factor'), 'pykotaUser_pykotaOverCharge', '', 'pykotaOverCharge'), true); $profileContainer->add(new htmlResponsiveInputField(_('Overcharge factor'), 'pykotaUser_pykotaOverCharge', '', 'pykotaOverCharge'), 12);
if (!$this->isStructural()) {
$profileContainer->addElement(new htmlTableExtendedInputCheckbox('pykotaUser_addExt', false, _('Automatically add this extension'), 'autoAdd'), true);
}
$return['profile_options'] = $profileContainer; $return['profile_options'] = $profileContainer;
$return['profile_mappings']['pykotaUser_pykotaLimitBy'] = 'pykotaLimitBy'; $return['profile_mappings']['pykotaUser_pykotaLimitBy'] = 'pykotaLimitBy';
$return['profile_mappings']['pykotaUser_pykotaOverCharge'] = 'pykotaOverCharge'; $return['profile_mappings']['pykotaUser_pykotaOverCharge'] = 'pykotaOverCharge';