Skip to content

Commit

Permalink
feat: hide modal if hideModal in body is true
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Jan 14, 2020
1 parent 445700d commit c7ca81c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ajax-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const ajaxForm = async ev => {
'success'
);
}

if (_.isBoolean(res.body.hideModal) && res.body.hideModal)
$form.parents('.modal.in:first').modal('hide');
} catch (err) {
// Hide the spinner
spinner.hide();
Expand Down

0 comments on commit c7ca81c

Please sign in to comment.