qacaptcha.js 384 B

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