diff --git a/lam/style/responsive/120_lam.css b/lam/style/responsive/120_lam.css index c2c7cd95..2ff6f157 100644 --- a/lam/style/responsive/120_lam.css +++ b/lam/style/responsive/120_lam.css @@ -87,6 +87,7 @@ table.responsive-table td { padding-top: 0.5rem; padding-right: 0.1rem; padding-left: 0.1rem; + word-break: break-all; } /* mobile */ @@ -161,6 +162,10 @@ table.responsive-table td { display: none !important; } + table.alternating-color tbody tr:nth-child(odd) { + background-color:rgba(0, 0, 0, 0.05); + } + } /* desktop */ @@ -182,4 +187,8 @@ table.responsive-table td { display: none !important; } + table.alternating-color tbody tr:nth-child(odd) { + background-color:rgba(0, 0, 0, 0.05); + } + } diff --git a/lam/templates/upload/masscreate.php b/lam/templates/upload/masscreate.php index 80789871..2517bff9 100644 --- a/lam/templates/upload/masscreate.php +++ b/lam/templates/upload/masscreate.php @@ -1,25 +1,24 @@ '; -echo "
\n"; -echo "

" . _("Account creation via file upload") . "

\n"; -echo "
"; -echo "

 

\n"; - -echo "

\n"; - echo _("Here you can create multiple accounts by providing a CSV file."); -echo "

\n"; - -echo "

 

\n"; - echo "
\n"; $tabindex = 1; -$table = new htmlTable(); + +$row = new htmlResponsiveRow(); +$row->add(new htmlTitle(_("Account creation via file upload")), 12); +$row->add(new htmlOutputText(_("Here you can create multiple accounts by providing a CSV file.")), 12); +$row->addVerticalSpacer('4rem'); // account type $typeList = array(); @@ -173,34 +165,32 @@ if (isset($_REQUEST['type'])) { elseif (!empty($types)) { $selectedType = $types[0]->getId(); } -$typeSelect = new htmlTableExtendedSelect('type', $typeList, array($selectedType), _("Account type")); +$typeSelect = new htmlResponsiveSelect('type', $typeList, array($selectedType), _("Account type")); $typeSelect->setHasDescriptiveElements(true); $typeSelect->setOnchangeEvent('changeVisibleModules(this);'); -$table->addElement($typeSelect, true); -$table->addElement(new htmlSpacer(null, '10px'), true); +$row->add($typeSelect, 12); +$row->addVerticalSpacer('1rem'); + +$row->add(new htmlSubTitle(_('Selected modules')), 12); // module selection -$moduleLabel = new htmlOutputText(_('Selected modules')); -$moduleLabel->alignment = htmlElement::ALIGN_TOP; -$table->addElement($moduleLabel); -$moduleGroup = new htmlGroup(); foreach ($types as $type) { $divClasses = array('typeOptions'); if ($selectedType != $type->getId()) { $divClasses[] = 'hidden'; } - $innerTable = new htmlTable(); + $innerRow = new htmlResponsiveRow(); $modules = $_SESSION['config']->get_AccountModules($type->getId()); foreach ($modules as $m => $moduleName) { - if (($m != 0) && ($m%3 == 0)) { - echo $innerTable->addNewLine(); - } + $moduleGroup = new htmlGroup(); $module = moduleCache::getModule($moduleName, $type->getScope()); $iconImage = $module->getIcon(); if (!is_null($iconImage) && !(strpos($iconImage, 'http') === 0) && !(strpos($iconImage, '/') === 0)) { $iconImage = '../../graphics/' . $iconImage; } - $innerTable->addElement(new htmlImage($iconImage)); + $image = new htmlImage($iconImage, '32px', '32px'); + $image->setCSSClasses(array('margin3')); + $moduleGroup->addElement($image); $enabled = true; if (is_base_module($moduleName, $type->getScope())) { $enabled = false; @@ -209,34 +199,44 @@ foreach ($types as $type) { if (isset($_POST['submit']) && !isset($_POST[$type->getId() . '___' . $moduleName])) { $checked = false; } - $checkbox = new htmlTableExtendedInputCheckbox($type->getId() . '___' . $moduleName, $checked, getModuleAlias($moduleName, $type->getScope()), null, false); + $checkbox = new htmlLabeledInputCheckbox($type->getId() . '___' . $moduleName, $checked, getModuleAlias($moduleName, $type->getScope()), null, false); $checkbox->setIsEnabled($enabled); if ($enabled) { - $innerTable->addElement($checkbox); + $moduleGroup->addElement($checkbox); } else { $boxGroup = new htmlGroup(); $boxGroup->addElement($checkbox); // add hidden field to fake disabled checkbox value $boxGroup->addElement(new htmlHiddenInput($type->getId() . '___' . $moduleName, 'on')); - $innerTable->addElement($boxGroup); + $moduleGroup->addElement($boxGroup); } - $innerTable->addElement(new htmlSpacer('10px', null)); + $innerRow->add($moduleGroup, 12, 6, 4); } - $typeDiv = new htmlDiv($type->getId(), $innerTable); + $moduleCount = sizeof($modules); + if ($moduleCount%3 == 2) { + $innerRow->add(new htmlOutputText(' ', false), 0, 0, 4); + } + if ($moduleCount%3 == 1) { + $innerRow->add(new htmlOutputText(' ', false), 0, 0, 4); + } + if ($moduleCount%2 == 1) { + $innerRow->add(new htmlOutputText(' ', false), 0, 6, 0); + } + $typeDiv = new htmlDiv($type->getId(), $innerRow); $typeDiv->setCSSClasses($divClasses); - $moduleGroup->addElement($typeDiv); + $row->add($typeDiv, 12); } -$table->addElement($moduleGroup, true); // ok button -$table->addElement(new htmlSpacer(null, '20px'), true); +$row->addVerticalSpacer('3rem'); if (!empty($types)) { - $table->addElement(new htmlButton('submit', _('Ok')), true); + $row->add(new htmlButton('submit', _('Ok')), 12); } -addSecurityTokenToMetaHTML($table); -parseHtml(null, $table, array(), false, $tabindex, 'user'); +addSecurityTokenToMetaHTML($row); +parseHtml(null, $row, array(), false, $tabindex, 'user'); + ?>