Commit 5f63dc1f authored by Valentin Benozillo's avatar Valentin Benozillo

erp5_web_renderjs_ui: Define min and max to integer html field

Define min and max to integer html field
parent 6bb8d04e
Pipeline #21327 failed with stage
in 0 seconds
......@@ -21,6 +21,8 @@
name: field_json.key,
title: field_json.description,
hidden: field_json.hidden,
min: field_json.min,
max: field_json.max,
// Force calling subfield render
// as user may have modified the input value
render_timestamp: new Date().getTime()
......
......@@ -220,7 +220,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>valentin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>988.26496.42040.8686</string> </value>
<value> <string>990.12355.17861.39304</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1609253348.53</float>
<float>1651759968.58</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -34,6 +34,8 @@
hidden: options.hidden,
trim: options.trim || false,
maxlength: options.maxlength,
min: options.min,
max: options.max,
multiple: options.multiple,
accept: options.accept,
capture: options.capture,
......@@ -93,6 +95,12 @@
if (this.state.maxlength) {
textarea.setAttribute('maxlength', this.state.maxlength);
}
if (this.state.min !== "") {
textarea.setAttribute('min', this.state.min);
}
if (this.state.max !== "") {
textarea.setAttribute('max', this.state.max);
}
if (this.state.multiple) {
textarea.multiple = true;
......
......@@ -220,7 +220,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>valentin</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>990.28219.58167.35225</string> </value>
<value> <string>1000.3604.26762.29934</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1614695141.57</float>
<float>1651848322.15</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment