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.
|
* 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.
|
* 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 $attrName attribute name
|
||||||
* @param String $label label name
|
* @param String $label label name
|
||||||
* @param array $options options for the selects
|
* @param array $options options for the selects
|
||||||
|
@ -1526,9 +1526,8 @@ abstract class baseModule {
|
||||||
$values = array_values($values);
|
$values = array_values($values);
|
||||||
if ($label !== null) {
|
if ($label !== null) {
|
||||||
$labelTextOut = new htmlOutputText($label);
|
$labelTextOut = new htmlOutputText($label);
|
||||||
$labelTextOut->alignment = htmlElement::ALIGN_TOP;
|
|
||||||
$labelTextOut->setMarkAsRequired($required);
|
$labelTextOut->setMarkAsRequired($required);
|
||||||
$container->addElement($labelTextOut);
|
$container->addLabel($labelTextOut);
|
||||||
}
|
}
|
||||||
$subContainer = new htmlTable();
|
$subContainer = new htmlTable();
|
||||||
$subContainer->alignment = htmlElement::ALIGN_TOP;
|
$subContainer->alignment = htmlElement::ALIGN_TOP;
|
||||||
|
@ -1544,13 +1543,11 @@ abstract class baseModule {
|
||||||
}
|
}
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
$subContainer->addElement(new htmlButton('add_' . $attrName, 'add.png', true));
|
$subContainer->addElement(new htmlButton('add_' . $attrName, 'add.png', true));
|
||||||
|
$subContainer->addElement(new htmlHelpLink($attrName));
|
||||||
}
|
}
|
||||||
$subContainer->addNewLine();
|
$subContainer->addNewLine();
|
||||||
}
|
}
|
||||||
$container->addElement($subContainer);
|
$container->addField($subContainer);
|
||||||
$help = new htmlHelpLink($attrName);
|
|
||||||
$help->alignment = htmlElement::ALIGN_TOP;
|
|
||||||
$container->addElement($help, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1291,12 +1291,14 @@ class accountContainer {
|
||||||
// save button
|
// save button
|
||||||
$saveButton = new htmlButton('accountContainerSaveAccount', _('Save'));
|
$saveButton = new htmlButton('accountContainerSaveAccount', _('Save'));
|
||||||
$saveButton->setIconClass('saveButton');
|
$saveButton->setIconClass('saveButton');
|
||||||
|
$saveButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||||
$leftButtonGroup->addElement($saveButton);
|
$leftButtonGroup->addElement($saveButton);
|
||||||
$leftButtonGroup->addElement(new htmlSpacer('1px', null));
|
$leftButtonGroup->addElement(new htmlSpacer('1px', null));
|
||||||
// reset button
|
// reset button
|
||||||
if (!$this->isNewAccount) {
|
if (!$this->isNewAccount) {
|
||||||
$resetButton = new htmlButton('accountContainerReset', _('Reset changes'));
|
$resetButton = new htmlButton('accountContainerReset', _('Reset changes'));
|
||||||
$resetButton->setIconClass('undoButton');
|
$resetButton->setIconClass('undoButton');
|
||||||
|
$resetButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||||
$leftButtonGroup->addElement($resetButton);
|
$leftButtonGroup->addElement($resetButton);
|
||||||
}
|
}
|
||||||
// set password button
|
// set password button
|
||||||
|
@ -1304,6 +1306,7 @@ class accountContainer {
|
||||||
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
||||||
$passwordButton = new htmlButton('accountContainerPassword', _('Set password'));
|
$passwordButton = new htmlButton('accountContainerPassword', _('Set password'));
|
||||||
$passwordButton->setIconClass('passwordButton');
|
$passwordButton->setIconClass('passwordButton');
|
||||||
|
$passwordButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||||
$passwordButton->setOnClick('passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
|
$passwordButton->setOnClick('passwordShowChangeDialog(\'' . _('Set password') . '\', \'' . _('Ok') . '\', \''
|
||||||
. _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange&editKey=' . htmlspecialchars($this->base) . '\',\''
|
. _('Cancel') . '\', \'' . _('Set random password') . '\', \'../misc/ajax.php?function=passwordChange&editKey=' . htmlspecialchars($this->base) . '\',\''
|
||||||
. getSecurityTokenName() . '\',\'' . getSecurityTokenValue() . '\');');
|
. getSecurityTokenName() . '\',\'' . getSecurityTokenValue() . '\');');
|
||||||
|
@ -1313,6 +1316,7 @@ class accountContainer {
|
||||||
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
$leftButtonGroup->addElement(new htmlSpacer('15px', null));
|
||||||
$deleteButton = new htmlButton('accountContainerDelete', _('Delete'));
|
$deleteButton = new htmlButton('accountContainerDelete', _('Delete'));
|
||||||
$deleteButton->setIconClass('deleteButton');
|
$deleteButton->setIconClass('deleteButton');
|
||||||
|
$deleteButton->setCSSClasses(array('fullwidth-mobile-only'));
|
||||||
$leftButtonGroup->addElement($deleteButton);
|
$leftButtonGroup->addElement($deleteButton);
|
||||||
}
|
}
|
||||||
$row->add($leftButtonGroup, 12, 7);
|
$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/)
|
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
|
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
|
||||||
|
@ -232,9 +232,9 @@ class puppetClient extends baseModule {
|
||||||
if (isset($_POST['form_subpage_puppetClient_attributes_addObjectClass'])) {
|
if (isset($_POST['form_subpage_puppetClient_attributes_addObjectClass'])) {
|
||||||
$this->attributes['objectClass'][] = 'puppetClient';
|
$this->attributes['objectClass'][] = 'puppetClient';
|
||||||
}
|
}
|
||||||
$return = new htmlTable();
|
$return = new htmlResponsiveRow();
|
||||||
if (!in_array('puppetClient', $this->attributes['objectClass'])) {
|
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;
|
return $return;
|
||||||
}
|
}
|
||||||
$this->initCache();
|
$this->initCache();
|
||||||
|
@ -251,8 +251,7 @@ class puppetClient extends baseModule {
|
||||||
$environments[] = '';
|
$environments[] = '';
|
||||||
}
|
}
|
||||||
$environmentLabel = new htmlOutputText(_('Environment'));
|
$environmentLabel = new htmlOutputText(_('Environment'));
|
||||||
$environmentLabel->alignment = htmlElement::ALIGN_TOP;
|
$return->addLabel($environmentLabel);
|
||||||
$return->addElement($environmentLabel);
|
|
||||||
$environmentContainer = new htmlGroup();
|
$environmentContainer = new htmlGroup();
|
||||||
for ($i = 0; $i < sizeof($environments); $i++) {
|
for ($i = 0; $i < sizeof($environments); $i++) {
|
||||||
$environmentField = new htmlInputField('environment' . $i, $environments[$i]);
|
$environmentField = new htmlInputField('environment' . $i, $environments[$i]);
|
||||||
|
@ -263,12 +262,10 @@ class puppetClient extends baseModule {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$environmentContainer->addElement(new htmlButton('addEnvironment', 'add.png', true));
|
$environmentContainer->addElement(new htmlButton('addEnvironment', 'add.png', true));
|
||||||
|
$environmentContainer->addElement(new htmlHelpLink('environment'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$return->addElement($environmentContainer);
|
$return->addField($environmentContainer);
|
||||||
$environmentHelp = new htmlHelpLink('environment');
|
|
||||||
$environmentHelp->alignment = htmlElement::ALIGN_TOP;
|
|
||||||
$return->addElement($environmentHelp, true);
|
|
||||||
// parent node
|
// parent node
|
||||||
$possibleParentNodes = $this->getPossibleParentNodes();
|
$possibleParentNodes = $this->getPossibleParentNodes();
|
||||||
array_unshift($possibleParentNodes, '-');
|
array_unshift($possibleParentNodes, '-');
|
||||||
|
@ -276,7 +273,7 @@ class puppetClient extends baseModule {
|
||||||
if (isset($this->attributes['parentnode'][0])) {
|
if (isset($this->attributes['parentnode'][0])) {
|
||||||
$parentnode = $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
|
// classes
|
||||||
if (empty($this->moduleSettings['puppetClient_enforceClasses'][0])) {
|
if (empty($this->moduleSettings['puppetClient_enforceClasses'][0])) {
|
||||||
$this->addMultiValueInputTextField($return, 'puppetclass', _('Classes'), false, null, false, $this->classCache);
|
$this->addMultiValueInputTextField($return, 'puppetclass', _('Classes'), false, null, false, $this->classCache);
|
||||||
|
@ -287,10 +284,9 @@ class puppetClient extends baseModule {
|
||||||
// variables
|
// variables
|
||||||
$this->addMultiValueInputTextField($return, 'puppetvar', _('Variables'), false, null, false, $this->variablesCache);
|
$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 = new htmlAccountPageButton('puppetClient', 'attributes', 'remObjectClass', _('Remove Puppet extension'));
|
||||||
$remButton->colspan = 4;
|
$return->add($remButton, 12, 12, 12, 'text-center');
|
||||||
$return->addElement($remButton);
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 - 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
|
||||||
|
@ -136,34 +135,37 @@ class pykotaBillingCode extends baseModule {
|
||||||
* @return htmlElement HTML meta data
|
* @return htmlElement HTML meta data
|
||||||
*/
|
*/
|
||||||
function display_html_attributes() {
|
function display_html_attributes() {
|
||||||
$container = new htmlTable();
|
$container = new htmlResponsiveRow();
|
||||||
// pykotaBillingCode
|
// pykotaBillingCode
|
||||||
$this->addSimpleInputTextField($container, 'pykotaBillingCode', _('Billing code'), true);
|
$this->addSimpleInputTextField($container, 'pykotaBillingCode', _('Billing code'), true);
|
||||||
// balance
|
// balance
|
||||||
$container->addElement(new htmlOutputText(_('Balance')));
|
$container->addLabel(new htmlOutputText(_('Balance')));
|
||||||
$pykotaBalance = '';
|
$pykotaBalance = '';
|
||||||
if (isset($this->attributes['pykotaBalance'][0])) {
|
if (isset($this->attributes['pykotaBalance'][0])) {
|
||||||
$pykotaBalance = $this->attributes['pykotaBalance'][0];
|
$pykotaBalance = $this->attributes['pykotaBalance'][0];
|
||||||
}
|
}
|
||||||
$container->addElement(new htmlOutputText($pykotaBalance));
|
$balanceGroup = new htmlGroup();
|
||||||
$container->addElement(new htmlHelpLink('pykotaBalance'), true);
|
$balanceGroup->addElement(new htmlOutputText($pykotaBalance));
|
||||||
|
$balanceGroup->addElement(new htmlHelpLink('pykotaBalance'));
|
||||||
|
$container->addField($balanceGroup);
|
||||||
// page count
|
// page count
|
||||||
$container->addElement(new htmlOutputText(_('Page count')));
|
$container->addLabel(new htmlOutputText(_('Page count')));
|
||||||
$pykotaPageCounter = '';
|
$pykotaPageCounter = '';
|
||||||
if (isset($this->attributes['pykotaPageCounter'][0])) {
|
if (isset($this->attributes['pykotaPageCounter'][0])) {
|
||||||
$pykotaPageCounter = $this->attributes['pykotaPageCounter'][0];
|
$pykotaPageCounter = $this->attributes['pykotaPageCounter'][0];
|
||||||
}
|
}
|
||||||
$container->addElement(new htmlOutputText($pykotaPageCounter));
|
$pageCounterGroup = new htmlGroup();
|
||||||
$container->addElement(new htmlHelpLink('pykotaPageCounter'), true);
|
$pageCounterGroup->addElement(new htmlOutputText($pykotaPageCounter));
|
||||||
|
$pageCounterGroup->addElement(new htmlHelpLink('pykotaPageCounter'));
|
||||||
|
$container->addField($pageCounterGroup);
|
||||||
// description
|
// description
|
||||||
$this->addSimpleInputTextField($container, 'description', _('Description'), false, null, true);
|
$this->addSimpleInputTextField($container, 'description', _('Description'), false, null, true);
|
||||||
// reset
|
// reset
|
||||||
$container->addElement(new htmlSpacer(null, '20px'), true);
|
$container->addVerticalSpacer('2rem');
|
||||||
$container->addElement(new htmlOutputText(''));
|
$resetGroup = new htmlGroup();
|
||||||
$container->addElement(new htmlButton('resetCounters', _('Reset')));
|
$resetGroup->addElement(new htmlButton('resetCounters', _('Reset')));
|
||||||
$container->addElement(new htmlHelpLink('reset'), true);
|
$resetGroup->addElement(new htmlHelpLink('reset'));
|
||||||
// same width
|
$container->add($resetGroup, 12, 12, 12, 'text-center');
|
||||||
$container->addElement(new htmlEqualWidth(array('pykotaBillingCode', 'description')));
|
|
||||||
return $container;
|
return $container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue