wizard-custom-action.hbs 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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 value=action.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.type"}}</h3>
  12. </div>
  13. <div class="setting-value">
  14. {{combo-box value=action.type content=types}}
  15. </div>
  16. </div>
  17. {{#if createTopic}}
  18. <div class="setting">
  19. <div class="setting-label">
  20. <h3>{{i18n "admin.wizard.action.create_topic.category"}}</h3>
  21. </div>
  22. <div class="setting-value">
  23. {{category-chooser value=action.category_id isDisabled=action.custom_category_enabled}}
  24. <div class="setting-gutter">
  25. {{input type='checkbox' checked=action.custom_category_enabled}}
  26. <span>{{i18n 'admin.wizard.action.custom_category.label'}}</span>
  27. {{#if action.custom_category_enabled}}
  28. <div class="custom-category">
  29. <div>
  30. {{input type='checkbox' checked=action.custom_category_wizard_field}}
  31. <span>{{i18n 'admin.wizard.action.custom_category.wizard_field'}}</span>
  32. {{#if action.custom_category_wizard_field}}
  33. {{combo-box value=action.category_id
  34. content=availableFields
  35. nameProperty="label"
  36. none='admin.wizard.select_field'}}
  37. {{/if}}
  38. </div>
  39. <div>
  40. {{input type='checkbox' checked=action.custom_category_user_field}}
  41. <span>{{i18n 'admin.wizard.action.custom_category.user_field'}}</span>
  42. {{#if action.custom_category_user_field}}
  43. {{input value=action.custom_category_user_field_key}}
  44. {{/if}}
  45. </div>
  46. </div>
  47. {{/if}}
  48. </div>
  49. </div>
  50. </div>
  51. <div class="setting">
  52. <div class="setting-label">
  53. <h3>{{i18n "admin.wizard.action.title"}}</h3>
  54. </div>
  55. <div class="setting-value">
  56. {{combo-box value=action.title
  57. content=availableFields
  58. nameProperty="label"
  59. none='admin.wizard.select_field'
  60. isDisabled=action.custom_title_enabled}}
  61. <div class="setting-gutter">
  62. {{input type='checkbox' checked=action.custom_title_enabled}}
  63. <span>{{i18n 'admin.wizard.action.custom_title'}}</span>
  64. {{#if action.custom_title_enabled}}
  65. {{input value=action.custom_title}}
  66. {{/if}}
  67. </div>
  68. </div>
  69. </div>
  70. <div class="setting">
  71. <div class="setting-label">
  72. <h3>{{i18n "admin.wizard.action.post"}}</h3>
  73. </div>
  74. <div class="setting-value">
  75. {{combo-box value=action.post content=availableFields
  76. nameProperty='label'
  77. none='admin.wizard.select_field'
  78. isDisabled=action.post_builder}}
  79. <div class="setting-gutter">
  80. {{input type='checkbox' checked=action.post_builder}}
  81. <span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span>
  82. </div>
  83. </div>
  84. </div>
  85. {{#if action.post_builder}}
  86. <div class="setting full">
  87. <div class="setting-label">
  88. <h3>{{i18n 'admin.wizard.action.post_builder.label'}}</h3>
  89. </div>
  90. <div class="setting-value">
  91. <label>{{i18n 'admin.wizard.action.post_builder.user_fields'}}{{builderUserFields}}</label>
  92. <label>{{i18n 'admin.wizard.action.post_builder.wizard_fields'}}{{builderWizardFields}}</label>
  93. {{d-editor value=action.post_template
  94. placeholder='admin.wizard.action.post_builder.placeholder'
  95. classNames='post-builder-editor'}}
  96. </div>
  97. </div>
  98. {{/if}}
  99. <div class="setting">
  100. <div class="setting-label">
  101. <h3>{{i18n "admin.wizard.action.skip_redirect.label"}}</h3>
  102. </div>
  103. <div class="setting-value">
  104. {{input type='checkbox' checked=action.skip_redirect}}
  105. <span>{{i18n 'admin.wizard.action.skip_redirect.description' type='topic'}}</span>
  106. </div>
  107. </div>
  108. <div class="setting full">
  109. <label>{{i18n 'admin.wizard.action.add_fields' type='Topic'}}</label>
  110. {{wizard-custom-inputs inputs=action.add_fields
  111. valueContent=availableFields
  112. inputKey='admin.wizard.action.topic_attr'
  113. noneValue='admin.wizard.select_field'
  114. allowCustomField=true}}
  115. </div>
  116. {{/if}}
  117. {{#if sendMessage}}
  118. <div class="setting">
  119. <div class="setting-label">
  120. <h3>{{i18n "admin.wizard.action.title"}}</h3>
  121. </div>
  122. <div class="setting-value">
  123. {{combo-box value=action.title content=availableFields nameProperty='label' none='admin.wizard.select_field'}}
  124. </div>
  125. </div>
  126. <div class="setting">
  127. <div class="setting-label">
  128. <h3>{{i18n "admin.wizard.action.post"}}</h3>
  129. </div>
  130. <div class="setting-value">
  131. {{combo-box value=action.post content=availableFields
  132. nameProperty='label'
  133. none='admin.wizard.select_field'
  134. isDisabled=action.post_builder}}
  135. <div>
  136. {{input type='checkbox' checked=action.post_builder}}
  137. <span>{{i18n 'admin.wizard.action.post_builder.checkbox'}}</span>
  138. </div>
  139. </div>
  140. </div>
  141. {{#if action.post_builder}}
  142. <div class="setting full">
  143. <div class="setting-label">
  144. <h3>{{i18n 'admin.wizard.action.post_builder.label'}}</h3>
  145. </div>
  146. <div class="setting-value">
  147. <label>{{i18n 'admin.wizard.action.post_builder.user_fields'}}{{builderUserFields}}</label>
  148. <label>{{i18n 'admin.wizard.action.post_builder.wizard_fields'}}{{builderWizardFields}}</label>
  149. {{d-editor value=action.post_template
  150. placeholder='admin.wizard.action.post_builder.placeholder'
  151. classNames='post-builder-editor'}}
  152. </div>
  153. </div>
  154. {{/if}}
  155. <div class="setting">
  156. <div class="setting-label">
  157. <h3>{{i18n "admin.wizard.action.send_message.recipient"}}</h3>
  158. </div>
  159. <div class="setting-value">
  160. {{user-selector single="true"
  161. includeMentionableGroups="true"
  162. usernames=action.username
  163. allowedUsers="true"}}
  164. </div>
  165. </div>
  166. <div class="setting">
  167. <div class="setting-label">
  168. <h3>{{i18n "admin.wizard.action.skip_redirect.label"}}</h3>
  169. </div>
  170. <div class="setting-value">
  171. {{input type='checkbox' checked=action.skip_redirect}}
  172. <span>{{i18n 'admin.wizard.action.skip_redirect.description' type='message'}}</span>
  173. </div>
  174. </div>
  175. <div class="setting full">
  176. <label>{{i18n "admin.wizard.action.add_fields" type='Message'}}</label>
  177. {{wizard-custom-inputs inputs=action.add_fields
  178. keyContent=availableFields
  179. valuePlaceholder='admin.wizard.action.topic_attr'}}
  180. </div>
  181. {{/if}}
  182. {{#if updateProfile}}
  183. <div class="setting full">
  184. <label>{{i18n "admin.wizard.action.add_fields" type='Profile'}}</label>
  185. {{wizard-custom-inputs inputs=action.profile_updates
  186. valueContent=profileFields
  187. keyContent=availableFields
  188. noneValue='admin.wizard.action.update_profile.profile_field'
  189. allowCustomField=true
  190. allowUserField=true}}
  191. </div>
  192. {{/if}}