Feature #4363: Fix user auth dialog

This commit is contained in:
Daniel Molina committed 2016-03-07 16:58:03 +01:00
1 parent 95a7b64467
commit e646d6f2e1
2 files changed
+20 -17

No files matched your search

@@ -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;
}
@@ -14,7 +14,7 @@
{{! limitations under the License. }}
{{! -------------------------------------------------------------------------- }}
<div id="{{dialogId}}" class="reveal-modal" role="dialog" data-reveal >
<div id="{{dialogId}}" class="reveal" role="dialog" data-reveal>
<div class="row">
<h3 class="subheader">{{tr "Change authentication"}}</h3>
</div>
@@ -29,6 +29,8 @@
{{tr "Change"}}
</button>
</div>
<a class="close-reveal-modal">&#215;</a>
<button class="close-button" data-close aria-label="{{tr "Close modal"}}" type="button">
<span aria-hidden="true">&times;</span>
</button>
</form>
</div>