1
0
Fork 0

Add explicit locations plugin support

Dieser Commit ist enthalten in:
Angus McLeod 2022-10-10 14:04:55 +02:00
Ursprung 359b165743
Commit 1dfe93ee24
5 geänderte Dateien mit 31 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -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

Datei anzeigen

@ -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");
},
});

Datei anzeigen

@ -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: {},

Datei anzeigen

@ -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}}

Datei anzeigen

@ -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: