Commit 756f308f authored by Sebastien Robin's avatar Sebastien Robin

zope patches: remove in ZMI actions taller/shorter and wider/narrower for zsql method

This is too inconvenient when resizing browser size, it requires in
some cases to do taller or shorter many times only because we resized
the browser.

Also, former way was not working nicely when editor like code mirror
was used
parent beb0bfa9
......@@ -85,6 +85,7 @@ from Products.ERP5Type.patches import DTMLMethod
from Products.ERP5Type.patches import DTMLDocument
from Products.ERP5Type.patches import CMFCoreUtils
from Products.ERP5Type.patches import ZopePageTemplate
from Products.ERP5Type.patches import ZSQLMethod
# These symbols are required for backward compatibility
from Products.ERP5Type.patches.PropertyManager import ERP5PropertyManager
......
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-if SQLConnectionIDs>
<form action="manage_edit" method="POST">
<table cellpadding="2" cellspacing="0" width="100%" border="0" style="height: 80%;">
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" value="<dtml-if
title>&dtml-title;</dtml-if>">
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Connection Id
</div>
</td>
<td align="left" valign="top">
<div class="form-element">
<select name="connection_id">
<dtml-in SQLConnectionIDs>
<option value="&dtml-sequence-item;"<dtml-if
expr="connection_id==_vars['sequence-item']">
selected</dtml-if>>
&dtml-sequence-key;</option>
</dtml-in>
</select>
<dtml-if connectionIsValid>
<dtml-if connected><dtml-else>
<p style="{color:red;}">
<strong>Warning:</strong>
The database connection used by this method is closed.
</p>
</dtml-if>
<dtml-else>
<p style="{color:red;}">
<strong>Warning:</strong>
The selected database connection (&dtml-connection_id;)
cannot be found!
</p>
</dtml-if>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Arguments
</div>
</td>
<td align="left" valign="top">
<textarea name="arguments" cols="40" rows="4">&dtml-arguments_src;</textarea>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2" style="height: 100%">
<textarea name="template:text" wrap="off" style="height: 100%; width: 100%">&dtml-src;</textarea>
</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">
<div class="form-element">
<dtml-if wl_isLocked>
<em>Locked by WebDAV</em>
<dtml-else>
<input class="form-element" type="submit" name="SUBMIT"
value="Save Changes">
<input class="form-element" type="submit" name="SUBMIT"
value="Change and Test">
</dtml-if wl_isLocked>
<br />
</div>
</td>
</tr>
</table>
</form>
<dtml-else>
<p class="form-help">
There are no SQL database connections. You need to add a Zope SQL
database connection before you can edit a Zope SQL Method.
</p>
</dtml-if>
<dtml-var manage_page_footer>
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
from Products.ZSQLMethods.SQL import SQL
from App.special_dtml import DTMLFile
from Products.ERP5Type import _dtmldir
# Patch for displaying textearea in full window instead of
# remembering a quantity of lines to display in a cookie
manage_editForm = DTMLFile('ZSQLMethod_edit', _dtmldir)
SQL.manage = manage_editForm
SQL.manage_main = manage_editForm
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