Guest User

Untitled

a guest
Jun 6th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. dojo.provide("website.forms.RegistrationForm");
  2. dojo.require("dijit._Widget");
  3. dojo.require("dijit._Templated");
  4. dojo.require("dijit.form.Form");
  5. dojo.require("dijit.form.ValidationTextBox");
  6. dojo.require("dijit.form.FilteringSelect");
  7. dojo.require("dojo.data.ItemFileReadStore");
  8.  
  9. dojo.declare("website.forms.RegistrationForm", [dijit._Widget, dijit._Templated],
  10. {
  11. isContainer: true,
  12. widgetsInTemplate: true,
  13. 'class': 'tundra',
  14. store: null,
  15. value: '',
  16. pageSize: 10,
  17. searchAttr: 'registration',
  18. autoComplete: false,
  19. 'name': 'registrationForm',
  20. templatePath: dojo.moduleUrl("website", "forms/templates/registrationForm.html"),
  21.  
  22.  
  23. username: null,
  24. password: null,
  25. password_retype: null,
  26. country: null,
  27.  
  28. postCreate: function()
  29. {
  30. this.inherited(arguments);
  31. dijit.byId("username").validator = this.checkLength;
  32. },
  33. checkPassword: function(value, constraints)
  34. {
  35. return value == password.attr('value');
  36. },
  37. checkLength: function(value, constraints)
  38. {
  39. return value.length >= constraints.min && value.length <= constraints.max;
  40. }
  41. });
Add Comment
Please, Sign In to add comment