Project

General

Profile

Download (893 Bytes) Statistics
| Branch: | Tag: | Revision:

root / extra / modules / connectors.py @ 2750dbae

1
import urllib2
2

    
3
from quixote import redirect, get_request
4
from quixote.directory import Directory
5

    
6
from qommon.form import *
7

    
8
from wcs.formdata import Evolution
9
from wcs.workflows import Workflow, WorkflowStatusItem, register_item_class, \
10
        render_list_of_roles, get_role_translation
11
from wcs.roles import Role, logged_users_role, get_user_roles
12

    
13
class CivilNetConnectorWorkflowStatusItem(WorkflowStatusItem):
14
    description = N_('Connector to CivilNet')
15
    key = 'civilnet-connector'
16
    endpoint = False
17

    
18
    url = None
19

    
20
    def render_as_line(self):
21
        return _('Connection to CivilNet')
22

    
23
    def get_parameters(self):
24
        return ('url',)
25

    
26
    def add_parameters_widgets(self, form, parameters, prefix=''):
27
        if 'url' in parameters:
28
            form.add(StringWidget, 'url', title=_('URL'), value=self.url)
29

    
30
register_item_class(CivilNetConnectorWorkflowStatusItem)
31

    
(8-8/26)