Skip to content

Commit

Permalink
* JS bugfixes for attr() -> prop().
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahaenor committed Apr 24, 2018
1 parent 44e4784 commit 3059192
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gateways/cp/js/leyka.cp.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jQuery(document).ready(function($){

// Donation form validation already passed in the main script (public.js)

var is_recurrent = $form.find('.leyka-recurring').attr('checked') ||
var is_recurring = $form.find('.leyka-recurring').prop('checked') ||
$form.find('.is-recurring-chosen').val() > 0, // For Revo template
data_array = $form.serializeArray(),
data = {action: 'leyka_ajax_donation_submit'};
Expand Down Expand Up @@ -77,7 +77,7 @@ jQuery(document).ready(function($){
var widget = new cp.CloudPayments(),
data = {};

if(is_recurrent) {
if(is_recurring) {
data.cloudPayments = {recurrent: {interval: 'Month', period: 1}};
}

Expand Down
2 changes: 1 addition & 1 deletion js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jQuery(document).ready(function($){
if($field.attr('type') == 'checkbox') {

var $required_checkbox_fields = $form.find('input[type="checkbox"].required:visible:not(:checked)');
if($field.attr('checked') !== 'checked' || $required_checkbox_fields.length) {
if( !$field.prop('checked') || $required_checkbox_fields.length) {

field_is_valid = false;
$form.find('.'+$field.attr('name')+'-error').html(leyka.checkbox_check_required).show();
Expand Down

0 comments on commit 3059192

Please sign in to comment.