fix coach picture upload

pull/4994/head
Thibault Duplessis 2019-04-20 07:40:41 +07:00
parent ee23deec6d
commit 450e7c41f3
3 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ object edit {
)
)
),
st.form(cls := "box__pad form3", action := routes.Coach.edit, method := "POST")(
st.form(cls := "box__pad form3 async", action := routes.Coach.edit, method := "POST")(
div(cls := "tabs")(
div(dataTab := "basics", cls := "active")("Basics"),
div(dataTab := "texts")("Texts"),

View File

@ -27,7 +27,7 @@ object picture {
error.map { e =>
p(cls := "error")(e)
},
st.form(action := routes.Coach.pictureApply, enctype := "multipart/form-data", cls := "upload")(
st.form(action := routes.Coach.pictureApply, enctype := "multipart/form-data", method := "post", cls := "upload")(
p("Max size: ", lila.db.Photographer.uploadMaxMb, "MB."),
form3.file.image("picture"),
button(tpe := "submit", cls := "button")("Upload profile picture")

View File

@ -57,7 +57,7 @@ $(function() {
$editor.find('div.status').removeClass('saved');
});
var submit = lichess.debounce(function() {
$editor.find('form.form3').ajaxSubmit({
$editor.find('form.async').ajaxSubmit({
success: function() {
$editor.find('div.status').addClass('saved');
todo();