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
mathieu
technobel.sf
Commits
8c58138e
Commit
8c58138e
authored
May 17, 2018
by
Mat
Browse files
postAJAX, gestion des erreurs, sépare le test readystate et status 200
parent
9a89a172
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/TechnoBundle/Resources/views/Ajax/Owner/mainDisplay.html.twig
View file @
8c58138e
...
...
@@ -166,17 +166,23 @@
// Annule l
'
événement
,
mais
préserve
la
fonction
callback
e
.
preventDefault
();
if
(
this
.
readyState
===
4
&&
this
.
status
===
200
)
{
postAJAX
(
submitURL
,
function
()
{
if
(
this
.
readyState
===
4
)
{
if
(
this
.
status
===
200
)
{
reloadTableOwner
();
form
.
parentNode
.
classList
.
add
(
'
hidden
'
);
}
else
if
(
this
.
status
===
400
)
{
console
.
log
(
'
BAD REQUEST. DISPLAY ERRORS
'
);
}
}
},
form
);
});
</script>
{%
endblock
%}
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