RC-93 | Group Input
This commit is contained in:
parent
f39c1b7721
commit
e2297daa5d
6 changed files with 87 additions and 2 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import { barInput } from "./barInput.mjs";
|
||||
import { booleanInput } from "./booleanInput.mjs";
|
||||
import { dropdownInput } from "./dropdownInput.mjs";
|
||||
import { groupInput } from "./groupInput.mjs";
|
||||
import { numberInput } from "./numberInput.mjs";
|
||||
import { stringSet } from "./stringSet.mjs";
|
||||
import { textInput } from "./textInput.mjs";
|
||||
|
||||
const { getType } = foundry.utils;
|
||||
|
||||
|
|
@ -12,6 +14,8 @@ const inputTypes = {
|
|||
bar: barInput,
|
||||
dropdown: dropdownInput,
|
||||
boolean: booleanInput,
|
||||
group: groupInput,
|
||||
text: textInput,
|
||||
};
|
||||
|
||||
const typesToSanitize = new Set([ `string`, `number` ]);
|
||||
|
|
@ -21,7 +25,9 @@ export function formFields(inputs, opts) {
|
|||
for (const input of inputs) {
|
||||
if (inputTypes[input.type] == null) { continue };
|
||||
|
||||
input.limited ??= true;
|
||||
if (input.type !== `group`) {
|
||||
input.limited ??= true;
|
||||
};
|
||||
|
||||
if (typesToSanitize.has(getType(input.value))) {
|
||||
input.value = Handlebars.escapeExpression(input.value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue