Ignore:
Timestamp:
20 Jan 2012, 08:07:26 (13 years ago)
Author:
Henrik Bettermann
Message:

Some button adjustments. Remove 'Save and return' button from CourseManageFormPage? to be in accordance with other form pages.

Add some flash messages after saving data.

sendContactForm returns either True or breaks with an exception. Thus, the 'if success' statement in send methods of contact forms doesn't make sense.

File:
1 edited

Legend:

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

    r7484 r7490  
    419419        datepicker.need() # Enable jQuery datepicker in date fields.
    420420        tabs.need()
     421        self.tab1 = self.tab2 = ''
     422        qs = self.request.get('QUERY_STRING', '')
     423        if not qs:
     424            qs = 'tab1'
     425        setattr(self, qs, 'active')
    421426        super(StudentBaseManageFormPage, self).update()
    422427        self.wf_info = IWorkflowInfo(self.context)
     
    564569        datepicker.need() # Enable jQuery datepicker in date fields.
    565570        tabs.need()
     571        self.tab1 = self.tab2 = ''
     572        qs = self.request.get('QUERY_STRING', '')
     573        if not qs:
     574            qs = 'tab1'
     575        setattr(self, qs, 'active')
    566576        return super(StudentClearanceManageFormPage, self).update()
    567577
     
    714724        super(StudyCourseManageFormPage, self).update()
    715725        tabs.need()
    716         warning.need()
    717         datatable.need()
    718726        self.tab1 = self.tab2 = ''
    719727        qs = self.request.get('QUERY_STRING', '')
     
    721729            qs = 'tab1'
    722730        setattr(self, qs, 'active')
    723         return
     731        warning.need()
     732        datatable.need()
     733        return
    724734
    725735    @action('Save', style='primary')
     
    897907        super(StudyLevelManageFormPage, self).update()
    898908        tabs.need()
    899         warning.need()
    900         datatable.need()
    901909        self.tab1 = self.tab2 = ''
    902910        qs = self.request.get('QUERY_STRING', '')
     
    904912            qs = 'tab1'
    905913        setattr(self, qs, 'active')
     914        warning.need()
     915        datatable.need()
    906916        return
    907917
     
    20612071    def update(self):
    20622072        super(StudyLevelEditFormPage, self).update()
    2063     #    tabs.need()
    20642073        datatable.need()
    20652074        warning.need()
Note: See TracChangeset for help on using the changeset viewer.