account.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. markdown: true
  82. label: PLUGIN_ADMIN.2FA_SECRET
  83. sublabel: PLUGIN_ADMIN.2FA_SECRET_HELP
  84. security:
  85. security@: admin.super
  86. title: PLUGIN_ADMIN.ACCESS_LEVELS
  87. type: section
  88. underline: true
  89. fields:
  90. groups:
  91. security@: admin.super
  92. type: select
  93. multiple: true
  94. size: large
  95. label: PLUGIN_ADMIN.GROUPS
  96. data-options@: '\Grav\Common\User\Group::groupNames'
  97. classes: fancy
  98. help: PLUGIN_ADMIN.GROUPS_HELP
  99. validate:
  100. type: commalist
  101. access:
  102. security@: admin.super
  103. type: permissions
  104. label: PLUGIN_ADMIN.PERMISSIONS
  105. ignore_empty: true
  106. validate:
  107. type: array