Skip to content

Commit

Permalink
[#4938] Fix enchant/summon profile not being set through dialog
Browse files Browse the repository at this point in the history
If no other creation fields are displayed on the enchant or summon
usage dialogs, then the hidden field containing the profile also
wouldn't be included in the template, and it would not be set on
the final usage configuration.

Closes #4938
  • Loading branch information
arbron committed Dec 29, 2024
1 parent 4fcf0d4 commit 3e8c981
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions templates/activity/enchant-usage-creation.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if hasCreation}}
<section>
{{~#if hasCreation}}
{{> "dnd5e.activity-usage-notes" }}
<fieldset>
<legend>{{ localize "DND5E.USAGE.SECTION.Creation" }}</legend>
Expand All @@ -12,5 +12,9 @@
{{ formField template.field name=template.name value=template.value input=inputs.createCheckboxInput }}
{{/if}}
</fieldset>
{{/if~}}
</section>
{{else if enchantment}}
<input type="hidden" name="enchantmentProfile" value="{{ enchantment }}">
{{else}}
<section></section>
{{/if}}
8 changes: 6 additions & 2 deletions templates/activity/summon-usage-creation.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{#if hasCreation}}
<section>
{{~#if hasCreation}}
{{> "dnd5e.activity-usage-notes" }}
<fieldset>
<legend>{{ localize "DND5E.USAGE.SECTION.Creation" }}</legend>
Expand All @@ -14,5 +14,9 @@
{{ formField template.field name=template.name value=template.value input=inputs.createCheckboxInput }}
{{/if}}
</fieldset>
{{/if~}}
</section>
{{else if summonsProfile}}
<input type="hidden" name="summons.profile" value="{{ summonsProfile }}">
{{else}}
<section></section>
{{/if}}

0 comments on commit 3e8c981

Please sign in to comment.