Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
qfq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
typo3
qfq
Commits
c8fed1ac
Commit
c8fed1ac
authored
6 years ago
by
Carsten Rose
Browse files
Options
Downloads
Patches
Plain Diff
F6563 Accept 0 as required. implemented
parent
1977a980
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#791
passed
6 years ago
Stage: test
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
extension/Documentation/Manual.rst
+5
-3
5 additions, 3 deletions
extension/Documentation/Manual.rst
extension/qfq/qfq/Constants.php
+1
-0
1 addition, 0 deletions
extension/qfq/qfq/Constants.php
extension/qfq/qfq/Save.php
+5
-0
5 additions, 0 deletions
extension/qfq/qfq/Save.php
with
11 additions
and
3 deletions
extension/Documentation/Manual.rst
+
5
−
3
View file @
c8fed1ac
...
...
@@ -2737,11 +2737,13 @@ See also at specific *FormElement* definitions.
| unchecked | string | |
| label2 | string | |
| itemList | string | |
| emptyHide |
string
| |
| emptyItemAtStart |
string
| |
| emptyItemAtEnd |
string
| |
| emptyHide |
-
| |
| emptyItemAtStart |
-
| |
| emptyItemAtEnd |
-
| |
| buttonClass | string | |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| acceptZeroAsRequired | string | 0|1 - Accept a '0' as a valid input. Default '0' (=0 is not a valid input) |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| dateFormat | string | yyyy-mm-dd | dd.mm.yyyy |
+------------------------+--------+----------------------------------------------------------------------------------------------------------+
| decimalFormat | string | [precision,scale] Limits and formats input to a decimal number with the specified precision and scale. |
...
...
This diff is collapsed.
Click to expand it.
extension/qfq/qfq/Constants.php
+
1
−
0
View file @
c8fed1ac
...
...
@@ -1049,6 +1049,7 @@ const FE_FILE_BUTTON_TEXT = 'fileButtonText';
const
FE_FILE_BUTTON_TEXT_DEFAULT
=
'Choose File'
;
const
FE_INPUT_TYPE
=
'inputType'
;
const
FE_STEP
=
'step'
;
const
FE_ACCEPT_ZERO_AS_REQUIRED
=
'acceptZeroAsRequired'
;
const
FE_IMAGE_CUT_RESIZE_WIDTH
=
'resizeWidth'
;
const
FE_IMAGE_CUT_KEEP_ORIGINAL
=
'keepOriginal'
;
...
...
This diff is collapsed.
Click to expand it.
extension/qfq/qfq/Save.php
+
5
−
0
View file @
c8fed1ac
...
...
@@ -439,6 +439,11 @@ class Save {
$this
->
feSpecNative
[
$key
][
FE_MODE_SQL
]
=
$mode
;
}
if
(
isset
(
$formElement
[
FE_ACCEPT_ZERO_AS_REQUIRED
])
&&
$formElement
[
FE_ACCEPT_ZERO_AS_REQUIRED
]
!=
'0'
&&
isset
(
$clientValues
[
$formElement
[
FE_NAME
]])
&&
$clientValues
[
$formElement
[
FE_NAME
]]
==
'0'
){
$mode
=
'fake'
;
// The next if() should never be true.
}
if
(
!
$requiredOff
&&
$mode
==
FE_MODE_REQUIRED
&&
empty
(
$clientValues
[
$formElement
[
FE_NAME
]]))
{
throw
new
UserFormException
(
"Missing required value: "
.
$formElement
[
FE_LABEL
],
ERROR_REQUIRED_VALUE_EMPTY
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment