Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

LocalTracChanges: daa_simpleticket_0.11.patch

File daa_simpleticket_0.11.patch, 1.7 KB (added by datallah, 15 years ago)

SimpleTicketPlugin patch for 0.11

  • 0.11/simpleticket/

    22# Copyright (c) 2008 Noah Kantrowitz. All rights reserved.
    44from trac.core import *
    5 from trac.web.api import IRequestFilter
     5from trac.web import IRequestFilter
    66from trac.perm import IPermissionRequestor
    77from trac.config import ListOption, BoolOption
    8 from trac.util.compat import set
    109class SimpleTicketModule(Component):
    1110    """A request filter to implement the SimpleTicket reduced ticket entry form."""
    3231                do_filter = req.session.get('simpleticket.do_filter', do_filter)
    3433            if do_filter:
    35                 hide_fields = set(self.hide_fields)
    36                 self.log.debug('SimpleTicket: Filtering new ticket form for %s', req.authname)
    37                 data['fields'] = [f for f in data['fields'] if f['name'] not in hide_fields]
     35                for f in self.hide_fields:
     36                    if data.has_key('fields'):
     37                        for dict in data['fields']:
     38                            if (dict['name'] == f ):
     39#                      ['name'])
     40                                dict['skip'] = True
     41                            dict['rendered'] = 'no'
    3943        return template, data, content_type
    4145    # IPermissionRequestor methods
    4246    def get_permission_actions(self):
    43         yield 'TICKET_CREATE_SIMPLE', ['TICKET_CREATE']
    44  No newline at end of file
     47        yield 'TICKET_CREATE_SIMPLE', ['TICKET_CREATE']
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!