Commit adcce185 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Form/Formulator: Minimal support of Zope4's ZMI

Only the most used forms are updated
parent 81cb4c40
...@@ -93,6 +93,7 @@ class FormBoxWidget(Widget.Widget): ...@@ -93,6 +93,7 @@ class FormBoxWidget(Widget.Widget):
title='Form ID', title='Form ID',
description=( description=(
"ID of the form which must be rendered in this box."), "ID of the form which must be rendered in this box."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -101,6 +102,7 @@ class FormBoxWidget(Widget.Widget): ...@@ -101,6 +102,7 @@ class FormBoxWidget(Widget.Widget):
title='Context method ID', title='Context method ID',
description=( description=(
"ID of the method that returns a context for this box."), "ID of the method that returns a context for this box."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -109,6 +111,7 @@ class FormBoxWidget(Widget.Widget): ...@@ -109,6 +111,7 @@ class FormBoxWidget(Widget.Widget):
title='Default', title='Default',
description=( description=(
"A default value (not used)."), "A default value (not used)."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -179,6 +182,7 @@ class FormBoxValidator(Validator.Validator): ...@@ -179,6 +182,7 @@ class FormBoxValidator(Validator.Validator):
'validator_form_field_prefix', 'validator_form_field_prefix',
title='Validator Form Field Prefix', title='Validator Form Field Prefix',
description= "Field prefix value used when validating fields", description= "Field prefix value used when validating fields",
css_class="form-control",
default="my_", default="my_",
display_width=40, display_width=40,
required=1 required=1
......
This diff is collapsed.
...@@ -80,6 +80,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -80,6 +80,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Update Method', title='Update Method',
description=( description=(
"The method to call to set the relation. Required."), "The method to call to set the relation. Required."),
css_class="form-control",
default="Base_validateRelation", default="Base_validateRelation",
required=1) required=1)
...@@ -87,6 +88,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -87,6 +88,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Jump Method', title='Jump Method',
description=( description=(
"The method to call to jump to the relation. Required."), "The method to call to jump to the relation. Required."),
css_class="form-control",
default="Base_jumpToRelatedDocument", default="Base_jumpToRelatedDocument",
required=1) required=1)
...@@ -94,6 +96,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -94,6 +96,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Allow Jump', title='Allow Jump',
description=( description=(
"Do we allow to jump to the relation ?"), "Do we allow to jump to the relation ?"),
css_class="form-check-input",
default=1, default=1,
required=0) required=0)
...@@ -101,6 +104,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -101,6 +104,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Base Category', title='Base Category',
description=( description=(
"The method to call to set the relation. Required."), "The method to call to set the relation. Required."),
css_class="form-control",
default="", default="",
required=1) required=1)
...@@ -108,6 +112,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -108,6 +112,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Portal Type', title='Portal Type',
description=( description=(
"The method to call to set the relation. Required."), "The method to call to set the relation. Required."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -115,6 +120,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -115,6 +120,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Allow Creation', title='Allow Creation',
description=( description=(
"Do we allow to create new objects ?"), "Do we allow to create new objects ?"),
css_class="form-check-input",
default=1, default=1,
required=0) required=0)
...@@ -122,6 +128,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -122,6 +128,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Container Getter Method', title='Container Getter Method',
description=( description=(
"The method to call to get a container object."), "The method to call to get a container object."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -129,6 +136,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -129,6 +136,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Context Getter Method', title='Context Getter Method',
description=( description=(
"The method to call to get the context."), "The method to call to get the context."),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -136,6 +144,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -136,6 +144,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Catalog Index', title='Catalog Index',
description=( description=(
"The method to call to set the relation. Required."), "The method to call to set the relation. Required."),
css_class="form-control",
default="", default="",
required=1) required=1)
...@@ -145,6 +154,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -145,6 +154,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Relation Update Method', title='Relation Update Method',
description=( description=(
"The method to invoke in order to update the relation"), "The method to invoke in order to update the relation"),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -152,6 +162,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -152,6 +162,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='Relation Form', title='Relation Form',
description=( description=(
"Form to display relation choices"), "Form to display relation choices"),
css_class="form-control",
default="", default="",
required=0) required=0)
...@@ -161,6 +172,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -161,6 +172,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
"The display size in rows of the field. If set to 1, the " "The display size in rows of the field. If set to 1, the "
"widget will be displayed as a drop down box by many browsers, " "widget will be displayed as a drop down box by many browsers, "
"if set to something higher, a list will be shown. Required."), "if set to something higher, a list will be shown. Required."),
css_class="form-control",
default=1, default=1,
required=1) required=1)
...@@ -168,12 +180,14 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -168,12 +180,14 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title="Columns", title="Columns",
description=( description=(
"A list of attributes names to display."), "A list of attributes names to display."),
css_class="form-control",
default=[], default=[],
required=0) required=0)
sort = fields.ListTextAreaField('sort', sort = fields.ListTextAreaField('sort',
title='Default Sort', title='Default Sort',
description=('The default sort keys and order'), description=('The default sort keys and order'),
css_class="form-control",
default=[], default=[],
required=0) required=0)
...@@ -181,6 +195,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -181,6 +195,7 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title="Parameter List", title="Parameter List",
description=( description=(
"A list of paramters used for the portal_catalog."), "A list of paramters used for the portal_catalog."),
css_class="form-control",
default=[], default=[],
required=0) required=0)
...@@ -188,12 +203,14 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -188,12 +203,14 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
title='List Method', title='List Method',
description=('The method to use to list' description=('The method to use to list'
'objects'), 'objects'),
css_class="form-control",
default='', default='',
required=0) required=0)
proxy_listbox_ids = fields.ListTextAreaField('proxy_listbox_ids', proxy_listbox_ids = fields.ListTextAreaField('proxy_listbox_ids',
title='Proxy Listbox IDs', title='Proxy Listbox IDs',
description=('A list of listbox that can be used as proxy'), description=('A list of listbox that can be used as proxy'),
css_class="form-control",
default='', default='',
required=0) required=0)
......
...@@ -90,6 +90,7 @@ class ProxyWidget(Widget.Widget): ...@@ -90,6 +90,7 @@ class ProxyWidget(Widget.Widget):
title='Form ID', title='Form ID',
description= \ description= \
"ID of the master form.", "ID of the master form.",
css_class="form-control",
default="", default="",
display_width=40, display_width=40,
required=1) required=1)
...@@ -99,6 +100,7 @@ class ProxyWidget(Widget.Widget): ...@@ -99,6 +100,7 @@ class ProxyWidget(Widget.Widget):
title='Field ID', title='Field ID',
description= \ description= \
"ID of the field in the master form.", "ID of the field in the master form.",
css_class="form-control",
default="", default="",
display_width=40, display_width=40,
required=1) required=1)
......
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var manage_tabs> <dtml-var manage_tabs>
<p class="form-help"> <main class="container-fluid">
<p class="form-help lead">
Change the display order and grouping of the fields in this form. Change the display order and grouping of the fields in this form.
</p> </p>
<table border="1" cellspacing="1" cellpadding="3"> <table class="table table-bordered">
<dtml-let all_groups="get_groups(include_empty=1)" <dtml-let all_groups="get_groups(include_empty=1)"
group_length="get_largest_group_length()" group_length="get_largest_group_length()"
first_group="all_groups and all_groups[0] or None"> first_group="all_groups and all_groups[0] or None">
...@@ -14,119 +15,91 @@ Change the display order and grouping of the fields in this form. ...@@ -14,119 +15,91 @@ Change the display order and grouping of the fields in this form.
<dtml-let groups=sequence-item> <dtml-let groups=sequence-item>
<dtml-in groups> <dtml-in groups>
<dtml-let group=sequence-item> <dtml-let group=sequence-item>
<td nowrap valign="top"> <td>
<table border="0" cellspacing="0" cellpadding="0"> <table class="table">
<form action="." method="POST"> <form action="." method="POST">
<input type="hidden" name="group" value="&dtml-group;"> <input type="hidden" name="group" value="&dtml-group;">
<tr><td align="center" class="list-header"> <tr><td>
<div class="list-nav"> <div class="font-weight-bold">
<dtml-var group html_quote> <dtml-var group html_quote>
</div> </div>
</td></tr> </td></tr>
<tr><td align="left"> <tr><td>
<dtml-let fields="get_fields_in_group(group, include_disabled=1)" fields_amount="_.len(fields)"> <dtml-let fields="get_fields_in_group(group)" fields_amount="_.len(fields)">
<table border="0" cellspacing="0" cellpadding="0"> <table class="table table-borderless table-sm">
<dtml-in fields> <dtml-in fields>
<dtml-let field=sequence-item field_id="field.id"> <dtml-let field=sequence-item field_id="field.id">
<tr><td height="25"> <tr><td>
<div class="list-item"> <input type="checkbox" name="&dtml-field_id;">&nbsp;<a href="&dtml-field_id;/manage_main"><img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;" title="&dtml-meta_type;" border="0"></a>&nbsp;<a href="&dtml-field_id;/manage_main"><dtml-var field_id></a>
<dtml-if expr="REQUEST.has_key(field_id)"><input type="checkbox" name="&dtml-field_id;" checked="checked">
<dtml-else><input type="checkbox" name="&dtml-field_id;">
</dtml-if>
&nbsp;<a href="&dtml-field_id;/manage_main"><img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;" title="&dtml-meta_type;" border="0"></a>&nbsp;<a href="&dtml-field_id;/manage_main"><dtml-var field_id></a>
</div>
</td></tr> </td></tr>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
<dtml-in "_.range(group_length - fields_amount)"> <dtml-in "_.range(group_length - fields_amount)">
<tr><td height="25"></td></tr> <tr><td></td></tr>
</dtml-in> </dtml-in>
</dtml-let> </dtml-let>
</table> </table>
</td></tr> </td></tr>
<tr><td align="center"> <tr><td>
<input class="form-element" type="submit" name="manage_move_field_up:method" <input class="btn btn-secondary" type="submit" name="manage_move_field_up:method"
value="Move Up"> value="Move Up">
<input class="btn btn-secondary" type="submit" name="manage_move_field_down:method"
value="Move Dn">
</td></tr> </td></tr>
<tr><td align="center"> <tr><td>
<input class="form-element" type="submit" name="manage_move_field_down:method" <div class="form-group">
value="Move Dn"><br><br> <select class="form-control mb-2" name="to_group" size="1">
</td></tr> <option>Transfer Selected Fields to:</option>
<tr><td align="center">
<div class="form-element">
<select class="form-element" name="to_group" size="1">
<option>Move to:</option>
<dtml-in all_groups> <dtml-in all_groups>
<option><dtml-var sequence-item html_quote></option> <option><dtml-var sequence-item html_quote></option>
</dtml-in> </dtml-in>
</select> </select>
</div> <input type="submit" class="btn btn-secondary mb-2" name="manage_move_group:method"
</td></tr>
<tr><td align="center">
<input class="form-element" type="submit" name="manage_move_group:method"
value="Transfer"> value="Transfer">
</div>
</td></tr> </td></tr>
<dtml-if "group != first_group"> <dtml-if "group != first_group">
<tr><td>
<tr><td align="center" class="list-header"> <div class="form-group">
<div class="list-item"> <input class="btn btn-secondary" type="submit" name="manage_move_group_up:method"
Group value="Move Group Up">
<input class="btn btn-secondary" type="submit" name="manage_move_group_down:method"
value="Move Group Down">
</div> </div>
</td></tr> </td></tr>
<tr><td align="center"> <tr><td>
<input class="form-element" type="submit" name="manage_move_group_up:method" <div class="form-group">
value="Move Up"> <input type="text" class="form-control form-control-sm" name="new_name" value="" size="10">
</td></tr> <input class="btn btn-secondary" type="submit" name="manage_rename_group:method"
value="Rename Group">
<tr><td align="center"> </div>
<input class="form-element" type="submit" name="manage_move_group_down:method"
value="Move Dn"><br><br>
</td></tr>
<tr><td align="center">
<input type="text" name="new_name" value="" size="10">
</td></tr>
<tr><td align="center">
<input class="form-element" type="submit" name="manage_rename_group:method"
value="Rename"><br>
</td></tr> </td></tr>
<tr><td align="center"> <tr><td>
<input class="form-element" type="submit" name="manage_remove_group:method" <input class="btn btn-secondary" type="submit" name="manage_remove_group:method"
value="Remove"><br> value="Remove Group">
</td></tr> </td></tr>
<dtml-else> <dtml-else>
<tr><td align="center" class="list-header"> <tr><td>
<div class="list-item"> <div class="form-group">
Group <input type="text" class="form-control form-control-sm" name="new_group" value="" size="10">
<input type="submit" class="btn btn-secondary" name="manage_add_group:method" value="Create Group">
</div> </div>
</td></tr> </td></tr>
<tr><td align="center"> <tr><td>
<input type="text" name="new_group" value="" size="10"> <div class="form-group">
</td></tr> <input type="text" class="form-control form-control-sm" name="new_name" value="" size="10">
<input class="btn btn-secondary" type="submit" name="manage_rename_group:method"
<tr><td align="center"> value="Rename Group">
<input type="submit" name="manage_add_group:method" value="Create"><br><br> </div>
</td></tr>
<tr><td align="center">
<input type="text" name="new_name" value="" size="10">
</td></tr>
<tr><td align="center">
<input class="form-element" type="submit" name="manage_rename_group:method"
value="Rename"><br>
</td></tr> </td></tr>
</dtml-if> </dtml-if>
...@@ -141,5 +114,5 @@ Change the display order and grouping of the fields in this form. ...@@ -141,5 +114,5 @@ Change the display order and grouping of the fields in this form.
</dtml-in> </dtml-in>
</dtml-let> </dtml-let>
</table> </table>
</main>
<dtml-var manage_page_footer> <dtml-var manage_page_footer>
<style>form td:not(:last-child) { padding-right: 1em; }</style>
<dtml-var manage_page_header> <dtml-var manage_page_header>
<style>
textarea.form-control {
resize: both;
}
textarea.form-control, input[type=text].form-control {
font-family: monospace;
}
</style>
<dtml-let help_product="'Formulator'" help_topic=meta_type> <dtml-let help_product="'Formulator'" help_topic=meta_type>
<dtml-var manage_tabs> <dtml-var manage_tabs>
</dtml-let> </dtml-let>
<p class="form-help"> <main class="container-fluid">
<p class="form-help lead">
Surcharge <dtml-var meta_type> properties here. Surcharge <dtml-var meta_type> properties here.
</p> </p>
<form action="manage_edit" method="POST"> <form action="manage_edit" method="POST">
<table cellspacing="0" cellpadding="2" border="0"> <table class="table table-striped table-hover table-sm">
<dtml-let proxy_field="this()" <dtml-let proxy_field="this()"
current_field="None if proxy_field.getTemplateField() is None else proxy_field.getRecursiveTemplateField()"> current_field="None if proxy_field.getTemplateField() is None else proxy_field.getRecursiveTemplateField()">
...@@ -20,7 +28,7 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -20,7 +28,7 @@ Surcharge <dtml-var meta_type> properties here.
<dtml-if fields> <dtml-if fields>
<tr> <tr>
<td colspan="3" class="form-title"> <td colspan="4" class="font-weight-bold">
Proxy Widget properties <dtml-if "current_field is not None">(<dtml-var expr="current_field.meta_type">)</dtml-if> Proxy Widget properties <dtml-if "current_field is not None">(<dtml-var expr="current_field.meta_type">)</dtml-if>
</td> </td>
</tr> </tr>
...@@ -32,20 +40,20 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -32,20 +40,20 @@ Surcharge <dtml-var meta_type> properties here.
override="current_field.get_override(field_id)" override="current_field.get_override(field_id)"
tales="current_field.get_tales(field_id)"> tales="current_field.get_tales(field_id)">
<tr> <tr>
<td align="left" valign="top"> <td>
<div class="form-label">
<dtml-if "tales or override">[</dtml-if><dtml-var "field.title()"><dtml-if "field.has_value('required') and field.get_value('required')">*</dtml-if><dtml-if "tales or override">]</dtml-if> <dtml-if "tales or override">[</dtml-if><dtml-var "field.title()"><dtml-if "field.has_value('required') and field.get_value('required')">*</dtml-if><dtml-if "tales or override">]</dtml-if>
</div>
</td> </td>
<td align="left" valign="top"> <td>
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
<td><div class="form-element"> <td>
<dtml-var "field.meta_type"> <dtml-var "field.meta_type">
</div></td> </td>
<td><div class="form-element"> <td>
<dtml-var "field.get_value('description')"> <p class="form-text">
</div></td> <small><dtml-var "field.get_value('description')"></small>
</p>
</td>
</tr> </tr>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
...@@ -55,17 +63,17 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -55,17 +63,17 @@ Surcharge <dtml-var meta_type> properties here.
</dtml-in> </dtml-in>
<tr> <tr>
<td align="left" valign="top"> <td>
<div class="form-label">Proxy Target</div> <div>Proxy Target</div>
</td> </td>
<td align="left" valign="top"> <td>
<a href="manage_edit_target">Click to edit the target</a> <a href="manage_edit_target" class="btn btn-info">Click to edit the target</a>
</td> </td>
<td></td><td></td> <td></td><td></td>
</tr> </tr>
</table> </table>
<table cellspacing="0" cellpadding="2" border="0"> <table class="table table-striped table-hover table-sm">
<!-- Then, display Template Field properties --> <!-- Then, display Template Field properties -->
<dtml-if "current_field is not None"> <dtml-if "current_field is not None">
...@@ -75,7 +83,7 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -75,7 +83,7 @@ Surcharge <dtml-var meta_type> properties here.
<dtml-let group=sequence-item fields="form.get_fields_in_group(group)"> <dtml-let group=sequence-item fields="form.get_fields_in_group(group)">
<dtml-if fields> <dtml-if fields>
<tr> <tr>
<td colspan="3" class="form-title"> <td colspan="5" class="font-weight-bold">
<dtml-var group capitalize> properties <dtml-var group capitalize> properties
</td> </td>
</tr> </tr>
...@@ -84,11 +92,12 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -84,11 +92,12 @@ Surcharge <dtml-var meta_type> properties here.
<dtml-in fields> <dtml-in fields>
<dtml-let field=sequence-item field_id="field.id" <dtml-let field=sequence-item field_id="field.id"
is_datetime_field="field.meta_type == 'DateTimeField'"
value="proxy_field.get_recursive_orig_value(field_id)" value="proxy_field.get_recursive_orig_value(field_id)"
override="proxy_field.get_recursive_override(field_id)" override="proxy_field.get_recursive_override(field_id)"
tales="proxy_field.get_recursive_tales(field_id)"> tales="proxy_field.get_recursive_tales(field_id)">
<tr> <tr>
<td align="left" valign="top"> <td>
<dtml-let checkbox_key="'surcharge_%s' % field_id" > <dtml-let checkbox_key="'surcharge_%s' % field_id" >
<dtml-if "proxy_field.is_delegated(field_id)"> <dtml-if "proxy_field.is_delegated(field_id)">
<input type="checkbox" <input type="checkbox"
...@@ -102,8 +111,7 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -102,8 +111,7 @@ Surcharge <dtml-var meta_type> properties here.
</dtml-if > </dtml-if >
</dtml-let > </dtml-let >
</td> </td>
<td align="left" valign="top"> <td>
<div class="form-label">
<dtml-if "tales or override">[ <dtml-if "tales or override">[
</dtml-if> </dtml-if>
<dtml-var "field.title()"> <dtml-var "field.title()">
...@@ -111,23 +119,24 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -111,23 +119,24 @@ Surcharge <dtml-var meta_type> properties here.
</dtml-if> </dtml-if>
<dtml-if "tales or override">] <dtml-if "tales or override">]
</dtml-if> </dtml-if>
</div>
</td> </td>
<dtml-if "proxy_field.is_delegated(field_id)"> <dtml-if "proxy_field.is_delegated(field_id)">
<td align="left" valign="top" class="to_disable delegated"> <td class="to_disable delegated <dtml-if is_datetime_field>form-inline</dtml-if>">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
<dtml-else > <dtml-else >
<td align="left" valign="top" class="to_disable"> <td class="to_disable <dtml-if is_datetime_field>form-inline</dtml-if>">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
</dtml-if> </dtml-if>
<td><div class="form-element"> <td>
<dtml-var "field.meta_type"> <dtml-var "field.meta_type">
</div></td> </td>
<td><div class="form-element"> <td>
<dtml-var "field.get_value('description')"> <p class="form-text">
</div></td> <small><dtml-var "field.get_value('description')"></small>
</p>
</td>
</tr> </tr>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
...@@ -140,13 +149,13 @@ Surcharge <dtml-var meta_type> properties here. ...@@ -140,13 +149,13 @@ Surcharge <dtml-var meta_type> properties here.
</dtml-let> </dtml-let>
</table> </table>
<div class="form-element"> <div class="zmi-controls">
<input class="form-element" type="submit" name="submit" <input class="btn btn-primary" type="submit" name="submit" value="Save Changes" />
value="Save Changes" /> </div>
</div>
</form>
</form>
</main>
<script type="text/javascript"> <script type="text/javascript">
function isClass(object, className) { function isClass(object, className) {
if (object.className != undefined){ if (object.className != undefined){
......
<tr class="list-header"> <thead class="thead-light">
<td align="left" valign="top"> <tr>
<div class="form-label"> <th>
Delegated Delegated
</div> </th>
</td> <th>
<td align="left" valign="top">
<div class="form-label">
Name Name
</div> </th>
</td> <th class="w-50">
<td align="left" valign="top">
<div class="form-label">
Value Value
</div> </th>
</td> <th>
<td align="left" valign="top">
<div class="form-label">
Field Field
</div> </th>
</td>
<dtml-if "_['URL'].endswith(('/manage_main', '/manage_edit'))"> <dtml-if "_['URL'].endswith(('/manage_main', '/manage_edit'))">
<td align="left" valign="top"> <th>
<div class="form-label">
Description Description
</div> </th>
</td>
</dtml-if> </dtml-if>
</tr> </tr>
</thead>
\ No newline at end of file
<style>form td:not(:last-child) { padding-right: 1em; }</style>
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var manage_tabs> <dtml-var manage_tabs>
<p class="form-help"> <main class="container-fluid">
<p class="form-help lead">
Edit <dtml-var meta_type> method TALES expressions here. Edit <dtml-var meta_type> method TALES expressions here.
<dtml-if "not isTALESAvailable()"><br> <dtml-if "not isTALESAvailable()"><br>
<span style="color: #FF0000;"> <span style="color: #FF0000;">
...@@ -14,7 +14,7 @@ This tab can therefore not be used. ...@@ -14,7 +14,7 @@ This tab can therefore not be used.
<form action="manage_tales" method="POST"> <form action="manage_tales" method="POST">
<table cellspacing="0" cellpadding="2" border="0"> <table class="table table-striped table-hover table-sm">
<dtml-in "override_form.get_groups()"> <dtml-in "override_form.get_groups()">
...@@ -22,7 +22,7 @@ This tab can therefore not be used. ...@@ -22,7 +22,7 @@ This tab can therefore not be used.
<dtml-if fields> <dtml-if fields>
<tr> <tr>
<td colspan="3" class="form-title"> <td colspan="3" class="font-weight-bold">
Proxy Widget properties Proxy Widget properties
</td> </td>
</tr> </tr>
...@@ -34,17 +34,15 @@ This tab can therefore not be used. ...@@ -34,17 +34,15 @@ This tab can therefore not be used.
<dtml-let field=sequence-item field_id="field.id" <dtml-let field=sequence-item field_id="field.id"
value="current_field.get_tales(field.id)"> value="current_field.get_tales(field.id)">
<tr> <tr>
<td align="left" valign="top"> <td>
<div class="form-label">
<dtml-var "field.title()"> <dtml-var "field.title()">
</div>
</td> </td>
<td align="left" valign="top"> <td>
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
<td><div class="form-element"> <td>
<dtml-var "current_field.form.get_field(field.id).meta_type"> <dtml-var "current_field.form.get_field(field.id).meta_type">
</div></td> </td>
</tr> </tr>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
...@@ -54,17 +52,17 @@ This tab can therefore not be used. ...@@ -54,17 +52,17 @@ This tab can therefore not be used.
</dtml-in> </dtml-in>
<tr> <tr>
<td align="left" valign="top"> <td>
<div class="form-label">Proxy Target</div> <div>Proxy Target</div>
</td> </td>
<td align="left" valign="top"> <td>
<a href="manage_tales_target">Click to edit the target</a> <a href="manage_tales_target" class="btn btn-info">Click to edit the target</a>
</td> </td>
<td></td> <td></td>
</tr> </tr>
</table> </table>
<table cellspacing="0" cellpadding="2" border="0"> <table class="table table-striped table-hover table-sm">
<!-- XXX Loop until find not a proxy field --> <!-- XXX Loop until find not a proxy field -->
<dtml-let proxy_field="this()" <dtml-let proxy_field="this()"
...@@ -77,7 +75,7 @@ This tab can therefore not be used. ...@@ -77,7 +75,7 @@ This tab can therefore not be used.
<dtml-let group=sequence-item fields="form.get_fields_in_group(group)"> <dtml-let group=sequence-item fields="form.get_fields_in_group(group)">
<dtml-if fields> <dtml-if fields>
<tr> <tr>
<td colspan="3" class="form-title"> <td colspan="4" class="font-weight-bold">
<dtml-var group capitalize> properties <dtml-var group capitalize> properties
</td> </td>
</tr> </tr>
...@@ -86,11 +84,10 @@ This tab can therefore not be used. ...@@ -86,11 +84,10 @@ This tab can therefore not be used.
<dtml-in fields> <dtml-in fields>
<dtml-let field=sequence-item field_id="field.id" <dtml-let field=sequence-item field_id="field.id"
value="proxy_field.get_recursive_tales(field_id)"> value="proxy_field.get_recursive_tales(field_id)">
<tr> <tr>
<td align="left" valign="top"> <td>
<dtml-let checkbox_key="'surcharge_%s' % field_id" > <dtml-let checkbox_key="'surcharge_%s' % field_id" >
<dtml-if "proxy_field.is_delegated(field_id)"> <dtml-if "proxy_field.is_delegated(field_id)">
<input type="checkbox" <input type="checkbox"
...@@ -105,25 +102,21 @@ This tab can therefore not be used. ...@@ -105,25 +102,21 @@ This tab can therefore not be used.
</dtml-let > </dtml-let >
</td> </td>
<td>
<td align="left" valign="top">
<div class="form-label">
<dtml-var "field.title()"> <dtml-var "field.title()">
</div>
</td> </td>
<dtml-if "proxy_field.is_delegated(field_id)"> <dtml-if "proxy_field.is_delegated(field_id)">
<td align="left" valign="top" class="to_disable delegated"> <td class="to_disable delegated">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
<dtml-else > <dtml-else >
<td align="left" valign="top" class="to_disable"> <td class="to_disable">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
</dtml-if> </dtml-if>
<td><div class="form-element"> <td>
<dtml-var "current_field.form.get_field(field.id).meta_type"> <dtml-var "current_field.form.get_field(field.id).meta_type">
</div></td> </td>
</tr> </tr>
</dtml-let> </dtml-let>
...@@ -138,12 +131,14 @@ This tab can therefore not be used. ...@@ -138,12 +131,14 @@ This tab can therefore not be used.
</dtml-let> </dtml-let>
</table> </table>
<div class="form-element">
<input class="form-element" type="submit" name="submit" <div class="zmi-controls">
value="Save Changes" /> <input class="btn btn-primary" type="submit" name="submit" value="Save Changes" />
</div> </div>
</form> </form>
</main>
<script type="text/javascript"> <script type="text/javascript">
function isClass(object, className) { function isClass(object, className) {
if (object.className != undefined){ if (object.className != undefined){
......
...@@ -73,6 +73,8 @@ def initializeFieldForm(field_class): ...@@ -73,6 +73,8 @@ def initializeFieldForm(field_class):
tales_field = fields.TALESField(field.id, tales_field = fields.TALESField(field.id,
title=field.get_value('title'), title=field.get_value('title'),
description="", description="",
css_class="form-control code",
extra='id="%s"' % field.id,
default="", default="",
display_width=40, display_width=40,
required=0) required=0)
...@@ -81,6 +83,8 @@ def initializeFieldForm(field_class): ...@@ -81,6 +83,8 @@ def initializeFieldForm(field_class):
method_field = fields.MethodField(field.id, method_field = fields.MethodField(field.id,
title=field.get_value("title"), title=field.get_value("title"),
description="", description="",
css_class="form-control code",
extra='id="%s"' % field.id,
default="", default="",
required=0) required=0)
override_form.add_field(method_field, "widget") override_form.add_field(method_field, "widget")
...@@ -89,6 +93,8 @@ def initializeFieldForm(field_class): ...@@ -89,6 +93,8 @@ def initializeFieldForm(field_class):
form.add_field(field, "validator") form.add_field(field, "validator")
tales_field = fields.TALESField(field.id, tales_field = fields.TALESField(field.id,
title=field.get_value('title'), title=field.get_value('title'),
css_class="form-control code",
extra='id="%s"' % field.id,
description="", description="",
default="", default="",
display_with=40, display_with=40,
...@@ -97,6 +103,8 @@ def initializeFieldForm(field_class): ...@@ -97,6 +103,8 @@ def initializeFieldForm(field_class):
method_field = fields.MethodField(field.id, method_field = fields.MethodField(field.id,
title=field.get_value("title"), title=field.get_value("title"),
css_class="form-control code",
extra='id="%s"' % field.id,
description="", description="",
default="", default="",
required=0) required=0)
......
...@@ -878,9 +878,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -878,9 +878,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
if (len(field_ids) == 1 and if (len(field_ids) == 1 and
self.move_field_up(field_ids[0], group)): self.move_field_up(field_ids[0], group)):
message = "Field %s moved up." % field_ids[0] message = "Field %s moved up." % field_ids[0]
manage_tabs_type = "success"
else: else:
message = "Can't move field up." message = "Can't move field up."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -892,9 +895,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -892,9 +895,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
if (len(field_ids) == 1 and if (len(field_ids) == 1 and
self.move_field_down(field_ids[0], group)): self.move_field_down(field_ids[0], group)):
message = "Field %s moved down." % field_ids[0] message = "Field %s moved down." % field_ids[0]
manage_tabs_type = "success"
else: else:
message = "Can't move field down." message = "Can't move field down."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -909,9 +915,13 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -909,9 +915,13 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
message = "Fields %s transferred from %s to %s." % (fields, message = "Fields %s transferred from %s to %s." % (fields,
group, group,
to_group) to_group)
manage_tabs_type = "success"
else: else:
message = "Can't transfer fields." message = "Can't transfer fields."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -923,9 +933,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -923,9 +933,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
if (group and group != 'Select group' and if (group and group != 'Select group' and
self.add_group(group)): self.add_group(group)):
message = "Group %s created." % (group) message = "Group %s created." % (group)
manage_tabs_type = "success"
else: else:
message = "Can't create group." message = "Can't create group."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -935,9 +948,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -935,9 +948,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
""" """
if self.remove_group(group): if self.remove_group(group):
message = "Group %s removed." % (group) message = "Group %s removed." % (group)
manage_tabs_type = "success"
else: else:
message = "Can't remove group." message = "Can't remove group."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -949,12 +965,16 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -949,12 +965,16 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
new_name = REQUEST['new_name'].strip() new_name = REQUEST['new_name'].strip()
if self.rename_group(group, new_name): if self.rename_group(group, new_name):
message = "Group %s renamed to %s." % (group, new_name) message = "Group %s renamed to %s." % (group, new_name)
manage_tabs_type = "success"
else: else:
message = "Can't rename group." message = "Can't rename group."
manage_tabs_type = "danger"
else: else:
message = "No new name supplied." message = "No new name supplied."
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -964,9 +984,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -964,9 +984,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
""" """
if self.move_group_up(group): if self.move_group_up(group):
message = "Group %s moved up." % group message = "Group %s moved up." % group
manage_tabs_type = "success"
else: else:
message = "Can't move group %s up" % group message = "Can't move group %s up" % group
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
security.declareProtected('Change Formulator Forms', security.declareProtected('Change Formulator Forms',
...@@ -976,9 +999,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form): ...@@ -976,9 +999,12 @@ class ZMIForm(ObjectManager, PropertyManager, RoleManager, Item, Form):
""" """
if self.move_group_down(group): if self.move_group_down(group):
message = "Group %s moved down." % group message = "Group %s moved down." % group
manage_tabs_type = "success"
else: else:
message = "Can't move group %s down" % group message = "Can't move group %s down" % group
manage_tabs_type = "danger"
return self.formOrder(self, REQUEST, return self.formOrder(self, REQUEST,
manage_tabs_type=manage_tabs_type,
manage_tabs_message=message) manage_tabs_message=message)
PythonForm = ZMIForm # NOTE: backwards compatibility PythonForm = ZMIForm # NOTE: backwards compatibility
......
This diff is collapsed.
This diff is collapsed.
<style>form td:not(:last-child) { padding-right: 1em; }</style>
<dtml-var manage_page_header> <dtml-var manage_page_header>
<style>
textarea.form-control {
resize: both;
}
textarea.form-control, input[type=text].form-control {
font-family: monospace;
}
</style>
<dtml-let help_product="'Formulator'" help_topic=meta_type> <dtml-let help_product="'Formulator'" help_topic=meta_type>
<dtml-var manage_tabs> <dtml-var manage_tabs>
</dtml-let> </dtml-let>
<p class="form-help">
<main class="container-fluid">
<p class="form-help lead">
Edit <dtml-var meta_type> properties here. Edit <dtml-var meta_type> properties here.
</p> </p>
<form action="manage_edit" method="POST"> <form action="manage_edit" method="POST">
<table cellspacing="0" cellpadding="2" border="0"> <table class="table table-striped table-hover table-sm">
<dtml-in "form.get_groups()"> <dtml-in "form.get_groups()">
<dtml-let group=sequence-item fields="form.get_fields_in_group(group)"> <dtml-let group=sequence-item fields="form.get_fields_in_group(group)">
<dtml-if fields> <dtml-if fields>
<tr> <tr>
<td colspan="4" class="form-title"> <td colspan="4" class="font-weight-bold">
<dtml-var group capitalize> properties <dtml-var group capitalize> properties
</td> </td>
</tr> </tr>
...@@ -26,24 +35,25 @@ Edit <dtml-var meta_type> properties here. ...@@ -26,24 +35,25 @@ Edit <dtml-var meta_type> properties here.
<dtml-let current_field="this()"> <dtml-let current_field="this()">
<dtml-in fields> <dtml-in fields>
<dtml-let field=sequence-item field_id="field.id" <dtml-let field=sequence-item field_id="field.id"
is_datetime_field="field.meta_type == 'DateTimeField'"
value="current_field.get_orig_value(field_id)" value="current_field.get_orig_value(field_id)"
override="current_field.get_override(field_id)" override="current_field.get_override(field_id)"
tales="current_field.get_tales(field_id)"> tales="current_field.get_tales(field_id)">
<tr> <tr>
<td align="left" valign="top"> <td>
<div class="form-label">
<dtml-if "tales or override">[</dtml-if><dtml-var "field.title()"><dtml-if "field.has_value('required') and field.get_value('required')">*</dtml-if><dtml-if "tales or override">]</dtml-if> <dtml-if "tales or override">[</dtml-if><dtml-var "field.title()"><dtml-if "field.has_value('required') and field.get_value('required')">*</dtml-if><dtml-if "tales or override">]</dtml-if>
</div>
</td> </td>
<td align="left" valign="top"> <td class="<dtml-if is_datetime_field>form-inline</dtml-if>">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> </td>
<td valign="top" ><div class="form-element"> <td>
<dtml-var "field.meta_type"> <dtml-var "field.meta_type">
</div></td> </td>
<td align="left" valign="top"><div class="form-element"> <td>
<dtml-var "field.get_value('description')"> <p class="form-text">
</div></td> <small><dtml-var "field.get_value('description')"></small>
</p>
</td>
</tr> </tr>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
...@@ -53,13 +63,12 @@ Edit <dtml-var meta_type> properties here. ...@@ -53,13 +63,12 @@ Edit <dtml-var meta_type> properties here.
</dtml-in> </dtml-in>
</table> </table>
<div class="form-element"> <div class="zmi-controls">
<input class="form-element" type="submit" name="submit" <input class="btn btn-primary" type="submit" name="submit" value="Save Changes" />
value="Save Changes" /> </div>
</div>
</form> </form>
</main>
<dtml-var manage_page_footer> <dtml-var manage_page_footer>
......
<tr class="list-header"> <thead class="thead-light">
<td align="left" valign="top"> <tr>
<div class="form-label"> <th>
Name Name
</div> </th>
</td> <th class="w-50">
<td align="left" valign="top">
<div class="form-label">
Value Value
</div> </th>
</td> <th>
<td align="left" valign="top">
<div class="form-label">
Field Field
</div> </th>
</td>
<dtml-if "_['URL'].endswith(('/manage_main', '/manage_edit'))"> <dtml-if "_['URL'].endswith(('/manage_main', '/manage_edit'))">
<td align="left" valign="top"> <th>
<div class="form-label">
Description Description
</div> </th>
</td>
</dtml-if> </dtml-if>
</tr> </tr>
</thead>
\ No newline at end of file
<style>form td:not(:last-child) { padding-right: 1em; }</style>
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var manage_tabs> <dtml-var manage_tabs>
<p class="form-help"> <main class="container-fluid">
<p class="form-help lead">
Edit <dtml-var meta_type> method TALES expressions here. Edit <dtml-var meta_type> method TALES expressions here.
<dtml-if "not isTALESAvailable()"><br> <dtml-if "not isTALESAvailable()"><br>
<span style="color: #FF0000;"> <span style="color: #FF0000;">
...@@ -13,50 +13,45 @@ This tab can therefore not be used. ...@@ -13,50 +13,45 @@ This tab can therefore not be used.
</p> </p>
<form action="manage_tales" method="POST"> <form action="manage_tales" method="POST">
<table cellspacing="0" cellpadding="2" border="0">
<dtml-in "override_form.get_groups()"> <dtml-in "override_form.get_groups()">
<dtml-let group=sequence-item fields="tales_form.get_fields_in_group(group)"> <dtml-let group=sequence-item fields="tales_form.get_fields_in_group(group)">
<dtml-if fields> <dtml-if fields>
<tr> <h2>
<td colspan="3" class="form-title">
<dtml-var group capitalize> properties <dtml-var group capitalize> properties
</td> </h2>
</tr>
<dtml-var fieldListHeader>
<dtml-let current_field="this()"> <dtml-let current_field="this()">
<dtml-in fields> <dtml-in fields>
<dtml-let field=sequence-item field_id="field.id" <dtml-let field=sequence-item field_id="field.id"
value="current_field.get_tales(field.id)"> value="current_field.get_tales(field.id)">
<tr>
<td align="left" valign="top"> <div class="form-group row">
<div class="form-label"> <label
<dtml-var "field.title()"> for='<dtml-var expr="field.id">'
</div> class="form-label col-sm-3 col-md-2"><dtml-var "field.title()"></label>
</td> <div class="col-sm-9 col-md-10">
<td align="left" valign="top">
<dtml-var "field.render(value)"> <dtml-var "field.render(value)">
</td> <small class="form-text text-muted">
<td valign="top"><div class="form-element">
<dtml-var "current_field.form.get_field(field.id).meta_type"> <dtml-var "current_field.form.get_field(field.id).meta_type">
</div></td> </small>
</tr> </div>
</div>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
</dtml-let> </dtml-let>
</dtml-if> </dtml-if>
</dtml-let> </dtml-let>
</dtml-in> </dtml-in>
</table> </div>
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value="Save Changes" />
</div>
</form> <div class="zmi-controls">
<input class="btn btn-primary" type="submit" name="submit" value="Save Changes" />
</div>
</form>
</main>
<dtml-var manage_page_footer> <dtml-var manage_page_footer>
  • cc @kazuhiko

    I am using Zope4 already for a new ERP5 development, the formulator ZMI was too ugly and I thought it was easy to make it better. It was not :) but I feel it's a bit better. The main improvements over the same on Zope2 is that it's using monospaced fonts and larger fields, this should help with TALES expressions.

    I tried two approaches, one with the same tables and another one with more "modern" html (without table for the layout) on normal field TALES. I'm thinking of changing the normal field TALES to use the same tables as others.

    The checkboxes are a bit ugly , but I feel it's good enough.

    What do you think ?

    normal field image

    normal field TALES

    image

    proxyfield

    image

    proxyfield TALES

    image

  • These changes will not break Zope2 compatibility, right ?

    I tried two approaches, one with the same tables and another one with more "modern" html (without table for the layout) on normal field TALES. I'm thinking of changing the normal field TALES to use the same tables as others.

    As Zope4's ZMI still uses table layout, we can follow it here as well, I think.

    https://github.com/infrae/Products.Formulator/commits/master

    The upstream does not have any change in ZMI forms. It would be good to contribute our changes...?

  • ah thanks I already forgot about Zope 2 :) it works on zope2 and it looks like this, I feel it's a bit better than before, because of the monospace fonts

    image

    I did not know formulator was on github, I thought it was completely abandoned. There have been a 10 years gap in the commit history image

    but it seems these days there have been some changes again and there might be python3 support coming ( https://github.com/infrae/Products.Formulator/issues/1 ). I think we have really a lot of patches on formulator (many custom fields, "render_view" API for non editable fields, open office support) it's like a different product so I don't think it's worth trying to use the upstream version. I'll see if I can send a patch, but this is not really a priority, just doing this for ERP5 has already taken much more time that what I was supposed to spend :)

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment