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
140
Merge Requests
140
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
7feb1a67
Commit
7feb1a67
authored
Jun 24, 2024
by
Georgios Dagkakis
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
4cbc4eea
Pipeline
#35704
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Show 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 @
7feb1a67
...
@@ -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