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
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
name: field_json.key, name: field_json.key,
title: field_json.description, title: field_json.description,
hidden: field_json.hidden, hidden: field_json.hidden,
min: field_json.min,
max: field_json.max,
// Force calling subfield render // Force calling subfield render
// as user may have modified the input value // as user may have modified the input value
render_timestamp: new Date().getTime() render_timestamp: new Date().getTime()
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>valentin</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>988.26496.42040.8686</string> </value> <value> <string>990.12355.17861.39304</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1609253348.53</float> <float>1651759968.58</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
hidden: options.hidden, hidden: options.hidden,
trim: options.trim || false, trim: options.trim || false,
maxlength: options.maxlength, maxlength: options.maxlength,
min: options.min,
max: options.max,
multiple: options.multiple, multiple: options.multiple,
accept: options.accept, accept: options.accept,
capture: options.capture, capture: options.capture,
...@@ -93,6 +95,12 @@ ...@@ -93,6 +95,12 @@
if (this.state.maxlength) { if (this.state.maxlength) {
textarea.setAttribute('maxlength', 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) { if (this.state.multiple) {
textarea.multiple = true; textarea.multiple = true;
......
...@@ -220,7 +220,7 @@ ...@@ -220,7 +220,7 @@
</item> </item>
<item> <item>
<key> <string>actor</string> </key> <key> <string>actor</string> </key>
<value> <string>zope</string> </value> <value> <string>valentin</string> </value>
</item> </item>
<item> <item>
<key> <string>comment</string> </key> <key> <string>comment</string> </key>
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>990.28219.58167.35225</string> </value> <value> <string>1000.3604.26762.29934</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1614695141.57</float> <float>1651848322.15</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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