# HG changeset patch # User Sylvain Thénault # Date 1274864510 -7200 # Node ID 24125df012f3f1c64fd7176e2f8e32794e69c6f1 # Parent 3e133b29a1a43b7a61bd8c96e6d006d87400f54f [reledit] #894131: use "<`attribute` unset>" instead of generic "" when an attribute or relation has no value diff -r 3e133b29a1a4 -r 24125df012f3 web/views/editforms.py --- a/web/views/editforms.py Wed May 26 10:28:48 2010 +0200 +++ b/web/views/editforms.py Wed May 26 11:01:50 2010 +0200 @@ -17,8 +17,8 @@ # with CubicWeb. If not, see . """Set of HTML automatic forms to create, delete, copy or edit a single entity or a list of entities of the same type +""" -""" __docformat__ = "restructuredtext en" _ = unicode @@ -27,10 +27,11 @@ from logilab.mtconverter import xml_escape from logilab.common.decorators import cached +from cubicweb import tags from cubicweb.selectors import (match_kwargs, one_line_rset, non_final_entity, specified_etype_implements, implements, yes) from cubicweb.view import EntityView -from cubicweb import tags +from cubicweb.schema import display_name from cubicweb.web import uicfg, stdmsgs, eid_param, dumps, \ formfields as ff, formwidgets as fw from cubicweb.web.form import FormViewMixIn, FieldNotFound @@ -306,7 +307,8 @@ self._cw.add_js('cubicweb.edition.js') self._cw.add_css('cubicweb.form.css') if default is None: - default = xml_escape(self._cw._('')) + default = xml_escape(self._cw._('<%s not specified>') + % display_name(self._cw, rtype, role)) schema = self._cw.vreg.schema entity = self.cw_rset.get_entity(row, col) rschema = schema.rschema(rtype)