misc: remove formpage alteration (#73965)
This commit is contained in:
parent
f49606f00c
commit
9e07d21541
|
@ -4,8 +4,6 @@ from wcs.qommon import _
|
|||
from wcs.qommon.publisher import get_publisher_class, get_request
|
||||
from wcs.qommon.misc import get_cfg
|
||||
|
||||
from modules import formpage
|
||||
from modules import template
|
||||
from modules import payments
|
||||
from modules import connectors
|
||||
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
from quixote import get_publisher, get_request, redirect
|
||||
from quixote.directory import Directory
|
||||
from quixote.html import htmltext
|
||||
|
||||
import os
|
||||
|
||||
import wcs
|
||||
import wcs.forms.root
|
||||
import wcs.forms.preview
|
||||
from wcs.qommon import _
|
||||
from wcs.qommon import template
|
||||
from wcs.qommon import errors
|
||||
from wcs.qommon.form import *
|
||||
from wcs.roles import logged_users_role
|
||||
|
||||
from wcs.qommon import emails
|
||||
|
||||
OldFormPage = wcs.forms.root.FormPage
|
||||
|
||||
|
||||
class AlternateFormPage(OldFormPage):
|
||||
def form_side(self, *args, **kwargs):
|
||||
form_side_html = OldFormPage.form_side(self, *args, **kwargs)
|
||||
get_response().filter['gauche'] = form_side_html
|
||||
get_response().filter['steps'] = form_side_html
|
||||
return
|
||||
|
||||
|
||||
wcs.forms.root.FormPage = AlternateFormPage
|
||||
wcs.forms.root.PublicFormStatusPage.form_page_class = AlternateFormPage
|
||||
wcs.forms.preview.PreviewFormPage.__bases__ = (AlternateFormPage,)
|
|
@ -1,14 +0,0 @@
|
|||
from wcs.qommon import template
|
||||
|
||||
wcs_get_decorate_vars = template.get_decorate_vars
|
||||
|
||||
|
||||
def get_decorate_vars(body, response, generate_breadcrumb=True, template_context=None, **kwargs):
|
||||
if template_context and 'form_side' in template_context:
|
||||
# force rendering as it will put new variables in the context
|
||||
template_context['form_side'] = template_context['form_side']()
|
||||
|
||||
return wcs_get_decorate_vars(body, response, generate_breadcrumb)
|
||||
|
||||
|
||||
template.get_decorate_vars = get_decorate_vars
|
Reference in New Issue