responsive

This commit is contained in:
Roland Gruber 2019-09-07 20:43:04 +02:00
parent a8eb89aaf2
commit f646e1e8ff
1 changed files with 5 additions and 7 deletions

View File

@ -136,27 +136,25 @@ class yubiKeyUser extends baseModule {
* @return htmlElement HTML meta data * @return htmlElement HTML meta data
*/ */
public function display_html_attributes() { public function display_html_attributes() {
$return = new htmlTable(); $return = new htmlResponsiveRow();
$objectClass = $this->getObjectClassName(); $objectClass = $this->getObjectClassName();
$attributeName = $this->getAttributeName(); $attributeName = $this->getAttributeName();
if (empty($attributeName)) { if (empty($attributeName)) {
$message = new htmlStatusMessage('ERROR', _('Invalid configuration detected. Please edit your server profile (module settings) and fill all required fields.')); $message = new htmlStatusMessage('ERROR', _('Invalid configuration detected. Please edit your server profile (module settings) and fill all required fields.'));
$return->addElement($message, true); $return->add($message, 12);
return $return; return $return;
} }
if (empty($objectClass) || in_array($objectClass, $this->attributes['objectClass'])) { if (empty($objectClass) || in_array($objectClass, $this->attributes['objectClass'])) {
$htmlIds = array(); $htmlIds = array();
$this->addMultiValueInputTextField($return, $attributeName, _('YubiKey ids'), false, '12', false, null, null, $htmlIds, 'lam-prevent-enter'); $this->addMultiValueInputTextField($return, $attributeName, _('YubiKey ids'), false, '12', false, null, null, $htmlIds, 'lam-prevent-enter');
if (!empty($objectClass)) { if (!empty($objectClass)) {
$return->addElement(new htmlSpacer(null, '30px'), true); $return->addVerticalSpacer('2rem');
$remButton = new htmlButton('remObjectClass', _('Remove YubiKey extension')); $remButton = new htmlButton('remObjectClass', _('Remove YubiKey extension'));
$remButton->colspan = 3; $return->add($remButton, 12, 12 ,12, 'text-center');
$return->addElement($remButton);
} }
} }
else { else {
$return->addElement(new htmlButton('addObjectClass', _('Add YubiKey extension'))); $return->add(new htmlButton('addObjectClass', _('Add YubiKey extension')), 12);
} }
return $return; return $return;
} }