mirror of
https://github.com/flarum/core.git
synced 2025-10-12 23:44:27 +02:00
Signup + modal refactoring
This commit is contained in:
@@ -6,22 +6,35 @@ export default Ember.Route.extend(ApplicationRouteMixin, {
|
||||
actions: {
|
||||
login: function() {
|
||||
this.controllerFor('login').set('error', null);
|
||||
this.render('login', {
|
||||
this.send('showModal', 'login');
|
||||
},
|
||||
|
||||
signup: function() {
|
||||
this.controllerFor('signup').set('error', null);
|
||||
this.send('showModal', 'signup');
|
||||
},
|
||||
|
||||
showModal: function(name) {
|
||||
this.render(name, {
|
||||
into: 'application',
|
||||
outlet: 'modal'
|
||||
});
|
||||
this.controllerFor('application').set('modalController', this.controllerFor(name));
|
||||
},
|
||||
|
||||
closeModal: function() {
|
||||
this.controllerFor('application').set('modalController', null);
|
||||
},
|
||||
|
||||
destroyModal: function() {
|
||||
this.disconnectOutlet({
|
||||
outlet: 'modal',
|
||||
parentView: 'application'
|
||||
});
|
||||
},
|
||||
|
||||
sessionChanged: function() {
|
||||
sessionChanged: function() {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user