new.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. rules:
  2. slug:
  3. pattern: "[a-z][a-z0-9_\-]+"
  4. min: 2
  5. max: 80
  6. form:
  7. validation: loose
  8. fields:
  9. section:
  10. type: section
  11. title: PLUGIN_ADMIN.ADD_PAGE
  12. title:
  13. type: text
  14. label: PLUGIN_ADMIN.PAGE_TITLE
  15. help: PLUGIN_ADMIN.PAGE_TITLE_HELP
  16. validate:
  17. required: true
  18. folder:
  19. type: text
  20. label: PLUGIN_ADMIN.FOLDER_NAME
  21. help: PLUGIN_ADMIN.FOLDER_NAME_HELP
  22. validate:
  23. type: slug
  24. required: true
  25. route:
  26. type: select
  27. label: PLUGIN_ADMIN.PARENT_PAGE
  28. classes: fancy
  29. '@data-options': '\Grav\Common\Page\Pages::parents'
  30. '@data-default': '\Grav\Plugin\admin::getLastPageRoute'
  31. options:
  32. '/': PLUGIN_ADMIN.DEFAULT_OPTION_ROOT
  33. validate:
  34. required: true
  35. name:
  36. type: select
  37. classes: fancy
  38. label: PLUGIN_ADMIN.PAGE_FILE
  39. help: PLUGIN_ADMIN.PAGE_FILE_HELP
  40. '@data-options': '\Grav\Common\Page\Pages::types'
  41. '@data-default': '\Grav\Plugin\admin::getLastPageName'
  42. validate:
  43. required: true
  44. visible:
  45. type: toggle
  46. label: PLUGIN_ADMIN.VISIBLE
  47. help: PLUGIN_ADMIN.VISIBLE_HELP
  48. highlight: ''
  49. default: ''
  50. options:
  51. '': Auto
  52. 1: PLUGIN_ADMIN.YES
  53. 0: PLUGIN_ADMIN.NO
  54. validate:
  55. type: bool
  56. required: true
  57. blueprint:
  58. type: blueprint