This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/mixins/modal-functionality.js.es6
Joffrey JAFFEUX 6f5acfe783 Login with email/forget password UI refactoring
* move button into login modal with social buttons
* adds email link next to login field when filling it
* adds proper validation messages
* improves forgot password flash clearing
* more tests
2018-02-22 08:06:15 +08:00

22 lines
421 B
JavaScript

import showModal from 'discourse/lib/show-modal';
export default Ember.Mixin.create({
flash(text, messageClass) {
this.appEvents.trigger('modal-body:flash', { text, messageClass });
},
clearFlash() {
this.appEvents.trigger('modal-body:clearFlash');
},
showModal(...args) {
return showModal(...args);
},
actions: {
closeModal() {
this.get('modal').send('closeModal');
}
}
});