qacaptcha.js 411 B

123456789101112131415161718192021
  1. import Ember from 'ember';
  2. import NoCaptcha from 'misago/services/nocaptcha';
  3. export default NoCaptcha.extend({
  4. field: 'qacaptcha-field',
  5. model: null,
  6. value: '',
  7. load: function() {
  8. // Obtain QA question from API
  9. var promise = this.store.find('captcha-question', 1);
  10. var self = this;
  11. promise.then(function(model) {
  12. self.set('model', model);
  13. });
  14. return promise;
  15. }
  16. });