account.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. profession:
  48. type: text
  49. size: large
  50. label: Profession
  51. title:
  52. type: text
  53. size: large
  54. label: PLUGIN_ADMIN.TITLE
  55. language:
  56. type: select
  57. label: PLUGIN_ADMIN.LANGUAGE
  58. size: medium
  59. classes: fancy
  60. data-options@: '\Grav\Plugin\Admin\Admin::adminLanguages'
  61. default: 'en'
  62. help: PLUGIN_ADMIN.LANGUAGE_HELP
  63. twofa_check:
  64. type: conditional
  65. condition: config.plugins.admin.twofa_enabled
  66. fields:
  67. twofa:
  68. title: PLUGIN_ADMIN.2FA_TITLE
  69. type: section
  70. underline: true
  71. twofa_enabled:
  72. type: toggle
  73. label: PLUGIN_ADMIN.2FA_ENABLED
  74. classes: twofa-toggle
  75. highlight: 1
  76. default: 0
  77. options:
  78. 1: PLUGIN_ADMIN.YES
  79. 0: PLUGIN_ADMIN.NO
  80. validate:
  81. type: bool
  82. twofa_secret:
  83. type: 2fa_secret
  84. outerclasses: 'twofa-secret'
  85. markdown: true
  86. label: PLUGIN_ADMIN.2FA_SECRET
  87. sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
  88. security:
  89. title: PLUGIN_ADMIN.ACCESS_LEVELS
  90. type: section
  91. security: admin.super
  92. underline: true
  93. fields:
  94. groups:
  95. type: select
  96. multiple: true
  97. size: large
  98. label: PLUGIN_ADMIN.GROUPS
  99. data-options@: '\Grav\Common\User\Group::groupNames'
  100. classes: fancy
  101. help: PLUGIN_ADMIN.GROUPS_HELP
  102. validate:
  103. type: commalist
  104. access:
  105. type: permissions
  106. label: PLUGIN_ADMIN.PERMISSIONS
  107. ignore_empty: true
  108. validate:
  109. type: array