Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
4c5c56a4
Commit
4c5c56a4
authored
Jun 11, 2018
by
Carsten Rose
Browse files
Merge branch 'master' of git.math.uzh.ch:typo3/qfq
parents
28891f0d
c04137ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/Element/FormGroup.js
View file @
4c5c56a4
...
...
@@ -44,11 +44,7 @@ QfqNS.Element = QfqNS.Element || {};
this
.
$formGroup
=
this
.
$findFormGroup
(
$enclosedElement
);
this
.
$element
=
this
.
$formGroup
.
find
(
elementSelector
);
this
.
$label
=
this
.
$formGroup
.
find
(
'
.control-label
'
);
if
(
this
.
$formGroup
.
hasClass
(
"
.input-group
"
))
{
this
.
$helpBlock
=
this
.
$formGroup
.
parent
().
find
(
"
.help-block
"
);
}
else
{
this
.
$helpBlock
=
this
.
$formGroup
.
find
(
"
.help-block
"
);
}
this
.
$helpBlock
=
this
.
$formGroup
.
find
(
"
.help-block
"
);
};
/**
...
...
@@ -103,7 +99,11 @@ QfqNS.Element = QfqNS.Element || {};
}
if
(
$formGroup
.
length
>
1
)
{
throw
new
Error
(
"
enclosed element yields ambiguous form group
"
);
$formGroup
=
$
(
'
#
'
+
$enclosedElement
.
attr
(
'
id
'
)
+
'
-r
'
);
console
.
log
(
"
Enclosed Element Id:
"
+
$enclosedElement
.
attr
(
'
id
'
));
if
(
$formGroup
.
length
!==
1
)
{
throw
new
Error
(
"
enclosed element yields ambiguous form group
"
);
}
}
return
$formGroup
;
...
...
javascript/src/QfqForm.js
View file @
4c5c56a4
...
...
@@ -293,14 +293,27 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
validationError
=
function
(
info
)
{
var
$formControl
=
$
(
info
.
data
.
element
);
var
$messageContainer
=
$formControl
.
siblings
(
'
.hidden.with-errors
'
);
if
(
$messageContainer
.
length
===
0
)
{
if
(
$formControl
.
parent
().
hasClass
(
'
input-group
'
))
{
$messageContainer
=
$formControl
.
parent
().
siblings
(
'
.hidden.with-errors
'
);
}
}
$messageContainer
.
data
(
'
qfq.hidden.message
'
,
true
);
$messageContainer
.
removeClass
(
'
hidden
'
);
};
n
.
QfqForm
.
prototype
.
validationSuccess
=
function
(
info
)
{
var
$formControl
=
$
(
info
.
data
.
element
);
var
$messageContainer
=
$formControl
.
siblings
(
'
.with-errors
'
);
if
(
$messageContainer
.
length
===
0
)
{
if
(
$formControl
.
parent
().
hasClass
(
'
input-group
'
))
{
$messageContainer
=
$formControl
.
parent
().
siblings
(
'
.hidden.with-errors
'
);
}
}
if
(
$messageContainer
.
data
(
'
qfq.hidden.message
'
)
===
true
)
{
$messageContainer
.
addClass
(
'
hidden
'
);
}
...
...
@@ -772,7 +785,6 @@ var QfqNS = QfqNS || {};
if
(
this
.
formImmutableDueToConcurrentAccess
)
{
return
;
}
console
.
log
(
"
QFQForm Changehandler
"
);
this
.
getSaveButton
().
removeClass
(
"
disabled
"
);
this
.
getSaveButton
().
addClass
(
this
.
getSaveButtonAttentionClass
());
this
.
getSaveButton
().
removeAttr
(
"
disabled
"
);
...
...
Write
Preview
Supports
Markdown
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