Skip to content

Commit

Permalink
fix: allow selection of caster progression for classes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethaks committed Jun 18, 2024
1 parent 45cb43e commit 73dec4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
17 changes: 5 additions & 12 deletions public/templates/class-progression.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,9 @@ SPDX-License-Identifier: EUPL-1.2
-->--}}
<div class="form-group">
<label>{{ localize "PF1SPHERES.CasterProgression" }}</label>
<select name="flags.pf1spheres.casterProgression">
{{#select item.flags.pf1spheres.casterProgression }}
<option value="">
{{ localize "PF1.None" }}
</option>
{{#each pf1sconfig.progression as |progression key|}}
<option value="{{ key }}">
{{ progression }}
</option>
{{/each }}
{{/select }}
</select>
<div class="form-fields">
<select name="flags.pf1spheres.casterProgression">
{{selectOptions pf1sconfig.progression selected=item.flags.pf1spheres.casterProgression blank="PF1.None" localize=true}}
</select>
</div>
</div>
4 changes: 3 additions & 1 deletion src/module/item-sheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export const onItemSheetRender = (
// Handle additions to class sheet
else if (item.type === "class") {
const progressionDropdown = renderPf1sTemplate("class-progression", { ...data, ...sphereData });
html.find("div.tab.details > h4").first().before(progressionDropdown);
html[0]
.querySelector(".form-group.spellcasting-type")
?.insertAdjacentHTML("beforebegin", progressionDropdown);
}

// Remove "Sphere Caster Level Capped at HD" bonus modifier choice from non-Sphere CL changes
Expand Down

0 comments on commit 73dec4d

Please sign in to comment.