Skip to content

Commit

Permalink
Fix - js error in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
deepench committed Aug 18, 2023
1 parent 417aa41 commit c69f257
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
12 changes: 9 additions & 3 deletions assets/js/frontend/ajax-submission.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ jQuery( function( $ ) {
}

if (formTuple.find( ".everest-forms-gateway[data-gateway='stripe']").hasClass('StripeElement--empty') && $(".evf-field-credit-card ").is(':visible') ){
$( '#card-errors' ).html( 'This field is required' ).show();
$(document).ready(function() {
$('#card-errors').html('This field is required').show();
$('.evf-submit').text('Submit');
$('.evf-submit').attr('disabled', false);

});
formTuple.trigger( 'focusout' ).trigger( 'change' ).trigger( 'submit' );
return false;
}

Expand Down Expand Up @@ -47,7 +53,7 @@ jQuery( function( $ ) {
const authorizeNetAjaxSubmitHandlerPromise = new Promise(function (resolve, reject) {
window.EverestFormsAuthorizeNet.authorizeNetAjaxSubmitHandler(v).then(resolve).catch(reject);
});

try {
const response = await authorizeNetAjaxSubmitHandlerPromise;

Expand All @@ -60,7 +66,7 @@ jQuery( function( $ ) {
} catch (error) {
return;
}

}

if (errors.length < 1) {
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/ajax-submission.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions languages/everest-forms.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2023-08-17T12:37:49+02:00\n"
"POT-Creation-Date: 2023-08-18T12:29:10+02:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.8.1\n"
"X-Domain: everest-forms\n"
Expand Down Expand Up @@ -1093,7 +1093,7 @@ msgid "Enter the subject of the email. <a href=\"%1$s\" target=\"_blank\">Learn
msgstr ""

#: includes/admin/builder/class-evf-builder-settings.php:567
msgid "Enable email prompt"
msgid "Enable Email Prompt"
msgstr ""

#: includes/admin/builder/class-evf-builder-settings.php:581
Expand All @@ -1102,8 +1102,7 @@ msgstr ""

#. translators: %1$s - general settings docs url
#: includes/admin/builder/class-evf-builder-settings.php:586
#: includes/admin/builder/class-evf-builder-settings.php:608
msgid "Enter the message of the email. <a href=\"%1$s\" target=\"_blank\">Learn More</a>"
msgid "Enter the email message prompt. <a href=\"%1$s\" target=\"_blank\">Learn More</a>"
msgstr ""

#: includes/admin/builder/class-evf-builder-settings.php:604
Expand All @@ -1114,6 +1113,11 @@ msgstr ""
msgid "{all_fields}"
msgstr ""

#. translators: %1$s - general settings docs url
#: includes/admin/builder/class-evf-builder-settings.php:608
msgid "Enter the message of the email. <a href=\"%1$s\" target=\"_blank\">Learn More</a>"
msgstr ""

#. translators: %s - all fields smart tag.
#: includes/admin/builder/class-evf-builder-settings.php:616
msgid "To display all form fields, use the %s Smart Tag."
Expand Down

0 comments on commit c69f257

Please sign in to comment.