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
a63f08ff
Commit
a63f08ff
authored
Jun 22, 2019
by
bbaer
Browse files
Fixed button display, added Alert instead of disabled button.
parent
1e64e71b
Pipeline
#2013
passed with stages
in 2 minutes and 41 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
a63f08ff
...
...
@@ -67,6 +67,7 @@ var QfqNS = QfqNS || {};
this
.
form
=
new
n
.
Form
(
this
.
formId
,
false
);
}
this
.
infoLockedButton
=
this
.
infoLockedButton
.
bind
(
this
);
// This is required when displaying validation messages, in order to activate the tab, which has validation
// issues
...
...
@@ -822,12 +823,29 @@ var QfqNS = QfqNS || {};
n
.
QfqForm
.
prototype
.
deactivateSaveButton
=
function
()
{
this
.
getSaveButton
().
addClass
(
"
disabled
"
);
this
.
getSaveButton
().
attr
(
"
disabled
"
,
"
disabled
"
);
//this.getSaveButton().attr("disabled", "disabled");
this
.
getSaveButton
().
off
(
'
click
'
);
this
.
getSaveButton
().
on
(
'
click
'
,
this
.
infoLockedButton
);
this
.
getSaveButton
().
css
(
"
color
"
,
"
#fff
"
);
};
n
.
QfqForm
.
prototype
.
infoLockedButton
=
function
(
e
)
{
var
alert
=
new
n
.
Alert
({
message
:
"
Please wait until the upload finishes to save this form
"
,
buttons
:
[{
label
:
"
Ok
"
,
eventName
:
"
ok
"
}],
modal
:
true
});
alert
.
show
();
e
.
preventDefault
();
return
false
;
};
n
.
QfqForm
.
prototype
.
activateSaveButton
=
function
()
{
this
.
getSaveButton
().
off
(
'
click
'
);
this
.
getSaveButton
().
removeClass
(
"
disabled
"
);
this
.
getSaveButton
().
removeAttr
(
"
disabled
"
);
//this.getSaveButton().removeAttr("disabled");
this
.
getSaveButton
().
css
(
"
color
"
,
""
);
this
.
getSaveButton
().
click
(
this
.
handleSaveClick
.
bind
(
this
));
};
n
.
QfqForm
.
prototype
.
getSaveButtonAttentionClass
=
function
()
{
...
...
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