Commit 31eee0b3 authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_web_renderjs_ui: Use autocomplete attribute in stringfield, passwordfield and listfield

parent 8061d311
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
first_item: field_json.first_item, first_item: field_json.first_item,
hidden: field_json.hidden, hidden: field_json.hidden,
error_text: field_json.error_text, error_text: field_json.error_text,
autocomplete: field_json.autocomplete,
// 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()
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
title: field_json.description, title: field_json.description,
type: 'password', type: 'password',
hidden: field_json.hidden, hidden: field_json.hidden,
autocomplete: field_json.autocomplete,
// 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()
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
error_text: field_json.error_text, error_text: field_json.error_text,
title: field_json.description, title: field_json.description,
hidden: field_json.hidden, hidden: field_json.hidden,
autocomplete: field_json.autocomplete,
trim: true, trim: true,
maxlength: field_json.maxlength, maxlength: field_json.maxlength,
// Force calling subfield render // Force calling subfield render
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
maxlength: options.maxlength, maxlength: options.maxlength,
min: options.min, min: options.min,
max: options.max, max: options.max,
autocomplete: options.autocomplete,
multiple: options.multiple, multiple: options.multiple,
accept: options.accept, accept: options.accept,
capture: options.capture, capture: options.capture,
...@@ -112,6 +113,10 @@ ...@@ -112,6 +113,10 @@
textarea.required = false; textarea.required = false;
} }
if (this.state.autocomplete) {
textarea.autocomplete = this.state.autocomplete;
}
if (this.state.editable) { if (this.state.editable) {
textarea.readonly = true; textarea.readonly = true;
} else { } else {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
error_text: options.error_text || "", error_text: options.error_text || "",
id: options.id, id: options.id,
name: options.name, name: options.name,
autocomplete: options.autocomplete,
title: options.title, title: options.title,
hidden: options.hidden hidden: options.hidden
}; };
...@@ -66,6 +67,10 @@ ...@@ -66,6 +67,10 @@
select.readonly = false; select.readonly = false;
} }
if (this.state.autocomplete) {
select.autocomplete = this.state.autocomplete;
}
if (modification_dict.hasOwnProperty('value') || if (modification_dict.hasOwnProperty('value') ||
modification_dict.hasOwnProperty('item_list')) { modification_dict.hasOwnProperty('item_list')) {
fragment = document.createDocumentFragment(); fragment = document.createDocumentFragment();
......
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