responsive
This commit is contained in:
parent
fa3baf8f86
commit
6298546620
|
@ -1504,7 +1504,7 @@ abstract class baseModule {
|
|||
* There must be a help entry with the attribute name as ID.
|
||||
* A new line will also be added after this entry so multiple calls will show the fields one below the other.
|
||||
*
|
||||
* @param htmlTable $container parent container
|
||||
* @param htmlResponsiveRow $container parent container
|
||||
* @param String $attrName attribute name
|
||||
* @param String $label label name
|
||||
* @param array $options options for the selects
|
||||
|
@ -1526,9 +1526,8 @@ abstract class baseModule {
|
|||
$values = array_values($values);
|
||||
if ($label !== null) {
|
||||
$labelTextOut = new htmlOutputText($label);
|
||||
$labelTextOut->alignment = htmlElement::ALIGN_TOP;
|
||||
$labelTextOut->setMarkAsRequired($required);
|
||||
$container->addElement($labelTextOut);
|
||||
$container->addLabel($labelTextOut);
|
||||
}
|
||||
$subContainer = new htmlTable();
|
||||
$subContainer->alignment = htmlElement::ALIGN_TOP;
|
||||
|
@ -1544,13 +1543,11 @@ abstract class baseModule {
|
|||
}
|
||||
if ($i == 0) {
|
||||
$subContainer->addElement(new htmlButton('add_' . $attrName, 'add.png', true));
|
||||
$subContainer->addElement(new htmlHelpLink($attrName));
|
||||
}
|
||||
$subContainer->addNewLine();
|
||||
}
|
||||
$container->addElement($subContainer);
|
||||
$help = new htmlHelpLink($attrName);
|
||||
$help->alignment = htmlElement::ALIGN_TOP;
|
||||
$container->addElement($help, true);
|
||||
$container->addField($subContainer);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1291,12 +1291,14 @@ class accountContainer {
|
|||
// save button
|
||||
$saveButton = new htmlButton('accountContainerSaveAccount', _('Save'));
|
||||
$saveButton->setIconClass('saveButton');
|
||||
$saveButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||
$leftButtonGroup->addElement($saveButton);
|
||||
$leftButtonGroup->addElement(new htmlSpacer('1px', null));
|
||||
// reset button
|
||||
if (!$this->isNewAccount) {
|
||||
$resetButton = new htmlButton('accountContainerReset', _('Reset changes'));
|
||||
$resetButton->setIconClass('undoButton');
|
||||
$resetButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||
$leftButtonGroup->addElement($resetButton);
|
||||
}
|
||||
// set password button
|
||||
|
@ -1304,6 +1306,7 @@ class accountContainer {
|
|||
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
||||
$passwordButton = new htmlButton('accountContainerPassword', _('Set password'));
|
||||
$passwordButton->setIconClass('passwordButton');
|
||||
$passwordButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||
$passwordButton->setOnClick('passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
|
||||
. _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange&editKey=' . htmlspecialchars($this->base) . '\',\''
|
||||
. getSecurityTokenName() . '\',\'' . getSecurityTokenValue() . '\');');
|
||||
|
@ -1313,6 +1316,7 @@ class accountContainer {
|
|||
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
||||
$deleteButton = new htmlButton('accountContainerDelete', _('Delete'));
|
||||
$deleteButton->setIconClass('deleteButton');
|
||||
$deleteButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||
$leftButtonGroup->addElement($deleteButton);
|
||||
}
|
||||
$row->add($leftButtonGroup, 12, 7);
|
||||
|
|
|
@ -5,7 +5,7 @@ use \LAM\PDF\PDFTableRow;
|
|||
/*
|
||||
|
||||
This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||
Copyright (C) 2012 - 2018 Roland Gruber
|
||||
Copyright (C) 2012 - 2019 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
|
||||
|
@ -232,9 +232,9 @@ class puppetClient extends baseModule {
|
|||
if (isset($_POST['form_subpage_puppetClient_attributes_addObjectClass'])) {
|
||||
$this->attributes['objectClass'][] = 'puppetClient';
|
||||
}
|
||||
$return = new htmlTable();
|
||||
$return = new htmlResponsiveRow();
|
||||
if (!in_array('puppetClient', $this->attributes['objectClass'])) {
|
||||
$return->addElement(new htmlAccountPageButton('puppetClient', 'attributes', 'addObjectClass', _('Add Puppet extension')));
|
||||
$return->add(new htmlAccountPageButton('puppetClient', 'attributes', 'addObjectClass', _('Add Puppet extension')), 12);
|
||||
return $return;
|
||||
}
|
||||
$this->initCache();
|
||||
|
@ -251,8 +251,7 @@ class puppetClient extends baseModule {
|
|||
$environments[] = '';
|
||||
}
|
||||
$environmentLabel = new htmlOutputText(_('Environment'));
|
||||
$environmentLabel->alignment = htmlElement::ALIGN_TOP;
|
||||
$return->addElement($environmentLabel);
|
||||
$return->addLabel($environmentLabel);
|
||||
$environmentContainer = new htmlGroup();
|
||||
for ($i = 0; $i < sizeof($environments); $i++) {
|
||||
$environmentField = new htmlInputField('environment' . $i, $environments[$i]);
|
||||
|
@ -263,12 +262,10 @@ class puppetClient extends baseModule {
|
|||
}
|
||||
else {
|
||||
$environmentContainer->addElement(new htmlButton('addEnvironment', 'add.png', true));
|
||||
$environmentContainer->addElement(new htmlHelpLink('environment'));
|
||||
}
|
||||
}
|
||||
$return->addElement($environmentContainer);
|
||||
$environmentHelp = new htmlHelpLink('environment');
|
||||
$environmentHelp->alignment = htmlElement::ALIGN_TOP;
|
||||
$return->addElement($environmentHelp, true);
|
||||
$return->addField($environmentContainer);
|
||||
// parent node
|
||||
$possibleParentNodes = $this->getPossibleParentNodes();
|
||||
array_unshift($possibleParentNodes, '-');
|
||||
|
@ -276,7 +273,7 @@ class puppetClient extends baseModule {
|
|||
if (isset($this->attributes['parentnode'][0])) {
|
||||
$parentnode = $this->attributes['parentnode'][0];
|
||||
}
|
||||
$return->addElement(new htmlTableExtendedSelect('parentnode', $possibleParentNodes, array($parentnode), _('Parent node'), 'parentnode'), true);
|
||||
$return->add(new htmlResponsiveSelect('parentnode', $possibleParentNodes, array($parentnode), _('Parent node'), 'parentnode'), 12);
|
||||
// classes
|
||||
if (empty($this->moduleSettings['puppetClient_enforceClasses'][0])) {
|
||||
$this->addMultiValueInputTextField($return, 'puppetclass', _('Classes'), false, null, false, $this->classCache);
|
||||
|
@ -287,10 +284,9 @@ class puppetClient extends baseModule {
|
|||
// variables
|
||||
$this->addMultiValueInputTextField($return, 'puppetvar', _('Variables'), false, null, false, $this->variablesCache);
|
||||
|
||||
$return->addElement(new htmlSpacer(null, '10px'),true);
|
||||
$return->addVerticalSpacer('2rem');
|
||||
$remButton = new htmlAccountPageButton('puppetClient', 'attributes', 'remObjectClass', _('Remove Puppet extension'));
|
||||
$remButton->colspan = 4;
|
||||
$return->addElement($remButton);
|
||||
$return->add($remButton, 12, 12, 12, 'text-center');
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
/*
|
||||
$Id$
|
||||
|
||||
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||
Copyright (C) 2013 - 2015 Roland Gruber
|
||||
Copyright (C) 2013 - 2019 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
|
||||
|
@ -136,34 +135,37 @@ class pykotaBillingCode extends baseModule {
|
|||
* @return htmlElement HTML meta data
|
||||
*/
|
||||
function display_html_attributes() {
|
||||
$container = new htmlTable();
|
||||
$container = new htmlResponsiveRow();
|
||||
// pykotaBillingCode
|
||||
$this->addSimpleInputTextField($container, 'pykotaBillingCode', _('Billing code'), true);
|
||||
// balance
|
||||
$container->addElement(new htmlOutputText(_('Balance')));
|
||||
$container->addLabel(new htmlOutputText(_('Balance')));
|
||||
$pykotaBalance = '';
|
||||
if (isset($this->attributes['pykotaBalance'][0])) {
|
||||
$pykotaBalance = $this->attributes['pykotaBalance'][0];
|
||||
}
|
||||
$container->addElement(new htmlOutputText($pykotaBalance));
|
||||
$container->addElement(new htmlHelpLink('pykotaBalance'), true);
|
||||
$balanceGroup = new htmlGroup();
|
||||
$balanceGroup->addElement(new htmlOutputText($pykotaBalance));
|
||||
$balanceGroup->addElement(new htmlHelpLink('pykotaBalance'));
|
||||
$container->addField($balanceGroup);
|
||||
// page count
|
||||
$container->addElement(new htmlOutputText(_('Page count')));
|
||||
$container->addLabel(new htmlOutputText(_('Page count')));
|
||||
$pykotaPageCounter = '';
|
||||
if (isset($this->attributes['pykotaPageCounter'][0])) {
|
||||
$pykotaPageCounter = $this->attributes['pykotaPageCounter'][0];
|
||||
}
|
||||
$container->addElement(new htmlOutputText($pykotaPageCounter));
|
||||
$container->addElement(new htmlHelpLink('pykotaPageCounter'), true);
|
||||
$pageCounterGroup = new htmlGroup();
|
||||
$pageCounterGroup->addElement(new htmlOutputText($pykotaPageCounter));
|
||||
$pageCounterGroup->addElement(new htmlHelpLink('pykotaPageCounter'));
|
||||
$container->addField($pageCounterGroup);
|
||||
// description
|
||||
$this->addSimpleInputTextField($container, 'description', _('Description'), false, null, true);
|
||||
// reset
|
||||
$container->addElement(new htmlSpacer(null, '20px'), true);
|
||||
$container->addElement(new htmlOutputText(''));
|
||||
$container->addElement(new htmlButton('resetCounters', _('Reset')));
|
||||
$container->addElement(new htmlHelpLink('reset'), true);
|
||||
// same width
|
||||
$container->addElement(new htmlEqualWidth(array('pykotaBillingCode', 'description')));
|
||||
$container->addVerticalSpacer('2rem');
|
||||
$resetGroup = new htmlGroup();
|
||||
$resetGroup->addElement(new htmlButton('resetCounters', _('Reset')));
|
||||
$resetGroup->addElement(new htmlHelpLink('reset'));
|
||||
$container->add($resetGroup, 12, 12, 12, 'text-center');
|
||||
return $container;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue