From c7ca81c3c3b91de4c59c8fd59ac582713047b63b Mon Sep 17 00:00:00 2001 From: niftylettuce Date: Tue, 14 Jan 2020 00:54:12 -0600 Subject: [PATCH] feat: hide modal if hideModal in body is true --- src/ajax-form.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ajax-form.js b/src/ajax-form.js index 256899f..ec9e109 100644 --- a/src/ajax-form.js +++ b/src/ajax-form.js @@ -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();