bb3f01a7e545b0c55423ca7d4d914284.yaml.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/mnt/data/Sites/static-ethica.net/system/blueprints/user/account.yaml',
  5. 'modified' => 1520021421,
  6. 'data' => [
  7. 'title' => 'Account',
  8. 'form' => [
  9. 'validation' => 'loose',
  10. 'fields' => [
  11. 'info' => [
  12. 'type' => 'userinfo',
  13. 'size' => 'large'
  14. ],
  15. 'avatar' => [
  16. 'type' => 'file',
  17. 'size' => 'large',
  18. 'destination' => 'user://accounts/avatars',
  19. 'multiple' => false,
  20. 'random_name' => true
  21. ],
  22. 'content' => [
  23. 'type' => 'section',
  24. 'title' => 'PLUGIN_ADMIN.ACCOUNT',
  25. 'underline' => true
  26. ],
  27. 'username' => [
  28. 'type' => 'text',
  29. 'size' => 'large',
  30. 'label' => 'PLUGIN_ADMIN.USERNAME',
  31. 'disabled' => true,
  32. 'readonly' => true
  33. ],
  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. ]
  43. ],
  44. 'password' => [
  45. 'type' => 'password',
  46. 'size' => 'large',
  47. 'label' => 'PLUGIN_ADMIN.PASSWORD',
  48. 'validate' => [
  49. 'required' => false,
  50. 'message' => 'PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE',
  51. 'config-pattern@' => 'system.pwd_regex'
  52. ]
  53. ],
  54. 'fullname' => [
  55. 'type' => 'text',
  56. 'size' => 'large',
  57. 'label' => 'PLUGIN_ADMIN.FULL_NAME',
  58. 'validate' => [
  59. 'required' => true
  60. ]
  61. ],
  62. 'title' => [
  63. 'type' => 'text',
  64. 'size' => 'large',
  65. 'label' => 'PLUGIN_ADMIN.TITLE'
  66. ],
  67. 'language' => [
  68. 'type' => 'select',
  69. 'label' => 'PLUGIN_ADMIN.LANGUAGE',
  70. 'size' => 'medium',
  71. 'classes' => 'fancy',
  72. 'data-options@' => '\\Grav\\Plugin\\Admin\\Admin::adminLanguages',
  73. 'default' => 'en',
  74. 'help' => 'PLUGIN_ADMIN.LANGUAGE_HELP'
  75. ],
  76. 'twofa_check' => [
  77. 'type' => 'conditional',
  78. 'condition' => 'config.plugins.admin.twofa_enabled',
  79. 'fields' => [
  80. 'twofa' => [
  81. 'title' => 'PLUGIN_ADMIN.2FA_TITLE',
  82. 'type' => 'section',
  83. 'underline' => true
  84. ],
  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. ],
  95. 'validate' => [
  96. 'type' => 'bool'
  97. ]
  98. ],
  99. 'twofa_secret' => [
  100. 'type' => '2fa_secret',
  101. 'outerclasses' => 'twofa-secret',
  102. 'label' => 'PLUGIN_ADMIN.2FA_SECRET',
  103. 'sublabel' => 'PLUGIN_ADMIN.2FA_SECRET_HELP'
  104. ]
  105. ]
  106. ],
  107. 'security' => [
  108. 'title' => 'PLUGIN_ADMIN.ACCESS_LEVELS',
  109. 'type' => 'section',
  110. 'security' => 'admin.super',
  111. 'underline' => true,
  112. 'fields' => [
  113. 'groups' => [
  114. 'type' => 'select',
  115. 'multiple' => true,
  116. 'size' => 'large',
  117. 'label' => 'PLUGIN_ADMIN.GROUPS',
  118. 'data-options@' => '\\Grav\\Common\\User\\Group::groupNames',
  119. 'classes' => 'fancy',
  120. 'help' => 'PLUGIN_ADMIN.GROUPS_HELP',
  121. 'validate' => [
  122. 'type' => 'commalist'
  123. ]
  124. ],
  125. 'access' => [
  126. 'type' => 'permissions',
  127. 'label' => 'PLUGIN_ADMIN.PERMISSIONS',
  128. 'ignore_empty' => true,
  129. 'validate' => [
  130. 'type' => 'array'
  131. ]
  132. ]
  133. ]
  134. ]
  135. ]
  136. ]
  137. ]
  138. ];