4e8d4456cfa02a67d8f9a7631712d47c.yaml.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/home/kevin/Documents/Sites/anissabensalah.net/system/blueprints/user/account.yaml',
  5. 'modified' => 1544136609,
  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. 'autocomplete' => 'new-password',
  49. 'validate' => [
  50. 'required' => false,
  51. 'message' => 'PLUGIN_ADMIN.PASSWORD_VALIDATION_MESSAGE',
  52. 'config-pattern@' => 'system.pwd_regex'
  53. ]
  54. ],
  55. 'fullname' => [
  56. 'type' => 'text',
  57. 'size' => 'large',
  58. 'label' => 'PLUGIN_ADMIN.FULL_NAME',
  59. 'validate' => [
  60. 'required' => true
  61. ]
  62. ],
  63. 'title' => [
  64. 'type' => 'text',
  65. 'size' => 'large',
  66. 'label' => 'PLUGIN_ADMIN.TITLE'
  67. ],
  68. 'language' => [
  69. 'type' => 'select',
  70. 'label' => 'PLUGIN_ADMIN.LANGUAGE',
  71. 'size' => 'medium',
  72. 'classes' => 'fancy',
  73. 'data-options@' => '\\Grav\\Plugin\\Admin\\Admin::adminLanguages',
  74. 'default' => 'en',
  75. 'help' => 'PLUGIN_ADMIN.LANGUAGE_HELP'
  76. ],
  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. ],
  86. 'twofa_enabled' => [
  87. 'type' => 'toggle',
  88. 'label' => 'PLUGIN_ADMIN.2FA_ENABLED',
  89. 'classes' => 'twofa-toggle',
  90. 'highlight' => 1,
  91. 'default' => 0,
  92. 'options' => [
  93. 1 => 'PLUGIN_ADMIN.YES',
  94. 0 => 'PLUGIN_ADMIN.NO'
  95. ],
  96. 'validate' => [
  97. 'type' => 'bool'
  98. ]
  99. ],
  100. 'twofa_secret' => [
  101. 'type' => '2fa_secret',
  102. 'outerclasses' => 'twofa-secret',
  103. 'markdown' => true,
  104. 'label' => 'PLUGIN_ADMIN.2FA_SECRET',
  105. 'sublabel' => 'PLUGIN_ADMIN.2FA_SECRET_HELP'
  106. ]
  107. ]
  108. ],
  109. 'security' => [
  110. 'title' => 'PLUGIN_ADMIN.ACCESS_LEVELS',
  111. 'type' => 'section',
  112. 'security' => 'admin.super',
  113. 'underline' => true,
  114. 'fields' => [
  115. 'groups' => [
  116. 'type' => 'select',
  117. 'multiple' => true,
  118. 'size' => 'large',
  119. 'label' => 'PLUGIN_ADMIN.GROUPS',
  120. 'data-options@' => '\\Grav\\Common\\User\\Group::groupNames',
  121. 'classes' => 'fancy',
  122. 'help' => 'PLUGIN_ADMIN.GROUPS_HELP',
  123. 'validate' => [
  124. 'type' => 'commalist'
  125. ]
  126. ],
  127. 'access' => [
  128. 'type' => 'permissions',
  129. 'label' => 'PLUGIN_ADMIN.PERMISSIONS',
  130. 'ignore_empty' => true,
  131. 'validate' => [
  132. 'type' => 'array'
  133. ]
  134. ]
  135. ]
  136. ]
  137. ]
  138. ]
  139. ]
  140. ];