bug/send-comment-button

This commit is contained in:
m 2018-04-20 09:17:37 +02:00
parent b2a550d09b
commit e379b58d58
2 changed files with 5 additions and 5 deletions

View File

@ -199,15 +199,14 @@ function checkCommentSending() {
// on page load, "textSend" is not set
if ("undefined" === typeof button.data("textSend")) {
button.data("textSend", button.val());
button.data("textSend", button.text());
}
if (!form.get(0).checkValidity()) {
button.prop("disabled", true);
button.val(button.data("textWait"));
button.text(button.data("textWait"));
} else {
button.prop("disabled", false);
button.val(button.data("textSend"));
button.text(button.data("textSend"));
}
}

View File

@ -26,10 +26,11 @@
<button
type="submit"
id="add_comment"
value="{__('Comments', 'Send the comment')|html}"
class="btn btn-success"
data-text-wait="{__('Comments', 'Type your name and a comment to send it')|html}"
>
{__('Comments', 'Send the comment')|html}
</button>
</div>
</fieldset>
</div>