Merge branch '68-embed-field-is-not-reset-after-submitting-post' into 'config'

Resolve "Embed field is not reset after submitting post"

Closes #68

See merge request leftypol/leftypol!31
This commit is contained in:
Zankaria Auxa 2025-02-12 23:04:22 +00:00
commit 3a44b68c41

View file

@ -111,7 +111,7 @@ $(window).ready(function() {
$(form).find('input[type="submit"]').val(submit_txt); $(form).find('input[type="submit"]').val(submit_txt);
$(form).find('input[type="submit"]').removeAttr('disabled'); $(form).find('input[type="submit"]').removeAttr('disabled');
$(form).find('input[name="subject"],input[name="file_url"],\ $(form).find('input[name="subject"],input[name="file_url"],\
textarea[name="body"],input[type="file"]').val('').change(); textarea[name="body"],input[type="file"],input[name="embed"]').val('').change();
}, },
cache: false, cache: false,
contentType: false, contentType: false,
@ -123,7 +123,7 @@ $(window).ready(function() {
$(form).find('input[type="submit"]').val(submit_txt); $(form).find('input[type="submit"]').val(submit_txt);
$(form).find('input[type="submit"]').removeAttr('disabled'); $(form).find('input[type="submit"]').removeAttr('disabled');
$(form).find('input[name="subject"],input[name="file_url"],\ $(form).find('input[name="subject"],input[name="file_url"],\
textarea[name="body"],input[type="file"]').val('').change(); textarea[name="body"],input[type="file"],input[name="embed"]').val('').change();
} else { } else {
alert(_('An unknown error occured when posting!')); alert(_('An unknown error occured when posting!'));
$(form).find('input[type="submit"]').val(submit_txt); $(form).find('input[type="submit"]').val(submit_txt);