diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js index 61210a1cc2..aeb43eb927 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver.js @@ -70,25 +70,26 @@ define(function(require) { this.userCreation.setup(context); - context.foundation('abide', 'reflow'); - context.off('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form'); - context.off('valid.fndtn.abide', '#' + DIALOG_ID + 'Form'); + Foundation.reflow(context, 'abide'); - context.on('invalid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); - }).on('valid.fndtn.abide', '#' + DIALOG_ID + 'Form', function(e) { - var inputs = that.userCreation.retrieve(context); + $('#' + DIALOG_ID + 'Form') + .on('forminvalid.zf.abide', function(ev, frm) { + Notifier.notifyError(Locale.tr("One or more required fields are missing or malformed.")); + }) + .on('formvalid.zf.abide', function(ev, frm) { + var inputs = that.userCreation.retrieve(context); - var selElems = Sunstone.getDataTable(TAB_ID).elements(); + var selElems = Sunstone.getDataTable(TAB_ID).elements(); - Sunstone.runAction('User.chauth', selElems, inputs.auth_driver); + Sunstone.runAction('User.chauth', selElems, inputs.auth_driver); - Sunstone.getDialog(DIALOG_ID).hide(); - Sunstone.getDialog(DIALOG_ID).reset(); - Sunstone.runAction('User.refresh'); - - return false; - }); + Sunstone.getDialog(DIALOG_ID).hide(); + Sunstone.getDialog(DIALOG_ID).reset(); + Sunstone.runAction('User.refresh'); + }) + .on("submit", function(ev) { + ev.preventDefault(); + }); return false; } diff --git a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs index 5c13a9406a..e824f6b374 100644 --- a/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs +++ b/src/sunstone/public/app/tabs/users-tab/dialogs/auth-driver/html.hbs @@ -14,7 +14,7 @@ {{! limitations under the License. }} {{! -------------------------------------------------------------------------- }} -