Commit 57a4e6b9 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4429 / subrecord: new FE parameter 'subrecordTableCass' - a custom class for...

#4429 / subrecord: new FE parameter 'subrecordTableCass' - a custom class for the subrecord table might be specified.
parent c98f5edd
......@@ -2243,6 +2243,7 @@ See also at specific *FormElement* definitions.
| title | string | |
| extraDeleteForm | string | |
| detail | string | |
| subrecordTableClass | string | |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| capture | string | See `input-upload`_ |
| accept | string | |
......@@ -2802,6 +2803,8 @@ will be rendered inside the form as a HTML table.
* *Constant '&'*: Indicate a 'constant' value. E.g. `&12:xId` or `{{...}}` (all possibilities, incl. further SELECT
statements) might be used.
* *subrecordTableClass*: Optional. Default: 'table table-hover'. If given, the default will be overwritten.
Type: time
^^^^^^^^^^
......
......@@ -2381,7 +2381,9 @@ abstract class AbstractBuildForm {
$html .= Support::wrapTag("<tr $rowAttribute>", $rowHtml, true);
}
return Support::wrapTag("<table class='table table-hover'>", $html, true);
$attribute = Support::doAttribute('class', $formElement[FE_SUBRECORD_TABLE_CLASS]);
return Support::wrapTag("<table $attribute>", $html, true);
}
/**
......
......@@ -902,6 +902,7 @@ const FE_TRANSLATE_ID_COLUMN = 'translateIdColumn';
const FE_EMPTY_MEANS_NULL = 'emptyMeansNull';
const FE_EMPTY_ITEM_AT_START = 'emptyItemAtStart';
const FE_EMPTY_ITEM_AT_END = 'emptyItemAtEnd';
const FE_SUBRECORD_TABLE_CLASS = 'subrecordTableClass';
const FE_FLAG_ROW_OPEN_TAG = '_flagRowOpenTag'; // will be automatically computed during Formload: true | false
const FE_FLAG_ROW_CLOSE_TAG = '_flagRowCloseTag'; // will be automatically computed during Formload: true | false
......
......@@ -697,6 +697,8 @@ class Support {
self::setIfNotSet($formElement, FE_HTML_BEFORE);
self::setIfNotSet($formElement, FE_HTML_AFTER);
self::setIfNotSet($formElement, FE_SUBRECORD_TABLE_CLASS, 'table table-hover');
if (count($formSpec) > 0) {
self::setIfNotSet($formElement, F_BS_LABEL_COLUMNS, $formSpec[F_BS_LABEL_COLUMNS], '');
self::setIfNotSet($formElement, F_BS_INPUT_COLUMNS, $formSpec[F_BS_INPUT_COLUMNS], '');
......
Supports Markdown
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