Commit 5c06a8c8 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #9805. activeFirstRequiredTab

parent 68dcccb0
Pipeline #3088 passed with stages
in 1 minute and 52 seconds
...@@ -2544,7 +2544,7 @@ Parameter ...@@ -2544,7 +2544,7 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdap | | Enable LDAP as 'Typeahead' data source. | | typeAheadLdap | | Enable LDAP as 'Typeahead' data source. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapSearch | string | Regular LDAP search expression. E.g.: `(|(cn=*?*)(mail=*?*))` | | typeAheadLdapSearch | string | Regular LDAP search expression. E.g.: `(|(cn=*?*)(mail=*?*))`   |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, roomnumber, telephonenumber` | | typeAheadLdapValuePrintf | string | Value formatting of LDAP result, per entry. E.g.: `'%s / %s / %s', mail, roomnumber, telephonenumber` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
...@@ -2559,6 +2559,9 @@ Parameter ...@@ -2559,6 +2559,9 @@ Parameter
| mode | string | The value `readonly` will activate a global readonly mode of the form - the user can't change any data. | | mode | string | The value `readonly` will activate a global readonly mode of the form - the user can't change any data. |
| | | See :ref:`form-mode-global` | | | | See :ref:`form-mode-global` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| activeFirstRequiredTab | digit | 0: off, 1: (default) - with formModeGlobal=requiredOffButMark bring pill to front on save. |
| | | See :ref:`form-mode-global` |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| enterAsSubmit | digit | 0: off, 1: Pressing *enter* in a form means *save* and *close*. Takes default from configuration_. | | enterAsSubmit | digit | 0: off, 1: Pressing *enter* in a form means *save* and *close*. Takes default from configuration_. |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| submitButtonText | string | Show a save button at the bottom of the form, with <submitButtonText> . See `submitButtonText`_. | | submitButtonText | string | Show a save button at the bottom of the form, with <submitButtonText> . See `submitButtonText`_. |
...@@ -2616,6 +2619,10 @@ Parameter ...@@ -2616,6 +2619,10 @@ Parameter
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . | | minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+ +-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
| minWidth | int | See checkboxRadioMinWidth_ . |
+-----------------------------+--------+----------------------------------------------------------------------------------------------------------+
* Example: * Example:
...@@ -2732,6 +2739,11 @@ Mode ...@@ -2732,6 +2739,11 @@ Mode
* On lost focus. * On lost focus.
* When the user saves the record. * When the user saves the record.
* After saving the record, by default the first pill with a missing input comes to front. This behaviour can be
switch on/off with `form.parameter.requiredOffButMark=0|1`
Extra Extra
;;;;; ;;;;;
......
...@@ -605,6 +605,7 @@ abstract class AbstractBuildForm { ...@@ -605,6 +605,7 @@ abstract class AbstractBuildForm {
$attribute[FE_INPUT_AUTOCOMPLETE] = 'on'; $attribute[FE_INPUT_AUTOCOMPLETE] = 'on';
$attribute['enctype'] = $this->getEncType(); $attribute['enctype'] = $this->getEncType();
$attribute['data-disable-return-key-submit'] = $this->formSpec[F_ENTER_AS_SUBMIT] == '1' ? "false" : "true"; // attribute meaning is inverted $attribute['data-disable-return-key-submit'] = $this->formSpec[F_ENTER_AS_SUBMIT] == '1' ? "false" : "true"; // attribute meaning is inverted
$attribute['data-activate-first-required-tab'] = $this->formSpec[F_ACTIVATE_FIRST_REQUIRED_TAB] == '1' ? "true" : "false"; // attribute meaning is inverted
return $attribute; return $attribute;
} }
......
...@@ -1046,6 +1046,7 @@ const F_NEW_BUTTON_CLASS = SYSTEM_NEW_BUTTON_CLASS; ...@@ -1046,6 +1046,7 @@ const F_NEW_BUTTON_CLASS = SYSTEM_NEW_BUTTON_CLASS;
const F_NEW_BUTTON_GLYPH_ICON = SYSTEM_NEW_BUTTON_GLYPH_ICON; const F_NEW_BUTTON_GLYPH_ICON = SYSTEM_NEW_BUTTON_GLYPH_ICON;
const F_ENTER_AS_SUBMIT = SYSTEM_ENTER_AS_SUBMIT; const F_ENTER_AS_SUBMIT = SYSTEM_ENTER_AS_SUBMIT;
const F_ACTIVATE_FIRST_REQUIRED_TAB = 'activeFirstRequiredTab';
const F_DRAG_AND_DROP_ORDER_SQL = 'dragAndDropOrderSql'; const F_DRAG_AND_DROP_ORDER_SQL = 'dragAndDropOrderSql';
const F_ORDER_INTERVAL = 'orderInterval'; const F_ORDER_INTERVAL = 'orderInterval';
......
...@@ -1427,6 +1427,7 @@ class QuickFormQuery { ...@@ -1427,6 +1427,7 @@ class QuickFormQuery {
* @return array * @return array
* @throws \CodeException * @throws \CodeException
* @throws \UserFormException * @throws \UserFormException
* @throws \UserReportException
*/ */
private function initForm(array $formSpec, $recordId) { private function initForm(array $formSpec, $recordId) {
...@@ -1442,6 +1443,7 @@ class QuickFormQuery { ...@@ -1442,6 +1443,7 @@ class QuickFormQuery {
Support::setIfNotSet($formSpec, F_MULTI_MSG_NO_RECORD, F_MULTI_MSG_NO_RECORD_TEXT); Support::setIfNotSet($formSpec, F_MULTI_MSG_NO_RECORD, F_MULTI_MSG_NO_RECORD_TEXT);
Support::setIfNotSet($formSpec, F_FE_MIN_WIDTH, F_FE_MIN_WIDTH_DEFAULT); Support::setIfNotSet($formSpec, F_FE_MIN_WIDTH, F_FE_MIN_WIDTH_DEFAULT);
Support::setIfNotSet($formSpec, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH_DEFAULT); Support::setIfNotSet($formSpec, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH, FE_INPUT_EXTRA_BUTTON_INFO_MIN_WIDTH_DEFAULT);
Support::setIfNotSet($formSpec, F_ACTIVATE_FIRST_REQUIRED_TAB, 1);
// In case there is no F_MODE defined on the form, check if there is one in STORE_SIP. // In case there is no F_MODE defined on the form, check if there is one in STORE_SIP.
// if ($formSpec[F_MODE] == '') { // if ($formSpec[F_MODE] == '') {
......
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