Skip to content

Commit

Permalink
Changes for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
imkingdavid committed May 8, 2020
1 parent 985ca82 commit a11e254
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@ function serializeURLParams(obj, prefix) {
return str.join('&');
}

/**
* @param {DOMElement} context DOM context to use
*/
function showMinimumFrequencyWarning(context) {
$(context).siblings('.error').empty();
var enteredVal = parseInt($(context).val());
var minAllowed = parseInt($(context).attr('min'));
if (enteredVal < minAllowed) {
var plural = enteredVal !== 1;
$(context).siblings('.error').append('<p>You have selected to receive this product every ' + enteredVal + ' day' + (plural ? 's' : '') + '. If this is not correct, please update your Auto-Ship frequency.</p>');
}
}

var subscriptionOptions = {
cartInit: function () {
if (!$('body').find('.subpro-options.cart').length) {
Expand Down Expand Up @@ -172,17 +185,4 @@ function ajaxUpdateOptions(target, page) {
});
}

/**
* @param {DOMElement} context
*/
function showMinimumFrequencyWarning(context) {
$(context).siblings('.error').empty();
var enteredVal = parseInt($(context).val());
var minAllowed = parseInt($(context).attr('min'));
if (enteredVal < minAllowed) {
var plural = enteredVal !== 1;
$(context).siblings('.error').append('<p>You have selected to receive this product every ' + enteredVal + ' day' + (plural ? 's' : '') + '. If this is not correct, please update your Auto-Ship frequency.</p>');
}
}

module.exports = subscriptionOptions;
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

.delivery-interval-group #delivery-periods {
max-width: 50px;
}
}

0 comments on commit a11e254

Please sign in to comment.