account.yaml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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: 'account://avatars'
  12. multiple: false
  13. random_name: true
  14. multiavatar_only:
  15. type: conditional
  16. condition: config.system.accounts.avatar == 'multiavatar'
  17. fields:
  18. avatar_hash:
  19. type: text
  20. label: ''
  21. placeholder: 'e.g. dceaadcfda491f4e45'
  22. description: PLUGIN_ADMIN.AVATAR_HASH
  23. size: large
  24. content:
  25. type: section
  26. title: PLUGIN_ADMIN.ACCOUNT
  27. underline: true
  28. username:
  29. type: text
  30. size: large
  31. label: PLUGIN_ADMIN.USERNAME
  32. disabled: true
  33. readonly: true
  34. email:
  35. type: email
  36. size: large
  37. label: PLUGIN_ADMIN.EMAIL
  38. validate:
  39. type: email
  40. message: PLUGIN_ADMIN.EMAIL_VALIDATION_MESSAGE
  41. required: true
  42. password:
  43. type: password
  44. size: large
  45. label: PLUGIN_ADMIN.PASSWORD
  46. autocomplete: new-password
  47. validate:
  48. required: false
  49. message: PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE
  50. config-pattern@: system.pwd_regex
  51. fullname:
  52. type: text
  53. size: large
  54. label: PLUGIN_ADMIN.FULL_NAME
  55. validate:
  56. required: true
  57. title:
  58. type: text
  59. size: large
  60. label: PLUGIN_ADMIN.TITLE
  61. language:
  62. type: select
  63. label: PLUGIN_ADMIN.LANGUAGE
  64. size: medium
  65. classes: fancy
  66. data-options@: '\Grav\Plugin\Admin\Admin::adminLanguages'
  67. default: 'en'
  68. help: PLUGIN_ADMIN.LANGUAGE_HELP
  69. content_editor:
  70. type: select
  71. label: PLUGIN_ADMIN.CONTENT_EDITOR
  72. size: medium
  73. classes: fancy
  74. data-options@: 'Grav\Plugin\Admin\Admin::contentEditor'
  75. default: 'default'
  76. help: PLUGIN_ADMIN.CONTENT_EDITOR_HELP
  77. twofa_check:
  78. type: conditional
  79. condition: config.plugins.admin.twofa_enabled
  80. fields:
  81. twofa:
  82. title: PLUGIN_ADMIN.2FA_TITLE
  83. type: section
  84. underline: true
  85. twofa_enabled:
  86. type: toggle
  87. label: PLUGIN_ADMIN.2FA_ENABLED
  88. classes: twofa-toggle
  89. highlight: 1
  90. default: 0
  91. options:
  92. 1: PLUGIN_ADMIN.YES
  93. 0: PLUGIN_ADMIN.NO
  94. validate:
  95. type: bool
  96. twofa_secret:
  97. type: 2fa_secret
  98. outerclasses: 'twofa-secret'
  99. markdown: true
  100. label: PLUGIN_ADMIN.2FA_SECRET
  101. sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
  102. yubikey_id:
  103. type: text
  104. label: PLUGIN_ADMIN.YUBIKEY_ID
  105. description: PLUGIN_ADMIN.YUBIKEY_HELP
  106. size: small
  107. maxlength: 12
  108. security:
  109. security@: admin.super
  110. title: PLUGIN_ADMIN.ACCESS_LEVELS
  111. type: section
  112. underline: true
  113. fields:
  114. groups:
  115. security@: admin.super
  116. type: select
  117. multiple: true
  118. size: large
  119. label: PLUGIN_ADMIN.GROUPS
  120. data-options@: 'Grav\Common\Flex\Types\UserGroups\UserGroupObject::groupNames'
  121. classes: fancy
  122. help: PLUGIN_ADMIN.GROUPS_HELP
  123. validate:
  124. type: commalist
  125. access:
  126. security@: admin.super
  127. type: permissions
  128. check_authorize: true
  129. label: PLUGIN_ADMIN.PERMISSIONS
  130. ignore_empty: true
  131. validate:
  132. type: array
  133. value_type: bool