Changeset 832 for WAeUP_SRP/trunk


Ignore:
Timestamp:
10 Nov 2006, 16:52:23 (18 years ago)
Author:
joachim
Message:

add select boxes to clearance results
display final_submit button, if aknow checked
set clearance object to closed and
student to clearance_requested when final submit button is clicked

Location:
WAeUP_SRP/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/layouts/student_clearance_fe.xml

    r826 r832  
    123123  <property name="label">Results</property>
    124124  <property name="label_edit">Results</property>
    125   <property name="readonly_layout_modes"/>
    126   <property name="hidden_layout_modes"/>
     125  <property name="hidden_layout_modes">
     126   <element value="create"/>
     127  </property>
    127128  <property name="hidden_readonly_layout_modes"/>
    128129 </widget>
     
    349350  <property name="label_edit">Results</property>
    350351  <property name="readonly_layout_modes"/>
    351   <property name="hidden_layout_modes"/>
     352  <property name="hidden_layout_modes">
     353   <element value="create"/>
     354  </property>
    352355  <property name="hidden_readonly_layout_modes"/>
    353356 </widget>
     
    661664  <property name="label_edit">Results</property>
    662665  <property name="readonly_layout_modes"/>
    663   <property name="hidden_layout_modes"/>
     666  <property name="hidden_layout_modes">
     667   <element value="create"/>
     668  </property>
    664669  <property name="hidden_readonly_layout_modes"/>
    665670 </widget>
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit.py

    r805 r832  
    55##bind script=script
    66##bind subpath=traverse_subpath
    7 ##parameters=REQUEST,proceed=None, cpsdocument_edit_button=None, action=None
     7##parameters=REQUEST,proceed=None, cpsdocument_edit_button=None, final_submit=None, action=None
    88##title=
    99# $Id$
     
    2525# Validate the document and write it if it's valid
    2626# (We don't call getEditableContent here, validate does it when needed.)
     27wftool = context.portal_workflow
    2728info = context.getStudentInfo()
    2829
     
    3334clear_doc = info['clear_doc']
    3435state = context.getStudentInfo()['review_state']
     36if final_submit:
     37    wftool.doActionFor(info['clear'],'close')
     38    wftool.doActionFor(info['student'],'request_clearance')
     39    return REQUEST.RESPONSE.redirect("%s/student_index" % info['url'])
     40
    3541is_valid, ds = clear_doc.validate(request=REQUEST,
    3642                                schema_id = 'student_clearance',
     
    4551    if is_valid:
    4652        psm = 'Content changed.'
     53        if ds.get('acknow'):
     54            args['final_submit'] = "Finally Submit"
    4755    else:
    4856        args = getFormUidUrlArg(REQUEST)
  • WAeUP_SRP/trunk/skins/waeup_student/clearance_edit_form.pt

    r826 r832  
    6868         id="cpsdocument_edit_button"
    6969         tal:condition="not:creation" />
     70   <input type="submit" class="standalone"
     71          tal:condition="request/final_submit|nothing"
     72          name="final_submit"
     73          tal:attributes="value request/final_submit"
     74          />
    7075    </form>
    7176    <div id="ajax_psm" style="display:none">
  • WAeUP_SRP/trunk/skins/waeup_student/students_index.py

    r827 r832  
    2121
    2222students_url = "%s/campus/students" % (context.portal_url.getPortalPath())
    23 #campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    2423
    2524if context.isManager():
     
    2928    student = info['student']
    3029    return redirect("%s/student_view" % student.absolute_url())
    31 
  • WAeUP_SRP/trunk/skins/waeup_student/widget_waeup_result_render.pt

    r807 r832  
    2323    </tr>
    2424    <tr>
    25       <td>
    26         <input type="text" size="10" maxlength="10"
    27                tal:attributes="name string:${name}_s;
    28                     id string:${name}_s;
    29                     value subject"
    30                     />
     25      <td><select size="1"
     26                  tal:attributes="name string:${name}_s;
     27                  id string:${name}_s;">
     28              <option tal:repeat="sub python:(('','----'),('Math','Math'),('English','English'))"
     29                      tal:attributes="value python:sub[0]"
     30                      tal:content="python: sub[1]">
     31              </option>
     32            </select>
    3133      </td>
    3234      <td>
    33         <input type="text" size="2" maxlength="2"
    34                tal:attributes="name string:${name}_g;
    35                     id string:${name}_g;
    36                     value grade"
    37                     />
     35          <select size="1"
     36                  tal:attributes="name string:${name}_g;
     37                  id string:${name}_g;">
     38                  <option tal:repeat="sub python:(('','-'),('A','A'),('B','B'),('C','C'),('D','D'))"
     39                          tal:attributes="value python:sub[0]"
     40                          tal:content="python: sub[1]">
     41          </option>
     42        </select>
    3843      </td>
    3944      <td>
Note: See TracChangeset for help on using the changeset viewer.