Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 11:52:54 +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,
|
messageable_level: mapped_params,
|
||||||
visibility_level: mapped_params,
|
visibility_level: mapped_params,
|
||||||
members_visibility_level: mapped_params,
|
members_visibility_level: mapped_params,
|
||||||
add_event: mapped_params
|
add_event: mapped_params,
|
||||||
|
add_location: mapped_params
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
|
@ -94,7 +94,12 @@ export default Component.extend(UndoChanges, {
|
||||||
},
|
},
|
||||||
|
|
||||||
@discourseComputed("fieldTypes")
|
@discourseComputed("fieldTypes")
|
||||||
hasEventsField(fieldTypes) {
|
hasEventField(fieldTypes) {
|
||||||
return fieldTypes.map((ft) => ft.id).includes("event");
|
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,
|
skip_redirect: null,
|
||||||
suppress_notifications: null,
|
suppress_notifications: null,
|
||||||
add_event: null,
|
add_event: null,
|
||||||
|
add_location: null,
|
||||||
},
|
},
|
||||||
send_message: {
|
send_message: {
|
||||||
title: null,
|
title: null,
|
||||||
|
@ -196,6 +197,7 @@ const action = {
|
||||||
"visibility_level",
|
"visibility_level",
|
||||||
"members_visibility_level",
|
"members_visibility_level",
|
||||||
"add_event",
|
"add_event",
|
||||||
|
"add_location",
|
||||||
],
|
],
|
||||||
required: ["id", "type"],
|
required: ["id", "type"],
|
||||||
dependent: {},
|
dependent: {},
|
||||||
|
|
|
@ -161,7 +161,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#if hasEventsField}}
|
{{#if hasEventField}}
|
||||||
<div class="setting full">
|
<div class="setting full">
|
||||||
<div class="setting-label">
|
<div class="setting-label">
|
||||||
<label>{{i18n "admin.wizard.action.create_topic.add_event"}}</label>
|
<label>{{i18n "admin.wizard.action.create_topic.add_event"}}</label>
|
||||||
|
@ -179,6 +179,25 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/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}}
|
||||||
|
|
||||||
{{#if sendMessage}}
|
{{#if sendMessage}}
|
||||||
|
|
|
@ -358,6 +358,7 @@ en:
|
||||||
tags: "Tags"
|
tags: "Tags"
|
||||||
visible: "Visible"
|
visible: "Visible"
|
||||||
add_event: "Add Event (Events Plugin)"
|
add_event: "Add Event (Events Plugin)"
|
||||||
|
add_location: "Add Location (Locations Plugin)"
|
||||||
open_composer:
|
open_composer:
|
||||||
label: "Open Composer"
|
label: "Open Composer"
|
||||||
update_profile:
|
update_profile:
|
||||||
|
|
Laden …
In neuem Issue referenzieren