Commit 2b7fc3f1 authored by Yoshinori Okuji's avatar Yoshinori Okuji

2006-04-27 yo

* Embed the query string in a request int the resulting HTML in form_html, list_dialog_master, list_master and view_master.

Also, this reverts vincent's changes, which were not present in erp5devel.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@6963 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5c481545
......@@ -59,20 +59,17 @@
<tal:block tal:define="html_render python: field.render_htmlgrid(value, request)">\n
<tal:block tal:condition="python:field.meta_type != \'HiddenStringField\'">\n
<tal:repeat repeat="html_tuple html_render">\n
<tr tal:attributes="title python: context.Base_getFieldDescription(field)" i18n:translate="title" i18n:domain="ui">\n
<tr>\n
<td tal:content="structure python: html_tuple[0]"\n
tal:attributes="class python: \n
{0: {0: None, 1: \'required\'},\n
1: {0: \'error\', 1: \'reqerror\'}}[field_errors.has_key(field.id)][field.is_required()]"\n
i18n:translate="" i18n:domain="ui">\n
</td>\n
<td>\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/field"/>\n
</td>\n
i18n:translate="" i18n:domain="ui" />\n
<td>\n
<tal:block tal:replace="structure python: html_tuple[1]" />\n
</td>\n
</tr>\n
\n
</tal:repeat>\n
</tal:block>\n
<tr tal:condition="python: field_errors.has_key(field.id)">\n
......
......@@ -72,14 +72,22 @@ along with this program; if not, write to the Free Software\n
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
-->\n
</span>\n
<tal:block tal:define="layout_form_id here/getApplicableLayout | nothing;\n
ignore_layout request/ignore_layout | nothing;\n
editable_mode request/editable_mode | nothing;\n
global layout_form python:(not layout_form_id or ignore_layout) or getattr(here, layout_form_id, None);\n
default_layout string:list_dialog_master;\n
layout_id layout_form/pt | default_layout;">\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
\n
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"\n
xml:lang="en"\n
xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\n
metal:use-macro="here/list_dialog_master/macros/master">\n
\n
<head tal:define="dummy python:request.RESPONSE.setHeader(\'Content-Type\', \'text/html;; charset=utf-8\')">\n
<meta name="description" content="Generated by form_create_relation_dialog" />\n
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n
<title tal:content="template/title_or_id" i18n:translate="" i18n:domain="ui">The title</title>\n
<link href="erp5.css" rel="stylesheet" type="text/css"/>\n
</head>\n
\n
<body><div metal:fill-slot="main">\n
<div class="Search">\n
\n
\n
......@@ -124,9 +132,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<input type="hidden" name="default_module" value="" tal:attributes="value request/default_module">\n
\n
</div>\n
</tal:block>\n
</tal:block>\n
</tal:block>
</div>\n
</body>\n
</html>\n
]]></string> </value>
</item>
......
......@@ -88,7 +88,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Search">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/form"/>\n
<span tal:define="groups python: form.get_groups(include_empty=1);\n
field_errors python: request.get(\'field_errors\',{});\n
params python: here.portal_selections.getSelectionParams(selection_name, REQUEST=request);\n
......@@ -164,7 +163,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</td>\n
<td tal:define="field_key python:field.id.startswith(\'my_\') and field.id[3:] or field.id;\n
value python:field.get_value(\'default\') or request.get(field_key, params.get(field_key,None))">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)" />\n
</td>\n
</tr>\n
......@@ -209,7 +207,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</td>\n
<td tal:define="field_key python:field.id.startswith(\'my_\') and field.id[3:] or field.id;\n
value python:field.get_value(\'default\') or request.get(field_key, params.get(field_key,None))">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)" />\n
</td>\n
</tr>\n
......@@ -260,7 +257,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tr>\n
<td tal:define="field_key python:field.id.startswith(\'my_\') and field.id[3:] or field.id;\n
value python:field.get_value(\'default\') or request.get(field_key, params.get(field_key,None))">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)"/>\n
</td>\n
</tr>\n
......@@ -303,6 +299,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<key> <string>id</string> </key>
<value> <string>form_dialog</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -139,6 +139,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<div metal:use-macro="here/global_definition/macros/global_definition" />\n
<input type="hidden" name="form_id" value="form"\n
tal:attributes="value form/id | template/id | script/id">\n
<input type="hidden" name="query_string" value="query"\n
tal:attributes="value request/QUERY_STRING">\n
<input type="hidden" name="object_uid" value="uid"\n
tal:attributes="value here/getUid">\n
<input type="hidden" name="object_path" value="path"\n
......
......@@ -44,12 +44,6 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
......@@ -99,19 +93,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
\n
<body>\n
<div metal:fill-slot="main">\n
<div class="Main">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/form"/>\n
<div class="Main">\n
<span tal:define="groups python: form.get_groups(include_empty=1);\n
field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)">\n
<tal:block tal:condition="python: len(groups)>0">\n
<span tal:condition="python: len(groups)>0">\n
<span tal:repeat="field python:form.get_fields_in_group(groups[0])">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<div class="FormDescription" tal:content="python:field.get_value(\'description\')"></div>\n
<span tal:define="value python:request.get(field.id,None)"\n
tal:replace="structure python:field.render(value,request)" />\n
</span>\n
</tal:block>\n
</span>\n
</span>\n
</div>\n
</div>\n
......
......@@ -50,18 +50,13 @@
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n
"DTD/xhtml1-strict.dtd">\n
"DTD/xhtml1-strict.dtd">\n
\n
<tal:block tal:replace="nothing">\n
<!--\n
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.\n
......@@ -121,7 +116,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:define-macro="form_layout">\n
<div class="Main" tal:define="field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/form"/>\n
<tal:block tal:define="groups python: form.get_groups();\n
rows python:[];">\n
<tal:block tal:repeat="group groups">\n
......@@ -154,7 +148,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block tal:condition="python: \'bottom\' in groups[row[0]].lower()">\n
<tal:block tal:repeat="cell row">\n
<tal:block tal:repeat="field python:form.get_fields_in_group(groups[cell])">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<tal:block tal:define="value python:request.get(field.id, None)"\n
tal:replace="structure python:field.render(value, request)" />\n
</tal:block>\n
......
......@@ -44,18 +44,13 @@
</object>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n
"DTD/xhtml1-strict.dtd">\n
"DTD/xhtml1-strict.dtd">\n
\n
<tal:block tal:replace=\'nothing\'>\n
<!--\n
Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.\n
......@@ -86,7 +81,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:use-macro="python:getattr(here,layout_id).macros[\'master\']">\n
<tal:block metal:fill-slot="main">\n
<div class="Search">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/form"/>\n
<span tal:define="groups python: form.get_groups(include_empty=1);\n
field_errors python: request.get(\'field_errors\',{});\n
dummy python: request.set(\'here\',here)">\n
......@@ -156,7 +150,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="required">\n
</td>\n
<td tal:define="value python:request.get(field.id,None)">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)" />\n
</td>\n
</tr>\n
......@@ -200,7 +193,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
class="required">\n
</td>\n
<td tal:define="value python:request.get(field.id,None)">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)" />\n
</td>\n
</tr>\n
......@@ -249,7 +241,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
</tr>\n
<tr>\n
<td tal:define="value python:request.get(field.id,None)">\n
<tal:block metal:use-macro="here/form_developper_buttons/macros/field"/>\n
<span tal:replace="structure python:field.render(value,request)"/>\n
</td>\n
</tr>\n
......
......@@ -102,6 +102,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<div metal:use-macro="here/global_definition/macros/global_definition" />\n
<input type="hidden" name="form_id" value="form"\n
tal:attributes="value request/form_id">\n
<input type="hidden" name="query_string" value="query"\n
tal:attributes="value request/QUERY_STRING">\n
<input type="hidden" name="dialog_id" value="form"\n
tal:attributes="value form/id">\n
<input type="hidden" name="selection_name" value="selection_name"\n
......
......@@ -100,6 +100,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<div metal:use-macro="here/global_definition/macros/global_definition" />\n
<input type="hidden" name="form_id" value="form"\n
tal:attributes="value form/id">\n
<input type="hidden" name="query_string" value="query"\n
tal:attributes="value request/QUERY_STRING">\n
<input type="hidden" name="is_list" value="1">\n
<!-- Menu Boxes -->\n
<table cellpadding="0" cellspacing="0" border="0" width="100%">\n
......
......@@ -105,12 +105,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
i18n:translate="" i18n:domain="ui"\n
tal:attributes="value action/url">Saut</option>\n
</tal:block>\n
<tal:block tal:condition="python: context.portal_workflow.Base_getSourceVisibility()">\n
<option value="1" disabled="disabled" i18n:translate="" i18n:domain="ui">-- Workflows --</option>\n
<tal:block tal:repeat="workflow python: context.portal_workflow.getWorkflowsFor(context)">\n
<option tal:attributes="value python: \'%s/manage_properties\' % (workflow.absolute_url(), )" tal:content="workflow/title"></option>\n
</tal:block>\n
</tal:block>\n
</select></td>\n
<td valign="bottom" align="center" nowrap>\n
<input type="image" src="/images/erp5_html_style/images/jump.png" title="Jump"\n
......@@ -165,25 +159,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
tal:attributes="src string:$portal_url/images/exec16.png"/> &nbsp;\n
</td>\n
<td width="100%"><tal:block metal:define-slot="buttons"/></td>\n
<td align="right" valign="center"\n
tal:condition="python: here.portal_types[here.getPortalType()].Base_getSourceVisibility()">\n
<a i18n:attributes="title" i18n:domain="ui" title="Portal Type"\n
tal:attributes="href python: \'%s/manage_workspace\' % (here.portal_types[here.getPortalType()].absolute_url(),)">\n
<img alt="Help" src="images/portaltype.png" border="0" alt="Help" i18n:attributes="alt" i18n:domain="ui"/>\n
</a>\n
</td>\n
<td align="right" valign="center">\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/help"/>\n
</td>\n
<td aligh="right" valign="center"\n
tal:condition="here/hasActivity | nothing">\n
<a title="Portal Activities"\n
tal:attributes="href python: here.portal_activities.Base_getSourceVisibility() and \'%s/manageActivities\' % (here.portal_activities.absolute_url(), ) or \'#\'">\n
<img alt="Activity Pending" src="/images/erp5_html_style/images/activity_busy.png"\n
border="0" title="Activity Pending"\n
i18n:attributes="title" i18n:domain="ui"\n
tal:attributes="src string:$portal_url/images/activity_busy.png"/>\n
</a>\n
<td aligh="right" valign="center">\n
<img alt="Activity Pending" src="/images/erp5_html_style/images/activity_busy.png"\n
tal:condition="here/hasActivity | nothing"\n
border="0" title="Activity Pending"\n
i18n:attributes="title" i18n:domain="ui"\n
tal:attributes="src string:$portal_url/images/activity_busy.png"/>\n
</td>\n
</tr>\n
</table>\n
......
......@@ -126,6 +126,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
<tal:block metal:use-macro="here/global_definition/macros/global_definition" />\n
<input type="hidden" name="form_id" value="form"\n
tal:attributes="value form/id | template/id | script/id">\n
<input type="hidden" name="query_string" value="query"\n
tal:attributes="value request/QUERY_STRING">\n
<input type="hidden" name="object_uid" value="uid"\n
tal:attributes="value here/getUid">\n
<input type="hidden" name="object_path" value="path"\n
......
......@@ -158,15 +158,23 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n
alt="spacer" tal:attributes="src string:$portal_url/images/spacer.png"/>\n
</td>\n
</tal:block>\n
<td nowrap align="center" valign="bottom"\n
tal:attributes="class python: is_action_selected and \'On\' or \'Off\'"\n
<td nowrap class="On" align="center" valign="bottom"\n
tal:condition="is_action_selected"\n
tal:define="url action/url">\n
<a tal:content="action/name" href="toto"\n
i18n:translate="" i18n:domain="ui"\n
tal:attributes="href python:url + (\'?\' in url and \'&\' or \'?\') + \'selection_index=%s&selection_name=%s&ignore_layout:int=%s\' % (selection_index, selection_name, ignore_layout);" >\n
Info.G&eacute;n&eacute;rales\n
</a>\n
</td>\n
<td nowrap class="Off" valign="bottom" align="center"\n
tal:condition="not:is_action_selected"\n
tal:define="url action/url">\n
<a tal:content="action/name" href="toto"\n
i18n:translate="" i18n:domain="ui"\n
tal:attributes="href python:url + (\'?\' in url and \'&\' or \'?\') + \'selection_index=%s&selection_name=%s&ignore_layout:int=%s\' % (selection_index, selection_name, ignore_layout);" >\n
Info.G&eacute;n&eacute;rales\n
</a>\n
<tal:block metal:use-macro="context/form_developper_buttons/macros/tab"/>\n
</td>\n
<tal:block tal:condition="is_action_selected">\n
<td valign="bottom" width="17"\n
......
2006-04-27 yo
* Embed the query string in a request int the resulting HTML in form_html, list_dialog_master, list_master and view_master.
2006-04-10 vincent
* add layout support in all templates
......
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