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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
erp5
Commits
3454c143
Commit
3454c143
authored
Apr 11, 2022
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: support maxlength in StringField and EmailField.
parent
e9f059a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
0 deletions
+10
-0
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
...rtal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
+4
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_emailfield_js.js
...lateItem/web_page_module/rjs_gadget_erp5_emailfield_js.js
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
...ateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
+1
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
...TemplateItem/web_page_module/rjs_gadget_html5_input_js.js
+4
-0
No files found.
bt5/erp5_hal_json_style/SkinTemplateItem/portal_skins/erp5_hal_json_style/ERP5Document_getHateoas.py
View file @
3454c143
...
@@ -551,6 +551,10 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
...
@@ -551,6 +551,10 @@ def renderField(traversed_document, field, form, value=MARKER, meta_type=None,
if
meta_type
in
(
"StringField"
,
"FloatField"
,
"EmailField"
,
"TextAreaField"
,
if
meta_type
in
(
"StringField"
,
"FloatField"
,
"EmailField"
,
"TextAreaField"
,
"LinesField"
,
"ImageField"
,
"FileField"
,
"IntegerField"
,
"LinesField"
,
"ImageField"
,
"FileField"
,
"IntegerField"
,
"PasswordField"
,
"EditorField"
,
"HyperLinkField"
,
"LinkField"
):
"PasswordField"
,
"EditorField"
,
"HyperLinkField"
,
"LinkField"
):
if
meta_type
in
(
"StringField"
,
"EmailField"
):
result
.
update
({
"maxlength"
:
field
.
get_value
(
"display_maxwidth"
),
})
if
meta_type
==
"FloatField"
:
if
meta_type
==
"FloatField"
:
result
.
update
({
result
.
update
({
"precision"
:
field
.
get_value
(
"precision"
),
"precision"
:
field
.
get_value
(
"precision"
),
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_emailfield_js.js
View file @
3454c143
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
error_text
:
field_json
.
error_text
,
error_text
:
field_json
.
error_text
,
type
:
'
email
'
,
type
:
'
email
'
,
hidden
:
field_json
.
hidden
,
hidden
:
field_json
.
hidden
,
maxlength
:
field_json
.
maxlength
,
// 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
()
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_stringfield_js.js
View file @
3454c143
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
title
:
field_json
.
description
,
title
:
field_json
.
description
,
hidden
:
field_json
.
hidden
,
hidden
:
field_json
.
hidden
,
trim
:
true
,
trim
:
true
,
maxlength
:
field_json
.
maxlength
,
// 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
()
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_html5_input_js.js
View file @
3454c143
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
step
:
options
.
step
,
step
:
options
.
step
,
hidden
:
options
.
hidden
,
hidden
:
options
.
hidden
,
trim
:
options
.
trim
||
false
,
trim
:
options
.
trim
||
false
,
maxlength
:
options
.
maxlength
,
multiple
:
options
.
multiple
,
multiple
:
options
.
multiple
,
accept
:
options
.
accept
,
accept
:
options
.
accept
,
capture
:
options
.
capture
,
capture
:
options
.
capture
,
...
@@ -89,6 +90,9 @@
...
@@ -89,6 +90,9 @@
if
(
this
.
state
.
accept
)
{
if
(
this
.
state
.
accept
)
{
textarea
.
setAttribute
(
'
accept
'
,
this
.
state
.
accept
);
textarea
.
setAttribute
(
'
accept
'
,
this
.
state
.
accept
);
}
}
if
(
this
.
state
.
maxlength
)
{
textarea
.
setAttribute
(
'
maxlength
'
,
this
.
state
.
maxlength
);
}
if
(
this
.
state
.
multiple
)
{
if
(
this
.
state
.
multiple
)
{
textarea
.
multiple
=
true
;
textarea
.
multiple
=
true
;
...
...
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