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
138
Merge Requests
138
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
40b116a0
Commit
40b116a0
authored
Nov 17, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Form: modernize add field in ZMI
parent
af788214
Pipeline
#38553
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
32 deletions
+22
-32
product/ERP5Form/Form.py
product/ERP5Form/Form.py
+1
-0
product/ERP5Form/dtml/fieldAdd.dtml
product/ERP5Form/dtml/fieldAdd.dtml
+20
-32
product/Formulator/Form.py
product/Formulator/Form.py
+1
-0
No files found.
product/ERP5Form/Form.py
View file @
40b116a0
...
...
@@ -456,6 +456,7 @@ def initializeForm(field_registry, form_class=None):
# set up individual add dictionaries for meta_types
dict
=
{
'name'
:
field
.
meta_type
,
'permission'
:
'Add Formulator Fields'
,
'zmi_show_add_dialog'
:
'modal'
,
'action'
:
'manage_addProduct/Formulator/manage_add%sForm'
%
meta_type
}
meta_types
.
append
(
dict
)
...
...
product/ERP5Form/dtml/fieldAdd.dtml
View file @
40b116a0
<dtml-var manage_page_header>
<main class="container-fluid">
<dtml-var "manage_form_title(this(), _,
form_title='Add %s' % fieldname,
)">
...
...
@@ -10,43 +12,29 @@ Add a <dtml-var fieldname> to the form.
<form action="manage_addField" method="POST">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
<div class="form-group row">
<label for="id" class="form-label col-sm-3 col-md-2">Id</label>
<div class="col-sm-9 col-md-10">
<input id="id" class="form-control code" type="text" name="id" />
</div>
</div>
<div class="form-group row">
<label for="title" class="form-label col-sm-3 col-md-2">Title</label>
<div class="col-sm-9 col-md-10">
<input id="title" class="form-control" type="text" name="title" />
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<input type="hidden" name="fieldname" value="&dtml-fieldname;">
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit_add"
value=" Add " />
<input class="form-element" type="submit" name="submit_add_and_edit"
value=" Add and Edit " />
<div class="zmi-controls">
<input class="btn btn-primary" type="submit" name="submit" value="Add" />
<input class="btn btn-primary" type="submit" name="submit_add_and_edit" value="Add and Edit" />
</div>
</td>
</tr>
</table>
</form>
</main>
<dtml-var manage_page_footer>
product/Formulator/Form.py
View file @
40b116a0
...
...
@@ -1053,6 +1053,7 @@ def initializeForm(field_registry):
# set up individual add dictionaries for meta_types
dict
=
{
'name'
:
field
.
meta_type
,
'zmi_show_add_dialog'
:
'modal'
,
'action'
:
'manage_addProduct/Formulator/manage_add%sForm'
%
meta_type
}
meta_types
.
append
(
dict
)
...
...
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