Commit 6b857a50 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Radio-buttons: vertical & horizontal alignent.

AbstractBuildForm.php: Class 'radio' or 'radio-inline' assigned to each individual radio element. After formelement['maxlength'] elements, a <br> is rendered.
parent 5b899934
......@@ -1147,10 +1147,13 @@ abstract class AbstractBuildForm {
$jj = 0;
$flagFirst = true;
$radioClass = ($formElement['maxLength'] > 1) ? 'radio-inline' : 'radio';
$br = '';
$html = $this->buildNativeHidden($htmlFormElementId, $value);
for ($ii = 0; $ii < count($itemValue); $ii++) {
$jj++;
$attribute = $attributeBase;
$attribute = $attributeBase; //
if ($flagFirst) {
$flagFirst = false;
if (isset($formElement['autofocus']))
......@@ -1172,12 +1175,19 @@ abstract class AbstractBuildForm {
// $element = Support::wrapTag('<div class="' . $this->feDivClass[$formElement[FE_TYPE]] .'">', $element);
// }
$html .= $element;
if ($formElement['maxLength'] > 1) {
if ($jj === $formElement['maxLength']) {
$jj = 0;
$html .= '<br>';
if ($jj == $formElement['maxLength']) {
$jj = 0;
$br = '<br>';
} else {
$br = '';
}
}
$element = Support::wrapTag("<div class='$radioClass'>", $element) . $br;
$html .= $element;
}
$json = $this->getJsonElementUpdate($htmlFormElementId, $value, $formElement[FE_MODE]);
......
......@@ -60,7 +60,8 @@ VALUES
(500, 5, 'name', 'Name', 'show', 'text', 'all', 'native', 10, 0, 255, '', '', '', '', '', '', 0, ''),
(501, 5, 'firstname', 'Firstname', 'show', 'text', 'all', 'native', 20, 0, 255, '', '', '', '', '', '', 0, ''),
(502, 5, 'birthday', 'Birthday', 'show', 'date', 'all', 'native', 30, 0, 255, '', '', '', '', '', '', 0, ''),
(506, 5, 'gender', 'Sex', 'show', 'select', 'alnumx', 'native', 40, 0, 0, '', '', '', '', '', '', 0, ''),
(506, 5, 'gender', 'Sex', 'show', 'radio', 'alnumx', 'native', 40, 0, 0, '', '', '', '', '', 'itemList=female,male',
0, ''),
(503, 5, 'datumZeit', 'Datum & Zeit', 'show', 'datetime', 'alnumx', 'native', 50, 0, 0, '', '', '', '', '', '', 0,
''),
(504, 5, 'zeit', 'Zeit', 'show', 'time', 'alnumx', 'native', 60, 0, 0, '', '', '', '', '', '', 0, ''),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment