web/views/formrenderers.py
changeset 8425 b86bdc343c18
parent 8340 622fcca4fe00
parent 8413 9ac36a6ec07e
child 8445 594efcf51536
--- a/web/views/formrenderers.py	Tue May 22 12:41:18 2012 +0200
+++ b/web/views/formrenderers.py	Wed May 23 16:17:46 2012 +0200
@@ -494,6 +494,16 @@
     __regid__ = 'inline'
     fieldset_css_class = 'subentity'
 
+    def render_title(self, w, form, values):
+        w(u'<div class="iformTitle">')
+        w(u'<span>%(title)s</span> '
+          '#<span class="icounter">%(counter)s</span> ' % values)
+        if values['removejs']:
+            values['removemsg'] = self._cw._('remove-inlined-entity-form')
+            w(u'[<a href="javascript: %(removejs)s;$.noop();">%(removemsg)s</a>]'
+              % values)
+        w(u'</div>')
+
     def render(self, w, form, values):
         form.add_media()
         self.open_form(w, form, values)
@@ -518,18 +528,6 @@
     def close_form(self, w, form, values):
         w(u'</div></div>')
 
-    def render_title(self, w, form, values):
-        if values['removejs']:
-            values['removemsg'] = self._cw._('remove-inlined-entity-form')
-            w(u'<div class="iformTitle"><span>%(title)s</span> '
-              '#<span class="icounter">%(counter)s</span> '
-              '[<a href="javascript: %(removejs)s;$.noop();">%(removemsg)s</a>]</div>'
-              % values)
-        else:
-            w(u'<div class="iformTitle"><span>%(title)s</span> '
-              '#<span class="icounter">%(counter)s</span></div>'
-              % values)
-
     def render_fields(self, w, form, values):
         w(u'<fieldset id="fs-%(divid)s">' % values)
         fields = self._render_hidden_fields(w, form)