wizard-custom-field.hbs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <div class="setting">
  2. <div class="setting-label">
  3. <h3>{{i18n 'admin.wizard.id'}}</h3>
  4. </div>
  5. <div class="setting-value">
  6. {{input name="id" value=field.id placeholderKey="admin.wizard.id_placeholder" disabled=disableId}}
  7. </div>
  8. </div>
  9. <div class="setting">
  10. <div class="setting-label">
  11. <h3>{{i18n 'admin.wizard.key'}}</h3>
  12. </div>
  13. <div class="setting-value">
  14. {{input name="key" value=field.key placeholderKey="admin.wizard.key_placeholder"}}
  15. </div>
  16. </div>
  17. <div class="setting">
  18. <div class="setting-label">
  19. <h3>{{i18n 'admin.wizard.field.label'}}</h3>
  20. </div>
  21. <div class="setting-value">
  22. {{input name="label" value=field.label placeholder=(i18n "admin.wizard.custom_text_placeholder")}}
  23. </div>
  24. </div>
  25. <div class="setting">
  26. <div class="setting-label">
  27. <h3>{{i18n 'admin.wizard.field.description'}}</h3>
  28. </div>
  29. <div class="setting-value">
  30. {{textarea name="description" value=field.description placeholder=(i18n "admin.wizard.custom_text_placeholder")}}
  31. </div>
  32. </div>
  33. <div class="setting">
  34. <div class="setting-label">
  35. <h3>{{i18n 'admin.wizard.field.image'}}</h3>
  36. </div>
  37. <div class="setting-value">
  38. {{input name="image" value=field.image placeholderKey="admin.wizard.field.image_placeholder"}}
  39. </div>
  40. </div>
  41. <div class="setting">
  42. <div class="setting-label">
  43. <h3>{{i18n 'admin.wizard.type'}}</h3>
  44. </div>
  45. <div class="setting-value">
  46. {{combo-box value=field.type content=types none="admin.wizard.field.type"}}
  47. </div>
  48. </div>
  49. <div class="setting">
  50. <div class="setting-label">
  51. <h3>{{i18n 'admin.wizard.field.required'}}</h3>
  52. </div>
  53. <div class="setting-value">
  54. {{input type='checkbox' checked=field.required}}
  55. <span>{{i18n 'admin.wizard.field.required_label'}}</span>
  56. </div>
  57. </div>
  58. {{#if isInput}}
  59. <div class="setting">
  60. <div class="setting-label">
  61. <h3>{{i18n 'admin.wizard.field.min_length'}}</h3>
  62. </div>
  63. <div class="setting-value">
  64. {{input type="number" name="min_length" value=field.min_length placeholder=(i18n 'admin.wizard.field.min_length_placeholder')}}
  65. </div>
  66. </div>
  67. {{/if}}
  68. {{#if isDropdown}}
  69. <div class="wizard-dropdown-choices">
  70. <div class="wizard-header small underline">
  71. {{i18n 'admin.wizard.field.choices_label'}}
  72. </div>
  73. {{combo-box value=field.choices_type content=choicesTypes none="admin.wizard.field.choices_type"}}
  74. {{#if choicesTranslation}}
  75. <div class="wizard-header small">
  76. {{i18n 'admin.wizard.field.choices_translation'}}
  77. </div>
  78. {{input name="key" value=field.choices_key placeholderKey="admin.wizard.key_placeholder"}}
  79. {{/if}}
  80. {{#if choicesPreset}}
  81. <div class="wizard-header small">
  82. {{i18n 'admin.wizard.field.choices_preset.label'}}
  83. </div>
  84. {{combo-box value=field.choices_preset content=presetChoices none='admin.wizard.none'}}
  85. <div class="wizard-header small">
  86. {{i18n 'admin.wizard.field.choices_preset.filter'}}
  87. </div>
  88. {{wizard-custom-inputs inputs=field.choices_filters}}
  89. {{/if}}
  90. {{#if choicesCustom}}
  91. <div class="wizard-header small">
  92. {{i18n 'admin.wizard.field.choices_custom'}}
  93. </div>
  94. {{wizard-custom-inputs inputs=field.choices}}
  95. {{/if}}
  96. <div class="wizard-header small">
  97. {{i18n 'admin.wizard.field.dropdown_none'}}
  98. </div>
  99. {{input name="dropdown_none" value=field.dropdown_none placeholder=(i18n 'admin.wizard.field.dropdown_none_placeholder')}}
  100. </div>
  101. {{/if}}