Changeset 7329


Ignore:
Timestamp:
11 Dec 2011, 13:18:40 (13 years ago)
Author:
Henrik Bettermann
Message:

Also protect students section against unintentional deletions with new jsaction.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7321 r7329  
    3535    ContactAdminForm)
    3636from waeup.sirp.browser.breadcrumbs import Breadcrumb
    37 from waeup.sirp.browser.resources import datepicker, datatable, tabs
     37from waeup.sirp.browser.resources import datepicker, datatable, tabs, warning
    3838from waeup.sirp.browser.viewlets import (
    3939    ManageActionButton, AddActionButton)
     40from waeup.sirp.browser.layout import jsaction, JSAction
    4041from waeup.sirp.interfaces import (
    4142    ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm)
     
    270271        datatable.need()
    271272        toggleall.need()
     273        warning.need()
    272274        form = self.request.form
    273275        self.hitlist = []
     
    721723        super(StudyCourseManageFormPage, self).update()
    722724        tabs.need()
     725        warning.need()
    723726        datatable.need()
    724727        return
     
    749752        return
    750753
    751     @grok.action('Remove selected levels')
     754    @jsaction('Remove selected levels')
    752755    def delStudyLevels(self, **data):
    753756        form = self.request.form
     
    869872        super(StudyLevelManageFormPage, self).update()
    870873        tabs.need()
     874        warning.need()
    871875        datatable.need()
    872876        return
     
    889893        self.redirect(self.url(self.context, '@@add'))
    890894
    891     @grok.action('Remove selected tickets')
     895    @jsaction('Remove selected tickets')
    892896    def delCourseTicket(self, **data):
    893897        form = self.request.form
     
    10521056        super(PaymentsManageFormPage, self).update()
    10531057        datatable.need()
    1054         return
    1055 
    1056     @grok.action('Remove selected tickets')
     1058        warning.need()
     1059        return
     1060
     1061    @jsaction('Remove selected tickets')
    10571062    def delPaymentTicket(self, **data):
    10581063        form = self.request.form
     
    13141319        super(AccommodationManageFormPage, self).update()
    13151320        datatable.need()
    1316         return
    1317 
    1318     @grok.action('Remove selected')
     1321        warning.need()
     1322        return
     1323
     1324    @jsaction('Remove selected')
    13191325    def delBedTickets(self, **data):
    13201326        if getattr(self.request.principal, 'user_type', None) == 'student':
     
    20102016    #    tabs.need()
    20112017        datatable.need()
     2018        warning.need()
    20122019        return
    20132020
     
    20312038        self.redirect(self.url(self.context, 'ctadd'))
    20322039
    2033     @grok.action('Remove selected tickets')
     2040    @jsaction('Remove selected tickets')
    20342041    def delCourseTicket(self, **data):
    20352042        form = self.request.form
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/containermanagepage.pt

    r7205 r7329  
    4949   
    5050    <div class="actionButtons">
    51         <input type="submit" name="remove" value="Remove selected" />
     51        <input type="submit" name="remove" value="Remove selected"
     52               onclick="return confirmPost('Are you sure?')"/>
    5253    </div>
    5354
Note: See TracChangeset for help on using the changeset viewer.