responsive

This commit is contained in:
Roland Gruber 2019-11-03 09:26:49 +01:00
parent 00a299e80f
commit 50102f2c3f
1 changed files with 13 additions and 12 deletions

View File

@ -188,21 +188,21 @@ class nisnetgroup extends baseModule {
* @return htmlElement HTML meta data * @return htmlElement HTML meta data
*/ */
function display_html_attributes() { function display_html_attributes() {
$return = new htmlTable(); $return = new htmlResponsiveRow();
// user name // user name
$groupName = ''; $groupName = '';
if (isset($this->attributes['cn'][0])) { if (isset($this->attributes['cn'][0])) {
$groupName = $this->attributes['cn'][0]; $groupName = $this->attributes['cn'][0];
} }
$nameInput = new htmlTableExtendedInputField(_("Group name"), 'cn', $groupName, 'cn'); $nameInput = new htmlResponsiveInputField(_("Group name"), 'cn', $groupName, 'cn');
$nameInput->setRequired(true); $nameInput->setRequired(true);
$nameInput->setFieldMaxLength(20); $nameInput->setFieldMaxLength(20);
$return->addElement($nameInput, true); $return->add($nameInput, 12);
$description = ''; $description = '';
if (isset($this->attributes['description'][0])) { if (isset($this->attributes['description'][0])) {
$description = $this->attributes['description'][0]; $description = $this->attributes['description'][0];
} }
$return->addElement(new htmlTableExtendedInputField(_('Description'), 'description', $description, 'description'), true); $return->add(new htmlResponsiveInputField(_('Description'), 'description', $description, 'description'), 12);
$subgroupsContainer = new htmlTable(); $subgroupsContainer = new htmlTable();
if (isset($this->attributes['memberNisNetgroup']) && is_array($this->attributes['memberNisNetgroup'])) { if (isset($this->attributes['memberNisNetgroup']) && is_array($this->attributes['memberNisNetgroup'])) {
$membergroups = $this->attributes['memberNisNetgroup']; $membergroups = $this->attributes['memberNisNetgroup'];
@ -211,13 +211,14 @@ class nisnetgroup extends baseModule {
$subgroupsContainer->addElement(new htmlOutputText(implode(', ', $parts)), true); $subgroupsContainer->addElement(new htmlOutputText(implode(', ', $parts)), true);
} }
} }
$subgroupsContainer->addElement(new htmlAccountPageButton(get_class($this), 'group', 'open', _('Edit subgroups'))); $subGroupsButtonGroup = new htmlGroup();
$subGroupsButtonGroup->addElement(new htmlAccountPageButton(get_class($this), 'group', 'open', _('Edit subgroups')));
$subGroupsButtonGroup->addElement(new htmlHelpLink('memberNisNetgroup'));
$subgroupsContainer->addElement($subGroupsButtonGroup);
$subgroupsLabel = new htmlOutputText(_('Subgroups')); $subgroupsLabel = new htmlOutputText(_('Subgroups'));
$subgroupsLabel->alignment = htmlElement::ALIGN_TOP; $return->addLabel($subgroupsLabel);
$return->addElement($subgroupsLabel); $return->addField($subgroupsContainer);
$return->addElement($subgroupsContainer); $return->addLabel(new htmlOutputText(' ', false));
$return->addElement(new htmlHelpLink('memberNisNetgroup'), true);
$return->addElement(new htmlSpacer(null, '10px'), true);
// members // members
$memberTable = new htmlTable(); $memberTable = new htmlTable();
$hostLabel = new htmlOutputText(_('Host')); $hostLabel = new htmlOutputText(_('Host'));
@ -296,8 +297,8 @@ class nisnetgroup extends baseModule {
$membersLabel = new htmlSubTitle(_('Members')); $membersLabel = new htmlSubTitle(_('Members'));
$membersLabel->setHelpId('members'); $membersLabel->setHelpId('members');
$return->addElement($membersLabel, true); $return->add($membersLabel, 12);
$return->addElement($memberTable); $return->add($memberTable, 12);
return $return; return $return;
} }