responsive tools

This commit is contained in:
Roland Gruber 2018-05-19 14:00:53 +02:00
parent 179f08ddb2
commit daefa6cdb8
2 changed files with 15 additions and 35 deletions

View File

@ -3,7 +3,6 @@ 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) 2003 - 2006 Tilo Lutz Copyright (C) 2003 - 2006 Tilo Lutz
@ -531,7 +530,7 @@ class quota extends baseModule {
* {@inheritDoc} * {@inheritDoc}
*/ */
function get_profileOptions($typeId) { function get_profileOptions($typeId) {
$return = new htmlTable(); $return = new htmlResponsiveRow();
$optionsAvailable = false; $optionsAvailable = false;
// get list of lamdaemon servers // get list of lamdaemon servers
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers()); $lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
@ -568,44 +567,26 @@ class quota extends baseModule {
$dirs = array_values($dirs); $dirs = array_values($dirs);
if (sizeof($dirs) < 1) continue; // stop if no quota directories were found if (sizeof($dirs) < 1) continue; // stop if no quota directories were found
$optionsAvailable = true; $optionsAvailable = true;
$return->addElement(new htmlSubTitle($description), true); $return->add(new htmlSubTitle($description), 12);
$return->addElement(new htmlOutputText('&nbsp;' . _('Mountpoint') . '&nbsp;', false));
$return->addElement(new htmlOutputText('&nbsp;' . _('Soft block limit') . '&nbsp;', false));
$return->addElement(new htmlOutputText('&nbsp;' . _('Hard block limit') . '&nbsp;', false));
$return->addElement(new htmlOutputText('&nbsp;' . _('Soft inode limit') . '&nbsp;', false));
$return->addElement(new htmlOutputText('&nbsp;' . _('Hard inode limit') . '&nbsp;', false));
$return->addNewLine();
$return->addElement(new htmlHelpLink('Mountpoint'));
$return->addElement(new htmlHelpLink('SoftBlockLimit'));
$return->addElement(new htmlHelpLink('HardBlockLimit'));
$return->addElement(new htmlHelpLink('SoftInodeLimit'));
$return->addElement(new htmlHelpLink('HardInodeLimit'));
$return->addNewLine();
for ($i = 0; $i < sizeof($dirs); $i++) { for ($i = 0; $i < sizeof($dirs); $i++) {
$return->addElement(new htmlOutputText($dirs[$i])); $return->add(new htmlOutputText($dirs[$i]), 12);
$sbLimit = new htmlInputField("quota_softblock_" . $id . "_" . $dirs[$i]); $sbLimit = new htmlResponsiveInputField(_('Soft block limit'), "quota_softblock_" . $id . "_" . $dirs[$i], null, 'SoftBlockLimit');
$sbLimit->setFieldSize(12);
$sbLimit->setFieldMaxLength(20); $sbLimit->setFieldMaxLength(20);
$return->addElement($sbLimit); $return->add($sbLimit, 12);
$hbLimit = new htmlInputField("quota_hardblock_" . $id . "_" . $dirs[$i]); $hbLimit = new htmlResponsiveInputField(_('Hard block limit'), "quota_hardblock_" . $id . "_" . $dirs[$i], null, 'HardBlockLimit');
$hbLimit->setFieldSize(12);
$hbLimit->setFieldMaxLength(20); $hbLimit->setFieldMaxLength(20);
$return->addElement($hbLimit); $return->add($hbLimit, 12);
$siLimit = new htmlInputField("quota_softinode_" . $id . "_" . $dirs[$i]); $siLimit = new htmlResponsiveInputField(_('Soft inode limit'), "quota_softinode_" . $id . "_" . $dirs[$i], null, 'SoftInodeLimit');
$siLimit->setFieldSize(12);
$siLimit->setFieldMaxLength(20); $siLimit->setFieldMaxLength(20);
$return->addElement($siLimit); $return->add($siLimit, 12);
$hiLimit = new htmlInputField("quota_hardinode_" . $id . "_" . $dirs[$i]); $hiLimit = new htmlResponsiveInputField(_('Hard inode limit'), "quota_hardinode_" . $id . "_" . $dirs[$i], null, 'HardInodeLimit');
$hiLimit->setFieldSize(12);
$hiLimit->setFieldMaxLength(20); $hiLimit->setFieldMaxLength(20);
$return->addElement($hiLimit); $return->add($hiLimit, 12);
$return->addNewLine();
} }
} }
} }
catch (LAMException $e) { catch (LAMException $e) {
$return->addElement(new htmlStatusMessage('WARN', $e->getTitle())); $return->add(new htmlStatusMessage('WARN', $e->getTitle()), 12);
return $return; return $return;
} }
if (!$optionsAvailable) { if (!$optionsAvailable) {

View File

@ -1,11 +1,10 @@
<?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) 2003 - 2006 Tilo Lutz Copyright (C) 2003 - 2006 Tilo Lutz
2007 - 2017 Roland Gruber 2007 - 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
@ -539,7 +538,7 @@ class sambaGroupMapping extends baseModule {
* {@inheritDoc} * {@inheritDoc}
*/ */
function get_profileOptions($typeId) { function get_profileOptions($typeId) {
$return = new htmlTable(); $return = new htmlResponsiveRow();
// get list of domains // get list of domains
$sambaDomains = $this->getDomains(); $sambaDomains = $this->getDomains();
$sambaDomainNames = array(); $sambaDomainNames = array();
@ -548,7 +547,7 @@ class sambaGroupMapping extends baseModule {
$sambaDomainNames[] = $sambaDomains[$i]->name; $sambaDomainNames[] = $sambaDomains[$i]->name;
} }
// domain // domain
$return->addElement(new htmlTableExtendedSelect('sambaGroupMapping_sambaDomainName', $sambaDomainNames, null, _('Domain'), 'sambaDomainName')); $return->add(new htmlResponsiveSelect('sambaGroupMapping_sambaDomainName', $sambaDomainNames, null, _('Domain'), 'sambaDomainName'), 12);
return $return; return $return;
} }