Index: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/clearance_azax_form.pt
===================================================================
--- WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/clearance_azax_form.pt	(revision 1997)
+++ WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/clearance_azax_form.pt	(revision 1997)
@@ -0,0 +1,80 @@
+<metal:definetemplate tal:define="template here/main_template/macros/master">
+<metal:definemacro define-macro="clearance_edit_form">
+<metal:usemacro use-macro=template>
+
+  <metal:main fill-slot="main"
+           tal:define="
+               info context/getClearanceInfo;">
+               
+      <metal:block tal:condition="not: info">
+        <span tal:content="here/illegal_view" />
+      </metal:block>
+      <metal:block tal:condition="info">
+      <metal:block tal:define="               
+               is_so context/isSectionOfficer;
+               is_staff context/isStaff;
+               is_co context/isClearanceOfficer;
+               is_student context/isStudent;
+               review_state info/review_state;
+               clear_review_state info/clear_review_state;
+               editable python:not is_co and (is_student and clear_review_state == 'opened' or is_so);
+               mode python: test(editable,'edit','view');
+               layout_id python: test(is_so,'student_clearance','student_clearance_fe');
+               rendered_main python:info['clear_doc'].render(request=request,
+                                                   layout_mode = mode,
+                                                   schema_id='student_clearance',
+                                                   layout_id=layout_id,
+                                                   use_session=True);
+               form_action string:clearance_edit;
+               creation python:False;">
+
+    <!--  Administration -->
+    <tal:block condition="python: not(is_staff or is_so or is_student)">
+      <metal:block use-macro="here/error_not_found/macros/not_found" />
+    </tal:block>
+    <tal:block condition="is_staff">
+      <h3> 
+        <span tal:condition="info">
+          <span tal:content="info/student/Title" />:
+        </span>
+        <span tal:content="here/title_or_id" />
+      </h3>
+      <br />    
+    </tal:block>
+    <!-- Student -->
+    <tal:block condition="python: is_student">
+      <a href=""
+         tal:attributes="href string:${here/academicsParent}">
+        <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+        Up one level
+      </a>
+      <h3>Fill Your Clearance/Eligibility Form!</h3>
+      <br />    
+    </tal:block>
+
+               
+    <form action="ACTION" method="post" id="editForm"
+          enctype="multipart/form-data" class="workflow"
+          tal:attributes="action form_action">
+      <div class="group">
+        <div class="documentFields">
+          <tal:block define="getFormUidHtml nocall:modules/Products.CPSDocument.utils/getFormUidHtml"
+                     replace="structure python:getFormUidHtml(request)"/>
+          <input type="hidden" id="button_placeholder" name="button_placeholder" value="" />
+          <div id="rendered_main" tal:content="structure rendered_main">
+            CONTENT
+          </div>
+        </div>
+      </div>
+      <metal:block use-macro="here/clearance_edit_lib/macros/buttons" />
+      </form>
+      <div id="ajax_psm" style="display:none">
+        ajax feedback
+      </div>
+    </metal:block>
+    </metal:block>          
+  </metal:main>
+
+</metal:usemacro> 
+</metal:definemacro>
+</metal:definetemplate>
Index: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/student_index.py
===================================================================
--- WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/student_index.py	(revision 1988)
+++ WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/student_index.py	(revision 1997)
@@ -30,5 +30,5 @@
         return context.study_course_view()
     elif context.portal_type == 'StudentStudyLevel':
-        return context.study_level_view()
+        return context.study_level_view_azax()
     elif context.portal_type == 'StudentClearance':
         return context.clearance_view()
