Skip to content

Commit

Permalink
move text input
Browse files Browse the repository at this point in the history
  • Loading branch information
jessev14 committed Mar 9, 2022
1 parent 4550fe3 commit c4a64f2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file added img/ccss-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions scripts/custom-character-sheet-sections.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ Hooks.once("ready", () => {


Hooks.on("renderItemSheet", (app, html, appData) => {
const custom2 = `
<div class="form-group" style="border: 1px solid var(--faint-color); border-radius: 5px; flex-direction: column;">
<label>${game.i18n.localize(`${moduleName}.customSection`)}</label>
<input style="text-align: left;" type="text" name="flags.${moduleName}.sectionName" value="${app.object.data.flags[moduleName]?.sectionName || ""}" />
</div>
`;
html.find(`div.item-properties`).append(custom2);

return;

// Inject input element into Item sheets to input custom section name
const customSectionInput = `
<h3 class="form-header">${game.i18n.localize(`${moduleName}.customSection`)}</h3>
Expand All @@ -19,6 +29,7 @@ Hooks.on("renderItemSheet", (app, html, appData) => {
</div>
</div>
`;

html.find(`div.tab.details`).append(customSectionInput);
});

Expand Down

0 comments on commit c4a64f2

Please sign in to comment.