Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
eeb211c6
Commit
eeb211c6
authored
Jun 24, 2024
by
Georgios Dagkakis
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Widget.py: Allow to set autocomplete also for hidden fields
We may want to set autocomplete 'off' or whatever other value
parent
3f2b98fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
product/Formulator/Widget.py
product/Formulator/Widget.py
+6
-0
No files found.
product/Formulator/Widget.py
View file @
eeb211c6
...
@@ -170,6 +170,10 @@ class Widget(object):
...
@@ -170,6 +170,10 @@ class Widget(object):
except
KeyError
:
except
KeyError
:
# In case extra is not defined as in DateTimeWidget
# In case extra is not defined as in DateTimeWidget
extra
=
''
extra
=
''
try
:
autocomplete
=
field
.
get_value
(
'autocomplete'
)
except
KeyError
:
autocomplete
=
''
result
=
''
result
=
''
# We must adapt the rendering to the type of the value
# We must adapt the rendering to the type of the value
# in order to get the correct type back
# in order to get the correct type back
...
@@ -179,12 +183,14 @@ class Widget(object):
...
@@ -179,12 +183,14 @@ class Widget(object):
type
=
"hidden"
,
type
=
"hidden"
,
name
=
"%s:list"
%
key
,
name
=
"%s:list"
%
key
,
value
=
v
,
value
=
v
,
autocomplete
=
autocomplete
,
extra
=
extra
)
extra
=
extra
)
else
:
else
:
result
=
render_element
(
"input"
,
result
=
render_element
(
"input"
,
type
=
"hidden"
,
type
=
"hidden"
,
name
=
key
,
name
=
key
,
value
=
value
,
value
=
value
,
autocomplete
=
autocomplete
,
extra
=
extra
)
extra
=
extra
)
return
result
return
result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment