Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
3bdfb794
Commit
3bdfb794
authored
Dec 05, 2019
by
bbaer
Browse files
rebase develop
parent
b6c52394
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/Element/FormGroup.js
View file @
3bdfb794
...
...
@@ -172,7 +172,14 @@ QfqNS.Element = QfqNS.Element || {};
* @param required
*/
n
.
FormGroup
.
prototype
.
setRequired
=
function
(
required
)
{
this
.
$element
.
prop
(
'
required
'
,
required
);
if
(
this
.
$element
.
is
(
'
div
'
))
{
if
(
!!
this
.
$element
.
find
(
'
input
'
))
{
console
.
log
(
"
children found
"
);
this
.
$element
.
find
(
'
input
'
).
prop
(
'
required
'
,
required
);
}
}
else
{
this
.
$element
.
prop
(
'
required
'
,
required
);
}
};
/**
...
...
@@ -181,9 +188,9 @@ QfqNS.Element = QfqNS.Element || {};
*/
n
.
FormGroup
.
prototype
.
setError
=
function
(
isError
)
{
if
(
isError
)
{
this
.
$formGroup
.
addClass
(
"
hullahoop
has-error has-danger
"
);
this
.
$formGroup
.
addClass
(
"
has-error has-danger
"
);
}
else
{
this
.
$formGroup
.
removeClass
(
"
hullahoop
has-error has-danger
"
);
this
.
$formGroup
.
removeClass
(
"
has-error has-danger
"
);
}
};
...
...
javascript/src/QfqForm.js
View file @
3bdfb794
...
...
@@ -1261,9 +1261,14 @@ var QfqNS = QfqNS || {};
element
.
setRequired
(
configuration
.
required
);
if
(
element
.
$element
)
{
if
(
element
.
$element
.
is
(
"
select
"
))
{
element
.
$element
.
prop
(
'
required
'
,
configuration
.
required
);
element
.
$element
.
prop
(
'
required
'
,
configuration
Item
.
required
);
element
.
$element
.
attr
(
'
data-required
'
,
'
yes
'
);
}
if
(
element
.
$element
.
is
(
"
input[type=hidden]
"
))
{
console
.
log
(
"
Update Hidden
"
);
element
.
$element
.
prop
(
"
required
"
,
configurationItem
.
required
);
}
}
}
}
catch
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment