1
|
from quixote import get_publisher, get_request, redirect
|
2
|
from quixote.directory import Directory
|
3
|
from quixote.html import htmltext
|
4
|
|
5
|
import os
|
6
|
|
7
|
import wcs
|
8
|
import wcs.forms.root
|
9
|
from qommon import template
|
10
|
from qommon import errors
|
11
|
from qommon.form import *
|
12
|
from wcs.roles import logged_users_role
|
13
|
|
14
|
from qommon import emails
|
15
|
|
16
|
OldFormPage = wcs.forms.root.FormPage
|
17
|
|
18
|
class AlternateFormPage(OldFormPage):
|
19
|
def step(self, *args, **kwargs):
|
20
|
steps_html = OldFormPage.step(self, *args, **kwargs)
|
21
|
steps_html = str(steps_html).replace('<ol>', '<h2>%s</h2>\n<ol>' % _('Steps'))
|
22
|
get_response().filter['gauche'] = steps_html
|
23
|
return
|
24
|
|
25
|
wcs.forms.root.FormPage = AlternateFormPage
|
26
|
|
27
|
|
28
|
OldFormsRootDirectory = wcs.forms.root.RootDirectory
|
29
|
|
30
|
class AlternateFormsRootDirectory(OldFormsRootDirectory):
|
31
|
def form_list(self, *args, **kwargs):
|
32
|
form_list = OldFormsRootDirectory.form_list(self, *args, **kwargs)
|
33
|
return htmltext(str(form_list).replace('h2>', 'h3>'))
|
34
|
|
35
|
wcs.forms.root.RootDirectory = AlternateFormsRootDirectory
|