mostly filebased Content Presentation System
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <form action="{{ @target }}" method="post">
  2. <repeat group="{{ @fields }}" key="{{ @name }}" value="{{ @info }}">
  3. <check if="{{ in_array(@info.type,['text','email']) }}">
  4. <true>
  5. <input
  6. name="{{ @name }}"
  7. id="{{ @name }}"
  8. type="{{ @info.type }}"
  9. size="{{ @info.length }}"
  10. value="{{ @info.value }}"
  11. {{ @info.required ? 'required' : '' }} />
  12. <label for="{{ @name }}">{{ @info.description }}</label><br>
  13. </true>
  14. </check>
  15. <check if="{{ @info.type == 'hidden' }}">
  16. <true>
  17. <input
  18. name="{{ @name }}"
  19. id="{{ @name }}"
  20. type="hidden"
  21. value="{{ @info.value }}"/>
  22. </true>
  23. </check>
  24. <check if="{{ @info.type == 'textarea' }}">
  25. <true>
  26. <textarea
  27. name="{{ @name }}"
  28. id="{{ @name }}"
  29. cols="{{ @info.cols }}"
  30. rows="{{ @info.rows }}" >{{ @info.value }}</textarea>
  31. <label for="{{ @name }}">{{ @info.description }}</label><br>
  32. </true>
  33. </check>
  34. <check if="{{ @info.type == 'checkbox' }}">
  35. <true>
  36. <repeat group="{{ @info.options }}" key="{{ @key }}" value="{{ @val }}">
  37. <input
  38. type="checkbox"
  39. id="{{ sprintf('%s[%s]',@name,@key) }}"
  40. name="{{ sprintf('%s[%s]',@name,@key) }}"
  41. value="true"
  42. {{ is_array(@info.checked) ? in_array(@key,@info.checked) ? 'checked' : '' : !strcmp(@key,@info.checked) ? 'checked' : '' }} />
  43. <label for="{{ sprintf('%s[%s]',@name,@key) }}">
  44. {{ @val }}</label><br>
  45. </repeat>
  46. </true>
  47. </check>
  48. <check if="{{ @info.type == 'radio' }}">
  49. <true>
  50. <repeat group="{{ @info.options }}" key="{{ @key }}" value="{{ @val }}">
  51. <input
  52. type="radio"
  53. id="{{ sprintf('%s-%s',@name,@key) }}"
  54. name="{{ sprintf('%s',@name) }}"
  55. value="{{ @val }}"
  56. {{ @info.required ? 'required' : '' }}
  57. {{ is_array(@info.checked) ? in_array(@key,@info.checked) ? 'checked' : '' : !strcmp(@key,@info.checked) ? 'checked' : '' }} />
  58. <label for="{{ sprintf('%s-%s',@name,@key) }}">
  59. {{ @val }}</label>
  60. </repeat>
  61. <br>
  62. </true>
  63. </check>
  64. <check if="{{ @info.type == 'custom' }}">
  65. <include href="{{ @info.template }}" with="elements={{ @info.el }},parent={{ @name }},options={{ @info.options }}" />
  66. </check>
  67. </repeat>
  68. <button type="submit" >{{ @submit_text ? : 'save' }}</button>
  69. </form>