243a0093d4a4af084bc57cadbeee3a8c.yaml.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. return [
  3. '@class' => 'Grav\\Common\\File\\CompiledYamlFile',
  4. 'filename' => '/mnt/data/Sites/anissabensalah.net/system/blueprints/user/account.yaml',
  5. 'modified' => 1526367498,
  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. 'label' => 'PLUGIN_ADMIN.2FA_SECRET',
  104. 'sublabel' => 'PLUGIN_ADMIN.2FA_SECRET_HELP'
  105. ]
  106. ]
  107. ],
  108. 'security' => [
  109. 'title' => 'PLUGIN_ADMIN.ACCESS_LEVELS',
  110. 'type' => 'section',
  111. 'security' => 'admin.super',
  112. 'underline' => true,
  113. 'fields' => [
  114. 'groups' => [
  115. 'type' => 'select',
  116. 'multiple' => true,
  117. 'size' => 'large',
  118. 'label' => 'PLUGIN_ADMIN.GROUPS',
  119. 'data-options@' => '\\Grav\\Common\\User\\Group::groupNames',
  120. 'classes' => 'fancy',
  121. 'help' => 'PLUGIN_ADMIN.GROUPS_HELP',
  122. 'validate' => [
  123. 'type' => 'commalist'
  124. ]
  125. ],
  126. 'access' => [
  127. 'type' => 'permissions',
  128. 'label' => 'PLUGIN_ADMIN.PERMISSIONS',
  129. 'ignore_empty' => true,
  130. 'validate' => [
  131. 'type' => 'array'
  132. ]
  133. ]
  134. ]
  135. ]
  136. ]
  137. ]
  138. ]
  139. ];