Index: WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/study_level_view_azax.pt
===================================================================
--- WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/study_level_view_azax.pt	(revision 1997)
+++ WAeUP_SRP/branches/joachim-azax-branch/skins/waeup_student/study_level_view_azax.pt	(revision 1997)
@@ -0,0 +1,263 @@
+<metal:body use-macro="here/main_template/macros/master">
+  <metal:block fill-slot="head_slot">
+    <link rel="kukit" type="text/css"
+          tal:attributes="href string:${context/portal_url}/azaxdemo/++resource++azax_two_select.kss"/>
+    <metal:block use-macro="here/azax_header_macros/macros/header_resources" />
+  </metal:block>
+  <metal:main fill-slot="main"
+              tal:define="info context/getStudyLevelInfo;">
+             
+    <span tal:condition="not: info">
+      <span tal:content="here/illegal_view" />
+    </span>
+    <span tal:condition="info">
+    <span tal:define= "is_so context/isSectionOfficer;
+                       is_ca info/is_ca;
+                       show_check_boxes info/show_check_boxes;
+                       is_student info/is_student;
+                       status_info info/status_info;
+                       review_state info/review_state;
+                       view_only info/view_only">       
+    <div style="text-align: right" 
+         tal:condition="python:review_state in ('courses_registered','courses_validated',)">
+    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
+        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
+        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
+        Course Registration Slip
+    </a>
+    </div>
+    <a href=""
+       tal:attributes="href string:${here/academicsParent}">
+      <img tal:attributes="src string:${here/portal_url}/arrow_up.gif"/>
+      Up one level
+    </a>
+
+      <h3> 
+      <span tal:condition="python: is_so or is_ca">
+        <span tal:content="info/student/name" />:
+      </span>
+      <span tal:condition="is_student">My </span>
+      
+      Course Registration Form for <span tal:content="here/title_or_id" />
+      </h3>
+      <form action="." method="post" class="group" onsubmit="return submit_once()">
+      <span tal:condition="info/carry_overs" tal:omit-tag="">
+      <h4>Carryover Courses</h4>
+      <br />
+      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
+        <tr tal:repeat="row info/carry_overs"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5px;"
+              tal:condition="show_check_boxes">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td width="78%" tal:content="row/title"></td>
+          <td align="center" width="10%" tal:content="row/code"></td>
+          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
+          <td align="center" width="2%" tal:content="row/credits"></td>
+          <td align="center" width="8%" tal:content="row/grade|string:"></td>
+        </tr>
+      </table>
+      </span> 
+      <br />
+      <h4>Session Courses</h4>
+      <br />
+    <div class="" tal:condition="not: info/normal">
+      <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
+      <br /><br />
+    </div>
+      <table class="contentListing" width="100%" id="folder_content"
+             tal:condition="info/normal">      
+        <tr tal:repeat="row info/normal"
+            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
+          <td align="left" valign="middle" style="width: 5px;"
+             tal:condition="show_check_boxes">
+            <input type="checkbox" name="ids:list" value="" id="" class="noborder"
+                   tal:define="id row/id"
+                   tal:attributes="value id;
+                   id python:'cb_' + id;
+                   checked python:id in info['choosen_ids'];" 
+                   />
+          </td>
+          <td width="78%" tal:content="row/title"></td>
+          <td align="center" width="10%" tal:content="row/code"></td>
+          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
+          <td align="center" width="2%" tal:content="row/credits"></td>
+          <td align="center" width="8%" tal:content="row/coe|nothing"></td>
+          
+          
+
+
+          <td>
+          <a tal:condition="python:review_state == 'school_fee_paid'" href="edit" tal:attributes="href string:${row/code}/course_edit_form"
+          target="edit"
+          onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
+          [edit]
+          </a> 
+          </td>          
+          
+          
+        </tr>
+        <tr>
+          <td tal:condition="show_check_boxes" colspan="1"></td>
+          <td colspan="1"></td>
+          <th colspan="2">Total Credits:</th>
+          <td align="center" width="2%" tal:content="info/credits_total"></td>
+        </tr>
+      </table>
+
+      
+    
+      
+      <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete selected courses?', )" 
+                     />
+              <input tal:condition="python: 1" type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+                    
+                     
+              <br /><br />
+              <input tal:condition="not: info/credits_exceeded" 
+                     type="submit" name="register_courses:method"
+                     class="context" value="Submit" />
+              <span tal:condition="info/credits_exceeded">
+                  <font color="red"> <strong>Your total credits exceed 50!</strong></font>
+              </span>
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>  
+                     
+              <br /><br />
+              
+              <span tal:condition="python: 1">
+              <strong>Note:</strong> 'Update' checks for all courses in your certificate and will add them to your course list irrespective of
+              prior deletion, i.e. already deleted courses will show up again. 
+              Please use this function only if you are sure that your faculty has added courses which are not yet on your course list.                                
+              </span>
+              <span tal:condition="python: 0">
+              <strong>Note:</strong> The 'Update' function has been temporarily disabled.                                 
+              </span>              
+                     
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the courses selected?', )" 
+                     />
+              <input 
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value string:contact_student_form"/>                         
+
+          </td>
+        </tr>
+      </table>
+      <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
+             class="folderButtons">
+        <tr>
+          <td align="left" valign="top" rowspan="3"></td>
+          <td align="left" valign="top">
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="button" value="Select all" class="context"
+                     onclick="someJavaScriptFunctionThatWillBeReplaced"
+                     i18n:attributes="value"
+                     tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
+                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="submit" name="delete_course_result:method" value="Delete selected"
+                     class="destructive" i18n:attributes="value"
+                     tal:attributes="onclick python:'return window.confirm(\'%s\')' %
+                     ('Do you really want to delete the courses selected?', )" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'"
+                     type="submit" name="refresh_level:method"
+                     class="context" value="Update" 
+                     />
+              <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
+                     class="context" value="Submit" />  
+              <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
+                     class="context" value="Validate" />
+              <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
+                     class="context" value="Reject" />
+                     
+              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                         
+              <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
+                     tal:attributes="value string:contact_student_form"/>    
+                                           
+
+          </td>
+        </tr>
+      </table>
+    </form>
+      <div class="">
+        <h2>Two Selects</h2>
+        <form name="two">
+          <select id="first" name="value">
+            <option></option>
+            <option>animals</option>
+            <option>machines</option>
+          </select>
+          <select id="second" />
+        </form>
+      </div>
+      <br />
+      <form action="add_course_result" method="post" class="group" onsubmit="return submit_once()"
+          tal:condition="show_check_boxes">
+      <table>
+        <tr>
+          <th>Course Id</th>
+          <td><input type="text" name="course_id" 
+                     tal:attributes="value request/course_id|nothing"/></td>
+          <td colspan="2">
+            <input type="submit" name="add"
+                   class="context" value="Add Course" 
+                   />
+            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
+                     tal:attributes="value string:study_level_view"/>                       
+          </td>                
+      </table>
+      </form>   
+  </span>
+  </span>          
+  </metal:main>
+</metal:body>
+
