Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-21 17:00:29 +01:00
Add explicit locations plugin support
Dieser Commit ist enthalten in:
Ursprung
359b165743
Commit
1dfe93ee24
5 geänderte Dateien mit 31 neuen und 3 gelöschten Zeilen
|
@ -164,7 +164,8 @@ class CustomWizard::AdminWizardController < CustomWizard::AdminController
|
|||
messageable_level: mapped_params,
|
||||
visibility_level: mapped_params,
|
||||
members_visibility_level: mapped_params,
|
||||
add_event: mapped_params
|
||||
add_event: mapped_params,
|
||||
add_location: mapped_params
|
||||
]
|
||||
)
|
||||
end
|
||||
|
|
|
@ -94,7 +94,12 @@ export default Component.extend(UndoChanges, {
|
|||
},
|
||||
|
||||
@discourseComputed("fieldTypes")
|
||||
hasEventsField(fieldTypes) {
|
||||
hasEventField(fieldTypes) {
|
||||
return fieldTypes.map((ft) => ft.id).includes("event");
|
||||
},
|
||||
|
||||
@discourseComputed("fieldTypes")
|
||||
hasLocationField(fieldTypes) {
|
||||
return fieldTypes.map((ft) => ft.id).includes("location");
|
||||
},
|
||||
});
|
||||
|
|
|
@ -99,6 +99,7 @@ const action = {
|
|||
skip_redirect: null,
|
||||
suppress_notifications: null,
|
||||
add_event: null,
|
||||
add_location: null,
|
||||
},
|
||||
send_message: {
|
||||
title: null,
|
||||
|
@ -196,6 +197,7 @@ const action = {
|
|||
"visibility_level",
|
||||
"members_visibility_level",
|
||||
"add_event",
|
||||
"add_location",
|
||||
],
|
||||
required: ["id", "type"],
|
||||
dependent: {},
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{#if hasEventsField}}
|
||||
{{#if hasEventField}}
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_topic.add_event"}}</label>
|
||||
|
@ -179,6 +179,25 @@
|
|||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if hasLocationField}}
|
||||
<div class="setting full">
|
||||
<div class="setting-label">
|
||||
<label>{{i18n "admin.wizard.action.create_topic.add_location"}}</label>
|
||||
</div>
|
||||
|
||||
<div class="setting-value">
|
||||
{{wizard-mapper
|
||||
inputs=action.add_location
|
||||
property="add_location"
|
||||
onUpdate=(action "mappedFieldUpdated")
|
||||
options=(hash
|
||||
wizardFieldSelection=true
|
||||
context="action"
|
||||
)}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{#if sendMessage}}
|
||||
|
|
|
@ -358,6 +358,7 @@ en:
|
|||
tags: "Tags"
|
||||
visible: "Visible"
|
||||
add_event: "Add Event (Events Plugin)"
|
||||
add_location: "Add Location (Locations Plugin)"
|
||||
open_composer:
|
||||
label: "Open Composer"
|
||||
update_profile:
|
||||
|
|
Laden …
In neuem Issue referenzieren