|
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
|
|
from qommon import template
|
|
from qommon import errors
|
|
from qommon.form import *
|
|
from wcs.roles import logged_users_role
|
|
|
|
from qommon import emails
|
|
|
|
OldFormPage = wcs.forms.root.FormPage
|
|
|
|
class AlternateFormPage(OldFormPage):
|
|
def step(self, *args, **kwargs):
|
|
steps_html = OldFormPage.step(self, *args, **kwargs)
|
|
steps_html = str(steps_html).replace('<ol>', '<h2>%s</h2>\n<ol>' % _('Steps'))
|
|
get_response().filter['gauche'] = steps_html
|
|
get_response().filter['steps'] = steps_html
|
|
return
|
|
|
|
wcs.forms.root.FormPage = AlternateFormPage
|
|
|
|
|
|
OldFormsRootDirectory = wcs.forms.root.RootDirectory
|
|
|
|
class AlternateFormsRootDirectory(OldFormsRootDirectory):
|
|
def form_list(self, *args, **kwargs):
|
|
form_list = OldFormsRootDirectory.form_list(self, *args, **kwargs)
|
|
return htmltext(str(form_list).replace('h2>', 'h3>'))
|
|
|
|
wcs.forms.root.RootDirectory = AlternateFormsRootDirectory
|