Commit b8df4659 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by Kazuhiko Shiozaki

erp5_web_renderjs_ui: Use autocomplete attribute in stringfield, passwordfield and listfield

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