def __call__(self, form, request=None, tag='form', cn=None, method='post', enctype=None, **params): enctype = enctype or 'multipart/form-data' if request: cn = cn or 'ajax' request.html_document.head.scripts.require('jquery-form') # we need to make sure the form is validated html = Html(tag, cn=cn, method=method, enctype=enctype, **params) if self.style: html.addClass('form-%s' % self.style) html.append(self._inner_form(form, request)) return html
def html(self, request, context, children, **parameters): if request: info = request.cache.html_navigation if info is None: LOGGER.warning('To use the navigation you must include ' 'lux.extensions.sitemap in your EXTENSIONS ' 'list') else: info.load(request) nav = Html(None) if self.parameters.layout == 'horizontal': nav.addClass('inner clearfix') return self.layout(request, info, nav)