Skip to content
GitLab
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
eab9f32a
Commit
eab9f32a
authored
Apr 27, 2016
by
Rafael Ostertag
Browse files
Brought back fileDeleteUrl in QfqForm.js
parent
1837de41
Changes
1
Hide whitespace changes
Inline
Side-by-side
javascript/src/QfqForm.js
View file @
eab9f32a
...
...
@@ -22,12 +22,13 @@ var QfqNS = QfqNS || {};
* @param fileUploadTo {string} url used for file uploads
* @constructor
*/
n
.
QfqForm
=
function
(
formId
,
submitTo
,
deleteUrl
,
dataRefreshUrl
,
fileUploadTo
)
{
n
.
QfqForm
=
function
(
formId
,
submitTo
,
deleteUrl
,
dataRefreshUrl
,
fileUploadTo
,
fileDeleteUrl
)
{
this
.
formId
=
formId
;
this
.
submitTo
=
submitTo
;
this
.
deleteUrl
=
deleteUrl
;
this
.
dataRefreshUrl
=
dataRefreshUrl
;
this
.
fileUploadTo
=
fileUploadTo
;
this
.
fileDeleteUrl
=
fileDeleteUrl
;
this
.
form
=
new
n
.
Form
(
this
.
formId
);
// This is required when displaying validation messages, in to activate the tab, which has validation issues
...
...
@@ -84,6 +85,15 @@ var QfqNS = QfqNS || {};
* @private
*/
n
.
QfqForm
.
prototype
.
fileDeleteSuccessHandler
=
function
(
obj
)
{
if
(
!
obj
.
data
.
status
)
{
throw
Error
(
"
Response on file upload missing status
"
);
}
if
(
obj
.
data
.
status
===
"
error
"
)
{
var
alert
=
new
n
.
Alert
(
obj
.
data
.
message
,
"
error
"
);
alert
.
show
();
return
;
}
var
$button
=
$
(
obj
.
target
);
$button
.
prop
(
"
disabled
"
,
true
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment