useSignupForm.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. export const useSignupForm = () => {
  3. const signupSchema = [
  4. {
  5. isLayout: true,
  6. element: 'div',
  7. attrs: {
  8. class: 'grid grid-cols-2 gap-y-2.5 gap-x-3',
  9. },
  10. children: [
  11. {
  12. name: 'firstname',
  13. label: __('First name'),
  14. type: 'text',
  15. outerClass: 'col-span-1',
  16. props: {
  17. maxLength: 150,
  18. },
  19. },
  20. {
  21. name: 'lastname',
  22. label: __('Last name'),
  23. type: 'text',
  24. outerClass: 'col-span-1',
  25. props: {
  26. maxLength: 150,
  27. },
  28. },
  29. {
  30. name: 'email',
  31. label: __('Email'),
  32. type: 'email',
  33. validation: 'email',
  34. outerClass: 'col-span-2',
  35. props: {
  36. maxLength: 150,
  37. },
  38. required: true,
  39. },
  40. {
  41. name: 'password',
  42. label: __('Password'),
  43. type: 'password',
  44. outerClass: 'col-span-1',
  45. props: {
  46. maxLength: 1001,
  47. },
  48. required: true,
  49. },
  50. {
  51. name: 'password_confirm',
  52. label: __('Confirm password'),
  53. type: 'password',
  54. validation: 'confirm',
  55. outerClass: 'col-span-1',
  56. props: {
  57. maxLength: 1001,
  58. },
  59. required: true,
  60. },
  61. ],
  62. },
  63. ]
  64. return {
  65. signupSchema,
  66. }
  67. }