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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
1c7f511a
Commit
1c7f511a
authored
Mar 16, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Form: improve ZMI view of more forms
parent
8a5418d9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
product/ERP5Form/GadgetField.py
product/ERP5Form/GadgetField.py
+6
-0
product/ERP5Form/ImageField.py
product/ERP5Form/ImageField.py
+3
-0
product/ERP5Form/MatrixBox.py
product/ERP5Form/MatrixBox.py
+15
-2
No files found.
product/ERP5Form/GadgetField.py
View file @
1c7f511a
...
@@ -21,6 +21,7 @@ class GadgetWidget(Widget.Widget):
...
@@ -21,6 +21,7 @@ class GadgetWidget(Widget.Widget):
title
=
"RenderJS extra"
,
title
=
"RenderJS extra"
,
description
=
(
description
=
(
"More parameters passed to the renderJS's render method."
),
"More parameters passed to the renderJS's render method."
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -28,12 +29,14 @@ class GadgetWidget(Widget.Widget):
...
@@ -28,12 +29,14 @@ class GadgetWidget(Widget.Widget):
title
=
'Gadget Url'
,
title
=
'Gadget Url'
,
description
=
(
"The url of the html page containing the
\
description
=
(
"The url of the html page containing the
\
gadget"
),
gadget"
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
js_sandbox
=
fields
.
StringField
(
'js_sandbox'
,
js_sandbox
=
fields
.
StringField
(
'js_sandbox'
,
title
=
'Gadget Sandbox'
,
title
=
'Gadget Sandbox'
,
description
=
(
"Gadget sandbox"
),
description
=
(
"Gadget sandbox"
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
@@ -83,12 +86,14 @@ class GadgetFieldValidator(Validator.Validator):
...
@@ -83,12 +86,14 @@ class GadgetFieldValidator(Validator.Validator):
title
=
'Data Url'
,
title
=
'Data Url'
,
description
=
(
description
=
(
"Checked if gadget return data url."
),
"Checked if gadget return data url."
),
css_class
=
"form-check-input"
,
default
=
0
)
default
=
0
)
validator_form_id
=
fields
.
StringField
(
validator_form_id
=
fields
.
StringField
(
'validator_form_id'
,
'validator_form_id'
,
title
=
'Validator Form ID'
,
title
=
'Validator Form ID'
,
description
=
"ID of the validator field's form. Default is the current form"
,
description
=
"ID of the validator field's form. Default is the current form"
,
css_class
=
"form-control"
,
default
=
""
,
default
=
""
,
display_width
=
40
,
display_width
=
40
,
required
=
0
required
=
0
...
@@ -98,6 +103,7 @@ class GadgetFieldValidator(Validator.Validator):
...
@@ -98,6 +103,7 @@ class GadgetFieldValidator(Validator.Validator):
'validator_field_id'
,
'validator_field_id'
,
title
=
'Validator Field ID'
,
title
=
'Validator Field ID'
,
description
=
"ID of the validator field."
,
description
=
"ID of the validator field."
,
css_class
=
"form-control"
,
default
=
""
,
default
=
""
,
display_width
=
40
,
display_width
=
40
,
required
=
0
required
=
0
...
...
product/ERP5Form/ImageField.py
View file @
1c7f511a
...
@@ -71,6 +71,7 @@ class ImageFieldWidget(Widget.TextWidget):
...
@@ -71,6 +71,7 @@ class ImageFieldWidget(Widget.TextWidget):
description
=
(
description
=
(
"The format in which the image should be converted to. "
"The format in which the image should be converted to. "
"This is only used with ERP5 Images."
),
"This is only used with ERP5 Images."
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
@@ -79,6 +80,7 @@ class ImageFieldWidget(Widget.TextWidget):
...
@@ -79,6 +80,7 @@ class ImageFieldWidget(Widget.TextWidget):
description
=
(
description
=
(
"The quality used when converting the image. "
"The quality used when converting the image. "
"This is only used with ERP5 Images."
),
"This is only used with ERP5 Images."
),
css_class
=
"form-control"
,
default
=
75
,
default
=
75
,
required
=
0
)
required
=
0
)
...
@@ -87,6 +89,7 @@ class ImageFieldWidget(Widget.TextWidget):
...
@@ -87,6 +89,7 @@ class ImageFieldWidget(Widget.TextWidget):
description
=
(
description
=
(
"Return image only if it is already pre converted in cache. "
"Return image only if it is already pre converted in cache. "
"This is only used with ERP5 Images."
),
"This is only used with ERP5 Images."
),
css_class
=
"form-control"
,
default
=
False
,
default
=
False
,
required
=
0
)
required
=
0
)
...
...
product/ERP5Form/MatrixBox.py
View file @
1c7f511a
...
@@ -63,6 +63,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -63,6 +63,7 @@ class MatrixBoxWidget(Widget.Widget):
title
=
'Default'
,
title
=
'Default'
,
description
=
(
description
=
(
"Default value of the text in the widget."
),
"Default value of the text in the widget."
),
css_class
=
"form-control"
,
default
=
""
,
default
=
""
,
width
=
20
,
height
=
3
,
width
=
20
,
height
=
3
,
required
=
0
)
required
=
0
)
...
@@ -72,6 +73,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -72,6 +73,7 @@ class MatrixBoxWidget(Widget.Widget):
description
=
(
description
=
(
"Method returning columns, lines and tabs. The method is passed"
"Method returning columns, lines and tabs. The method is passed"
" matrixbox=True, base_id=base_id as arguments."
),
" matrixbox=True, base_id=base_id as arguments."
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
columns
=
fields
.
ListTextAreaField
(
'columns'
,
columns
=
fields
.
ListTextAreaField
(
'columns'
,
...
@@ -83,6 +85,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -83,6 +85,7 @@ class MatrixBoxWidget(Widget.Widget):
"to the user.
\
n
"
"to the user.
\
n
"
"For example (('color/blue', 'Bleu'), ('color/red','Red')).
\
n
"
"For example (('color/blue', 'Bleu'), ('color/red','Red')).
\
n
"
" Deprecated, use cell range method instead"
),
" Deprecated, use cell range method instead"
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -94,6 +97,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -94,6 +97,7 @@ class MatrixBoxWidget(Widget.Widget):
"to the user.
\
n
"
"to the user.
\
n
"
"For example (('size/baby/02','baby/02'),('size/baby/03','baby/03')).
\
n
"
"For example (('size/baby/02','baby/02'),('size/baby/03','baby/03')).
\
n
"
"Deprecated, use cell range method instead"
),
"Deprecated, use cell range method instead"
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -104,6 +108,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -104,6 +108,7 @@ class MatrixBoxWidget(Widget.Widget):
"and Columns.
\
n
"
"and Columns.
\
n
"
"This is used only if you have more than 2 kinds of variations.
\
n
"
"This is used only if you have more than 2 kinds of variations.
\
n
"
"Deprecated, use cell range method instead"
),
"Deprecated, use cell range method instead"
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -112,6 +117,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -112,6 +117,7 @@ class MatrixBoxWidget(Widget.Widget):
title
=
"Cell Range"
,
title
=
"Cell Range"
,
description
=
(
description
=
(
"This defines the range of the matrix."
),
"This defines the range of the matrix."
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
getter_method
=
fields
.
StringField
(
'getter_method'
,
getter_method
=
fields
.
StringField
(
'getter_method'
,
...
@@ -120,7 +126,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -120,7 +126,7 @@ class MatrixBoxWidget(Widget.Widget):
"You can specify a specific method in order to retrieve the context. "
"You can specify a specific method in order to retrieve the context. "
"This field can be empty, if so the MatrixBox will use the default "
"This field can be empty, if so the MatrixBox will use the default "
"context."
),
"context."
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
@@ -130,6 +136,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -130,6 +136,7 @@ class MatrixBoxWidget(Widget.Widget):
"You can specify a method in order to retrieve cells. This field can "
"You can specify a method in order to retrieve cells. This field can "
"be empty, if so the MatrixBox will use the default method : getCell."
"be empty, if so the MatrixBox will use the default method : getCell."
),
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
@@ -139,7 +146,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -139,7 +146,7 @@ class MatrixBoxWidget(Widget.Widget):
"You can specify a specific method in order to create cells. "
"You can specify a specific method in order to create cells. "
"This field can be empty, if so the MatrixBox will use the default "
"This field can be empty, if so the MatrixBox will use the default "
"method : newCell."
),
"method : newCell."
),
css_class
=
"form-control"
,
default
=
''
,
default
=
''
,
required
=
0
)
required
=
0
)
...
@@ -149,6 +156,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -149,6 +156,7 @@ class MatrixBoxWidget(Widget.Widget):
"A list of attributes which are set by hidden fields called "
"A list of attributes which are set by hidden fields called "
"matrixbox_attribute_name. This is used "
"matrixbox_attribute_name. This is used "
"when we want to specify a computed value for each cell"
),
"when we want to specify a computed value for each cell"
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -158,6 +166,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -158,6 +166,7 @@ class MatrixBoxWidget(Widget.Widget):
"An optional list of globals attributes which are set by hidden "
"An optional list of globals attributes which are set by hidden "
"fields and which are applied to each cell. "
"fields and which are applied to each cell. "
"This is used if we want to set the same value for every cell"
),
"This is used if we want to set the same value for every cell"
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
@@ -166,6 +175,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -166,6 +175,7 @@ class MatrixBoxWidget(Widget.Widget):
description
=
(
description
=
(
"The Base id for cells : this is the name used to store cells, "
"The Base id for cells : this is the name used to store cells, "
"we usually use names like : 'movement', 'path', ... "
),
"we usually use names like : 'movement', 'path', ... "
),
css_class
=
"form-control"
,
default
=
'cell'
,
default
=
'cell'
,
required
=
0
)
required
=
0
)
...
@@ -174,6 +184,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -174,6 +184,7 @@ class MatrixBoxWidget(Widget.Widget):
description
=
(
description
=
(
"The Portal Type for cells : This is the portal type used to "
"The Portal Type for cells : This is the portal type used to "
"create a new cell."
),
"create a new cell."
),
css_class
=
"form-control"
,
default
=
'Mapped Value'
,
default
=
'Mapped Value'
,
required
=
0
)
required
=
0
)
...
@@ -181,6 +192,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -181,6 +192,7 @@ class MatrixBoxWidget(Widget.Widget):
title
=
"Update Cell Range"
,
title
=
"Update Cell Range"
,
description
=
(
description
=
(
"The cell range should be updated upon edit."
),
"The cell range should be updated upon edit."
),
css_class
=
"form-check-input"
,
default
=
0
)
default
=
0
)
url_cells
=
fields
.
ListTextAreaField
(
'url_cells'
,
url_cells
=
fields
.
ListTextAreaField
(
'url_cells'
,
...
@@ -188,6 +200,7 @@ class MatrixBoxWidget(Widget.Widget):
...
@@ -188,6 +200,7 @@ class MatrixBoxWidget(Widget.Widget):
description
=
(
description
=
(
"An optional list of cells which can provide a custom URL."
"An optional list of cells which can provide a custom URL."
"If no url cell is used, then no link is displayed."
),
"If no url cell is used, then no link is displayed."
),
css_class
=
"form-control"
,
default
=
[],
default
=
[],
required
=
0
)
required
=
0
)
...
...
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