Files
edx-platform/lms/static/js/student_account/views/PasswordResetView.js
Jillian Vogel 71ba54a963 Updates combined Register, Login, and Password Reset views as per new design
* Reorders form fields, and updates labels, placeholders, and tip text
* Increases clickable area for links and labels.
* Removes "*" markers from required fields, and instead adds
  "(optional)" labels to visible optional fields.
* Updates font colors and sizes, and removes box shadows
* Adds custom drop-down styles
* Improves responsive design scaling for small screens
* Make Terms of Service and Honor Code open in new window to avoid losing form
  field values.
2017-05-12 09:18:36 -04:00

40 lines
1.1 KiB
JavaScript

(function(define) {
'use strict';
define([
'jquery',
'js/student_account/views/FormView'
],
function($, FormView) {
return FormView.extend({
el: '#password-reset-form',
tpl: '#password_reset-tpl',
events: {
'click .js-reset': 'submitForm'
},
formType: 'password-reset',
requiredStr: '',
optionalStr: '',
submitButton: '.js-reset',
preRender: function() {
this.element.show($(this.el));
this.element.show($(this.el).parent());
this.listenTo(this.model, 'sync', this.saveSuccess);
},
saveSuccess: function() {
this.trigger('password-email-sent');
// Destroy the view (but not el) and unbind events
this.$el.empty().off();
this.stopListening();
}
});
});
}).call(this, define || RequireJS.define);