Project

General

Profile

Download (1.08 KB) Statistics
| Branch: | Tag: | Revision:

root / extra / modules / formpage.ptl @ 2750dbae

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
        get_response().filter['steps'] = steps_html
24
        return
25

    
26
wcs.forms.root.FormPage = AlternateFormPage
27

    
28

    
29
OldFormsRootDirectory = wcs.forms.root.RootDirectory
30

    
31
class AlternateFormsRootDirectory(OldFormsRootDirectory):
32
    def form_list(self, *args, **kwargs):
33
        form_list = OldFormsRootDirectory.form_list(self, *args, **kwargs)
34
        return htmltext(str(form_list).replace('h2>', 'h3>'))
35

    
36
wcs.forms.root.RootDirectory = AlternateFormsRootDirectory
(15-15/26)