index.js 732 B

12345678910111213141516171819202122232425262728293031
  1. import MisagoRoute from 'misago/routes/misago';
  2. export default MisagoRoute.extend({
  3. formTitle: gettext('Request activation link'),
  4. formTemplate: 'activation.request-link',
  5. sentTitle: gettext('Activation link sent'),
  6. sentTemplate: 'activation.link-sent',
  7. renderTemplate: function() {
  8. this.render(this.get('formTemplate'));
  9. },
  10. actions: {
  11. didTransition: function() {
  12. this.set('title', this.get('formTitle'));
  13. },
  14. showSentPage: function(linkRecipient) {
  15. this.set('title', this.get('sentTitle'));
  16. this.render(this.get('sentTemplate'), {
  17. model: linkRecipient
  18. });
  19. },
  20. retry: function() {
  21. this.send('didTransition');
  22. this.renderTemplate();
  23. }
  24. }
  25. });