account.yaml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. content_editor:
  60. type: select
  61. label: PLUGIN_ADMIN.CONTENT_EDITOR
  62. size: medium
  63. classes: fancy
  64. data-options@: 'Grav\Plugin\Admin\Admin::contentEditor'
  65. default: 'default'
  66. help: PLUGIN_ADMIN.CONTENT_EDITOR_HELP
  67. twofa_check:
  68. type: conditional
  69. condition: config.plugins.admin.twofa_enabled
  70. fields:
  71. twofa:
  72. title: PLUGIN_ADMIN.2FA_TITLE
  73. type: section
  74. underline: true
  75. twofa_enabled:
  76. type: toggle
  77. label: PLUGIN_ADMIN.2FA_ENABLED
  78. classes: twofa-toggle
  79. highlight: 1
  80. default: 0
  81. options:
  82. 1: PLUGIN_ADMIN.YES
  83. 0: PLUGIN_ADMIN.NO
  84. validate:
  85. type: bool
  86. twofa_secret:
  87. type: 2fa_secret
  88. outerclasses: 'twofa-secret'
  89. markdown: true
  90. label: PLUGIN_ADMIN.2FA_SECRET
  91. sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
  92. security:
  93. security@: admin.super
  94. title: PLUGIN_ADMIN.ACCESS_LEVELS
  95. type: section
  96. underline: true
  97. fields:
  98. groups:
  99. security@: admin.super
  100. type: select
  101. multiple: true
  102. size: large
  103. label: PLUGIN_ADMIN.GROUPS
  104. data-options@: '\Grav\Common\User\Group::groupNames'
  105. classes: fancy
  106. help: PLUGIN_ADMIN.GROUPS_HELP
  107. validate:
  108. type: commalist
  109. access:
  110. security@: admin.super
  111. type: permissions
  112. check_authorize: true
  113. label: PLUGIN_ADMIN.PERMISSIONS
  114. ignore_empty: true
  115. validate:
  116. type: array
  117. value_type: bool