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
18c85d08
Commit
18c85d08
authored
Apr 07, 2017
by
Rafael Ostertag
Browse files
Merge branch 'return_keysubmits' into raos_work
parents
12e61622
f426615c
Changes
2
Show whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
18c85d08
...
...
@@ -66,7 +66,11 @@ var QfqNS = QfqNS || {};
this
.
getDeleteButton
().
click
(
this
.
handleDeleteClick
.
bind
(
this
));
this
.
setupFormUpdateHandler
();
if
(
!!
$
(
'
#
'
+
QfqNS
.
escapeJqueryIdSelector
(
this
.
formId
)).
data
(
'
disable-return-key-submit
'
))
{
// Nothing to do
}
else
{
this
.
setupEnterKeyHandler
();
}
this
.
fileUploader
=
new
n
.
FileUpload
(
'
#
'
+
this
.
formId
,
this
.
fileUploadTo
);
this
.
fileUploader
.
on
(
'
fileupload.started
'
,
this
.
startUploadHandler
);
...
...
@@ -128,7 +132,7 @@ var QfqNS = QfqNS || {};
*/
n
.
QfqForm
.
prototype
.
setupEnterKeyHandler
=
function
()
{
$
(
"
input
"
).
keyup
(
function
(
event
)
{
if
(
event
.
which
===
13
)
{
if
(
event
.
which
===
13
&&
this
.
submitOnEnter
()
)
{
if
(
this
.
form
.
formChanged
)
{
this
.
lastButtonPress
=
"
save&close
"
;
n
.
Log
.
debug
(
"
save&close click
"
);
...
...
@@ -876,4 +880,11 @@ var QfqNS = QfqNS || {};
return
this
.
form
.
formChanged
;
};
/**
* @private
*/
n
.
QfqForm
.
prototype
.
submitOnEnter
=
function
()
{
return
!
(
!!
this
.
form
.
$form
.
data
(
'
disable-return-key-submit
'
));
};
})(
QfqNS
);
\ No newline at end of file
mockup/personmock.html
View file @
18c85d08
...
...
@@ -111,7 +111,8 @@
</div>
<form
id=
"myForm"
class=
"form-horizontal"
data-toggle=
"validator"
data-enable-save-button=
"false"
>
<form
id=
"myForm"
class=
"form-horizontal"
data-toggle=
"validator"
data-enable-save-button=
"false"
data-disable-return-key-submit=
"false"
>
<input
type=
"hidden"
name=
"s"
value=
"badcaffee1234"
>
<div
class=
"tab-content"
>
...
...
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