소스 검색

Use a new template field

Angus McLeod 7 년 전
부모
커밋
b58c20c60c
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 2
      assets/javascripts/discourse/templates/components/wizard-custom-action.hbs
  2. 2 2
      lib/builder.rb

+ 2 - 2
assets/javascripts/discourse/templates/components/wizard-custom-action.hbs

@@ -59,7 +59,7 @@
       <div class="setting-value">
         <label>{{i18n 'admin.wizard.action.post_builder.user_fields'}}{{builderUserFields}}</label>
         <label>{{i18n 'admin.wizard.action.post_builder.wizard_fields'}}{{builderWizardFields}}</label>
-        {{d-editor value=action.post
+        {{d-editor value=action.post_template
                    placeholder='admin.wizard.action.post_builder.placeholder'
                    classNames='post-builder-editor'}}
       </div>
@@ -109,7 +109,7 @@
       <div class="setting-value">
         <label>{{i18n 'admin.wizard.action.post_builder.user_fields'}}{{builderUserFields}}</label>
         <label>{{i18n 'admin.wizard.action.post_builder.wizard_fields'}}{{builderWizardFields}}</label>
-        {{d-editor value=action.post
+        {{d-editor value=action.post_template
                    placeholder='admin.wizard.action.post_builder.placeholder'
                    classNames='post-builder-editor'}}
       </div>

+ 2 - 2
lib/builder.rb

@@ -186,7 +186,7 @@ class CustomWizard::Builder
                   title = data[a['title']]
 
                   if a['post_builder']
-                    post = CustomWizard::Builder.build_post(a['post'], user, data)
+                    post = CustomWizard::Builder.build_post(a['post_template'], user, data)
                   else
                     post = data[a['post']]
                   end
@@ -248,7 +248,7 @@ class CustomWizard::Builder
                   title = data[a['title']]
 
                   if a['post_builder']
-                    post = CustomWizard::Builder.build_post(a['post'], user, data)
+                    post = CustomWizard::Builder.build_post(a['post_template'], user, data)
                   else
                     post = data[a['post']]
                   end