mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Add options for min, max and step values for number inputs.
This commit is contained in:
parent
0d86a7e427
commit
7975fadfe9
3 changed files with 15 additions and 0 deletions
|
@ -32,6 +32,9 @@ class HTMLIngredient {
|
|||
this.defaultIndex = config.defaultIndex || 0;
|
||||
this.toggleValues = config.toggleValues;
|
||||
this.id = "ing-" + this.app.nextIngId();
|
||||
this.min = (typeof config.min === "number") ? config.min : "";
|
||||
this.max = (typeof config.max === "number") ? config.max : "";
|
||||
this.step = config.step || 1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,6 +106,9 @@ class HTMLIngredient {
|
|||
id="${this.id}"
|
||||
arg-name="${this.name}"
|
||||
value="${this.value}"
|
||||
min="${this.min}"
|
||||
max="${this.max}"
|
||||
step="${this.step}"
|
||||
${this.disabled ? "disabled" : ""}>
|
||||
${this.hint ? "<span class='bmd-help'>" + this.hint + "</span>" : ""}
|
||||
</div>`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue