From 23f3b548f7d8ace59d1cf2e171b7de312228af50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20G=C3=B3rny?= <bartek@gorny.edu.pl> Date: Fri, 4 Aug 2006 16:49:34 +0000 Subject: [PATCH] whooops... RawHTMLField not needed git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9061 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Form/RawHTMLField.py | 77 -------------------------------- product/ERP5Form/__init__.py | 3 -- 2 files changed, 80 deletions(-) delete mode 100644 product/ERP5Form/RawHTMLField.py diff --git a/product/ERP5Form/RawHTMLField.py b/product/ERP5Form/RawHTMLField.py deleted file mode 100644 index 88834dfda7..0000000000 --- a/product/ERP5Form/RawHTMLField.py +++ /dev/null @@ -1,77 +0,0 @@ -############################################################################## -# -# Copyright (c) 2002-2006 Nexedi SARL and Contributors. All Rights Reserved. -# Jean-Paul Smets <jp@nexedi.com> -# -# WARNING: This program as such is intended to be used by professional -# programmers who take the whole responsability of assessing all potential -# consequences resulting from its eventual inadequacies and bugs -# End users who are looking for a ready-to-use solution with commercial -# garantees and support are strongly adviced to contract a Free Software -# Service Company -# -# This program is Free Software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -############################################################################## - -from Products.Formulator import Widget, Validator -from Products.Formulator.Field import ZMIField -from Products.Formulator.DummyField import fields -from Products.ERP5Type.Utils import convertToUpperCase -from Products.CMFCore.utils import getToolByName - -from Products.PageTemplates.PageTemplateFile import PageTemplateFile - -from Globals import get_request -from Products.PythonScripts.Utility import allow_class - - -import string - -from zLOG import LOG - -class RawHTMLWidget(Widget.Widget): - """ - a widget displaying raw html as supplied to it - (useful mostly for listboxes) - it is uneditable, so the validator section in ZMI is actually meaningless - but I don't know how to get rid of it - """ - - default = fields.StringField('default', - title='Default', - description=("this is important"), - default="", - required=0) - - property_names = Widget.Widget.property_names + ['extra'] - - def render(self, field, key, value, REQUEST): - """Render text input field. - """ - tpl='<div class="%(css_class)s" name="%(name)s" %(extra)s">%(value)s</div>' - di={'css_class':field.get_value('css_class'),'name':key,'extra':field.get_value('extra'),'value':value} - return tpl % di - -RawHTMLWidgetInstance = RawHTMLWidget() - -class RawHTMLField(ZMIField): - meta_type = "RawHTMLField" - - widget = RawHTMLWidgetInstance - validator = Validator.TextValidatorInstance - - -# vim: filetype=python syntax=python shiftwidth=2 diff --git a/product/ERP5Form/__init__.py b/product/ERP5Form/__init__.py index 75f7a739f4..d4be20f821 100644 --- a/product/ERP5Form/__init__.py +++ b/product/ERP5Form/__init__.py @@ -44,7 +44,6 @@ import Form, FSForm, ListBox, MatrixBox, SelectionTool import ZGDChart, PDFTemplate, Report, PDFForm, ParallelListField import PlanningBox, POSBox, FormBox, EditorField, ProxyField import RelationField, ImageField, MultiRelationField, MultiLinkField -import RawHTMLField import ZPyChart import PreferenceTool @@ -141,8 +140,6 @@ def initialize( context ): 'www/LinkField.gif') FieldRegistry.registerField(MultiLinkField.MultiLinkField, 'www/LinkField.gif') - FieldRegistry.registerField(RawHTMLField.RawHTMLField, - 'www/StringField.gif') # some helper fields FieldRegistry.registerField(HelperFields.ListTextAreaField) -- 2.30.9