account.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. title: Account
  2. form:
  3. validation: loose
  4. fields:
  5. info:
  6. type: userinfo
  7. size: large
  8. avatar:
  9. type: file
  10. size: large
  11. destination: 'user://accounts/avatars'
  12. multiple: false
  13. random_name: true
  14. content:
  15. type: section
  16. title: PLUGIN_ADMIN.ACCOUNT
  17. underline: true
  18. username:
  19. type: text
  20. size: large
  21. label: PLUGIN_ADMIN.USERNAME
  22. disabled: true
  23. readonly: true
  24. email:
  25. type: email
  26. size: large
  27. label: PLUGIN_ADMIN.EMAIL
  28. validate:
  29. type: email
  30. message: PLUGIN_ADMIN.EMAIL_VALIDATION_MESSAGE
  31. required: true
  32. password:
  33. type: password
  34. size: large
  35. label: PLUGIN_ADMIN.PASSWORD
  36. autocomplete: new-password
  37. validate:
  38. required: false
  39. message: PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE
  40. config-pattern@: system.pwd_regex
  41. fullname:
  42. type: text
  43. size: large
  44. label: PLUGIN_ADMIN.FULL_NAME
  45. validate:
  46. required: true
  47. title:
  48. type: text
  49. size: large
  50. label: PLUGIN_ADMIN.TITLE
  51. language:
  52. type: select
  53. label: PLUGIN_ADMIN.LANGUAGE
  54. size: medium
  55. classes: fancy
  56. data-options@: '\Grav\Plugin\Admin\Admin::adminLanguages'
  57. default: 'en'
  58. help: PLUGIN_ADMIN.LANGUAGE_HELP
  59. twofa_check:
  60. type: conditional
  61. condition: config.plugins.admin.twofa_enabled
  62. fields:
  63. twofa:
  64. title: PLUGIN_ADMIN.2FA_TITLE
  65. type: section
  66. underline: true
  67. twofa_enabled:
  68. type: toggle
  69. label: PLUGIN_ADMIN.2FA_ENABLED
  70. classes: twofa-toggle
  71. highlight: 1
  72. default: 0
  73. options:
  74. 1: PLUGIN_ADMIN.YES
  75. 0: PLUGIN_ADMIN.NO
  76. validate:
  77. type: bool
  78. twofa_secret:
  79. type: 2fa_secret
  80. outerclasses: 'twofa-secret'
  81. label: PLUGIN_ADMIN.2FA_SECRET
  82. sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
  83. security:
  84. title: PLUGIN_ADMIN.ACCESS_LEVELS
  85. type: section
  86. security: admin.super
  87. underline: true
  88. fields:
  89. groups:
  90. type: select
  91. multiple: true
  92. size: large
  93. label: PLUGIN_ADMIN.GROUPS
  94. data-options@: '\Grav\Common\User\Group::groupNames'
  95. classes: fancy
  96. help: PLUGIN_ADMIN.GROUPS_HELP
  97. validate:
  98. type: commalist
  99. access:
  100. type: permissions
  101. label: PLUGIN_ADMIN.PERMISSIONS
  102. ignore_empty: true
  103. validate:
  104. type: array