Ignore:
Timestamp:
12 Jan 2012, 16:19:57 (13 years ago)
Author:
Henrik Bettermann
Message:

Merge Bootstrap branch into trunk.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/applicants
Files:
9 edited

Legend:

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

    r7438 r7459  
    3838from waeup.sirp.browser.interfaces import ICaptchaManager
    3939from waeup.sirp.browser.breadcrumbs import Breadcrumb
    40 from waeup.sirp.browser.layout import NullValidator, jsaction
     40from waeup.sirp.browser.layout import (
     41    NullValidator, jsaction, action, UtilityView)
    4142from waeup.sirp.browser.pages import add_local_role, del_local_roles
    4243from waeup.sirp.browser.resources import datepicker, tabs, datatable, warning
     
    120121        return
    121122
    122     @grok.action('Add applicants container', validator=NullValidator)
     123    @action('Add applicants container', validator=NullValidator)
    123124    def addApplicantsContainer(self, **data):
    124125        self.redirect(self.url(self.context, '@@add'))
    125126        return
    126127
    127     @grok.action('Cancel', validator=NullValidator)
     128    @action('Cancel', validator=NullValidator)
    128129    def cancel(self, **data):
    129130        self.redirect(self.url(self.context))
    130131        return
    131132
    132     @grok.action('Add local role', validator=NullValidator)
     133    @action('Add local role', validator=NullValidator)
    133134    def addLocalRole(self, **data):
    134135        return add_local_role(self,2, **data)
    135136
    136     @grok.action('Remove selected local roles')
     137    @action('Remove selected local roles')
    137138    def delLocalRoles(self, **data):
    138139        return del_local_roles(self,2,**data)
     
    156157        return super(ApplicantsContainerAddFormPage, self).update()
    157158
    158     @grok.action('Add applicants container')
     159    @action('Add applicants container')
    159160    def addApplicantsContainer(self, **data):
    160161        year = data['year']
     
    178179        return
    179180
    180     @grok.action('Cancel', validator=NullValidator)
     181    @action('Cancel', validator=NullValidator)
    181182    def cancel(self, **data):
    182183        self.redirect(self.url(self.context, '@@manage') + '#tab-1')
     
    280281        return get_users_with_local_roles(self.context)
    281282
    282     @grok.action('Save')
     283    @action('Save')
    283284    def apply(self, **data):
    284285        self.applyData(self.context, **data)
     
    310311        return
    311312
    312     @grok.action('Add applicant', validator=NullValidator)
     313    @action('Add applicant', validator=NullValidator)
    313314    def addApplicant(self, **data):
    314315        self.redirect(self.url(self.context, 'addapplicant'))
    315316        return
    316317
    317     @grok.action('Cancel', validator=NullValidator)
     318    @action('Cancel', validator=NullValidator)
    318319    def cancel(self, **data):
    319320        self.redirect(self.url(self.context))
    320321        return
    321322
    322     @grok.action('Add local role', validator=NullValidator)
     323    @action('Add local role', validator=NullValidator)
    323324    def addLocalRole(self, **data):
    324325        return add_local_role(self,3, **data)
    325326
    326     @grok.action('Remove selected local roles')
     327    @action('Remove selected local roles')
    327328    def delLocalRoles(self, **data):
    328329        return del_local_roles(self,3,**data)
     
    345346        return "Applicants Container: %s" % self.context.title
    346347
    347     @grok.action('Create application record')
     348    @action('Create application record')
    348349    def addApplicant(self, **data):
    349350        applicant = createObject(u'waeup.Applicant')
     
    409410        'applicant_id', 'firstname', 'lastname','email', 'course1')
    410411
    411 class CreateStudentPage(grok.View):
     412class CreateStudentPage(UtilityView, grok.View):
    412413    """Create a student object from applicatnt data
    413414    and copy applicant object.
     
    426427        return
    427428
    428 class AcceptanceFeePaymentAddPage(grok.View):
     429class AcceptanceFeePaymentAddPage(UtilityView, grok.View):
    429430    """ Page to add an online payment ticket
    430431    """
     
    493494            self.context.__parent__.display_fullname,self.context.p_id)
    494495
    495 class OnlinePaymentCallbackPage(grok.View):
     496class OnlinePaymentCallbackPage(UtilityView, grok.View):
    496497    """ Callback view
    497498    """
     
    525526        return
    526527
    527 class ExportPDFPaymentSlipPage(grok.View):
     528class ExportPDFPaymentSlipPage(UtilityView, grok.View):
    528529    """Deliver a PDF slip of the context.
    529530    """
     
    552553            self.context.__parent__, applicantview)
    553554
    554 class ExportPDFPage(grok.View):
     555class ExportPDFPage(UtilityView, grok.View):
    555556    """Deliver a PDF slip of the context.
    556557    """
     
    671672            dict(name=x, title=y) for x, y in allowed_transitions]
    672673
    673     @grok.action('Save')
     674    @action('Save')
    674675    def save(self, **data):
    675676        form = self.request.form
     
    739740    # We explicitely want the forms to be validated before payment tickets
    740741    # can be created. If no validation is requested, use
    741     # 'validator=NullValidator' in the grok.action directive
    742     @grok.action('Add online payment ticket')
     742    # 'validator=NullValidator' in the action directive
     743    @action('Add online payment ticket')
    743744    def addPaymentTicket(self, **data):
    744745        self.redirect(self.url(self.context, '@@addafp'))
     
    763764    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
    764765    form_fields['phone'].custom_widget = PhoneWidget
     766    form_fields['applicant_id'].for_display = True
    765767    grok.template('applicanteditpage')
    766768    manage_applications = False
     
    808810    # We explicitely want the forms to be validated before payment tickets
    809811    # can be created. If no validation is requested, use
    810     # 'validator=NullValidator' in the grok.action directive
    811     @grok.action('Add online payment ticket')
     812    # 'validator=NullValidator' in the action directive
     813    @action('Add online payment ticket')
    812814    def addPaymentTicket(self, **data):
    813815        self.redirect(self.url(self.context, '@@addafp'))
     
    820822        return
    821823
    822     @grok.action('Save')
     824    @action('Save')
    823825    def save(self, **data):
    824826        if self.passport_changed is False:  # False is not None!
     
    828830        return
    829831
    830     @grok.action('Final Submit')
     832    @action('Final Submit')
    831833    def finalsubmit(self, **data):
    832834        if self.passport_changed is False:  # False is not None!
     
    903905        return
    904906
    905     @grok.action('Get login credentials')
     907    @action('Get login credentials')
    906908    def register(self, **data):
    907909        if not self.captcha_result.is_valid:
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt

    r7384 r7459  
    1313<img src="" tal:attributes="src view/passport_url" />
    1414
    15 <table class="zebra">
     15<table class="form-table">
    1616  <tbody>
    1717    <tal:block repeat="widget view/widgets">
     
    2626    </tal:block>
    2727    <tr>
    28       <td class="fieldname" width="33%">
     28      <td class="fieldname">
    2929          Admitted Course of Study:
    3030      </td>
     
    4444</table>
    4545<h3 i18n:translate="">Acceptance Fee Payment Tickets</h3>
    46 <table class="zebra">
     46<table>
    4747  <thead>
    4848    <tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt

    r7254 r7459  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       class="edit-form" enctype="multipart/form-data">
     2      enctype="multipart/form-data">
    33
    44  <h2 i18n:translate=""
     
    1414  </div>
    1515
    16   <div class="form-status"
     16  <div class="alert-message error"
    1717    tal:define="status view/status"
    1818    tal:condition="status">
     
    2323  </div>
    2424
    25   <table class="zebra">
     25  <table class="form-table">
    2626    <tbody>
    2727      <tal:block repeat="widget view/widgets">
    2828        <tr>
    29           <td class="label">
    30             <label tal:attributes="for widget/name">
    31               <span class="required" tal:condition="widget/required">*</span>
    32               <span i18n:translate="" tal:content="widget/label">label</span>:
    33             </label>
     29          <td class="fieldname">
     30            <span tal:condition="widget/required">*</span>
     31            <span i18n:translate="" tal:content="widget/label">label</span>:
    3432          </td>
    35           <td class="field">
    36             <span class="widget" tal:content="structure widget">
     33          <td>
     34            <span tal:content="structure widget">
    3735              <input type="text" />
    3836            </span>
     
    4139            </tal:error>
    4240            <tal:hint tal:condition="widget/hint">
    43               <span class="hint" tal:content="structure widget/hint">hint</span>
     41              <span tal:content="structure widget/hint">hint</span>
    4442            </tal:hint>
    4543          </td>
     
    4745      </tal:block>
    4846      <tr>
    49         <td class="label">
    50           <label i18n:translate="" for="form.passport">Photograph</label>
     47        <td class="fieldname">
     48          Photograph
    5149        </td>
    52         <td class="field">
    53           <span class="widget">
    54             <img src="passport.jpg" /><br />
    55             <input type="file" name="form.passport" />
    56             <br />
    57             <span i18n:translate="">
    58               Max. file size:
    59               <span tal:replace="view/max_upload_size">10 KB</span>
    60             </span>
     50        <td>
     51          <img src="passport.jpg" /><br />
     52          <input type="file" name="form.passport" />
     53          <br />
     54          <span i18n:translate="">
     55            Max. file size:
     56            <span tal:replace="view/max_upload_size">10 KB</span>
    6157          </span>
    6258      </tr>
    6359      <tr tal:condition="view/manage_applications">
    64         <td class="label"><label>Password:</label></td>
     60        <td class="fieldname">Password:</td>
    6561        <td>
    6662          <input name="password" type="password"  />
     
    6864      </tr>
    6965      <tr tal:condition="view/manage_applications">
    70         <td class="label"><label>Retype password:</label></td>
     66        <td class="fieldname">Retype password:</td>
    7167        <td>
    7268          <input name="control_password" type="password" />
     
    7470      </tr>
    7571      <tr tal:condition="view/manage_applications">
    76         <td class="label"><label>Application Transition:</label></td>
     72        <td class="fieldname">Application Transition:</td>
    7773        <td>
    7874          <select id="transition" name="transition">
     
    8884
    8985  <div tal:condition="not: view/manage_applications">
    90     <input class="checkboxType" id="confirm_passport" name="confirm_passport"
     86    <input id="confirm_passport" name="confirm_passport"
    9187           type="checkbox" value="True"/>
    9288    I confirm that the Passport Photograph uploaded on this form is a
     
    9490  </div>
    9591
    96   <div class="actionButtons" tal:condition="view/availableActions">
     92  <div tal:condition="view/availableActions">
    9793    <span tal:repeat="action view/actions"
    9894          tal:omit-tag="">
     
    105101  <h3 i18n:translate="">Acceptance Fee Payment Tickets</h3>
    106102
    107   <table class="display dataTableManage">
     103  <table>
    108104    <thead>
    109105    <tr>
     
    136132  </table>
    137133
    138   <div class="actionButtons" tal:condition="view/availableActions">
     134  <div tal:condition="view/availableActions">
    139135    <span tal:repeat="action view/actions"
    140136          tal:omit-tag="">
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantregister.pt

    r7381 r7459  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       class="edit-form" enctype="multipart/form-data">
     2      enctype="multipart/form-data">
    33
    44  <h2 i18n:translate=""
     
    66    tal:content="view/label">Label</h2>
    77
    8   <div class="form-status"
     8  <div class="alert-message error"
    99    tal:define="status view/status"
    1010    tal:condition="status">
     
    1515  </div>
    1616
    17   <table class="zebra">
     17  <table class="form-table">
    1818    <tbody>
    1919      <tal:block repeat="widget view/widgets">
    2020        <tr>
    21           <td class="label">
    22             <label tal:attributes="for widget/name">
    23               <span class="required" tal:condition="widget/required">*</span>
    24               <span i18n:translate="" tal:content="widget/label">label</span>:
    25             </label>
     21          <td class="fieldname">
     22            <span tal:condition="widget/required">*</span>
     23            <span i18n:translate="" tal:content="widget/label">label</span>:
    2624          </td>
    27           <td class="field">
    28             <span class="widget" tal:content="structure widget">
     25          <td>
     26            <span tal:content="structure widget">
    2927              <input type="text" />
    3028            </span>
     
    3331            </tal:error>
    3432            <tal:hint tal:condition="widget/hint">
    35               <span class="hint" tal:content="structure widget/hint">hint</span>
     33              <span tal:content="structure widget/hint">hint</span>
    3634            </tal:hint>
    3735          </td>
     
    5452    credentials will be sent to the address provided.
    5553  </p>
    56   <div class="actionButtons" tal:condition="view/availableActions">
     54  <div tal:condition="view/availableActions">
    5755    <input tal:repeat="action view/actions"
    5856           tal:replace="structure action/render"
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontaineraddpage.pt

    r6756 r7459  
    66    tal:content="view/label">Label</h2>
    77
    8   <div class="form-status"
     8  <div class="alert-message error"
    99    tal:define="status view/status"
    1010    tal:condition="status">
     
    1515  </div>
    1616
    17   <table class="zebra">
     17  <table class="form-table">
    1818    <tbody>
    1919      <tal:block repeat="widget view/widgets">
    2020        <tr>
    21           <td class="label">
    22             <label tal:attributes="for widget/name">
    23               <span class="required" tal:condition="widget/required">*</span>
    24               <span i18n:translate="" tal:content="widget/label">label</span>:
    25             </label>
     21          <td class="fieldname">
     22            <span tal:condition="widget/required">*</span>
     23            <span i18n:translate="" tal:content="widget/label">label</span>:
    2624          </td>
    27           <td class="field">
    28             <span class="widget" tal:content="structure widget">
     25          <td>
     26            <span tal:content="structure widget">
    2927              <input type="text" />
    3028            </span>
     
    3331            </tal:error>
    3432            <tal:hint tal:condition="widget/hint">
    35               <span class="hint" tal:content="structure widget/hint">hint</span>
     33              <span tal:content="structure widget/hint">hint</span>
    3634            </tal:hint>
    3735          </td>
     
    4139  </table>
    4240
    43   <div class="actionButtons" tal:condition="view/availableActions">
     41  <div tal:condition="view/availableActions">
    4442    <input tal:repeat="action view/actions"
    4543             tal:replace="structure action/render"
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainermanagepage.pt

    r7364 r7459  
    11<form action="." tal:attributes="action request/URL" method="POST"  class="edit-form" enctype="multipart/form-data">
    22  <h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
    3   <div class="form-status"  tal:define="status view/status"  tal:condition="status"> Form Status:
     3  <div class="alert-message error"  tal:define="status view/status"  tal:condition="status"> Form Status:
    44    <span i18n:translate="" tal:content="view/status"> Form status summary
    55    </span>
    66  </div>
    7   <div id="tabs">
    8     <ul>
    9       <li>
    10       <a href="#tab-1">
    11         <span>Settings
    12         </span></a>
    13       </li>
    14       <li>
    15       <a href="#tab-2">
    16         <span>Applicants
    17         </span></a>
    18       </li>
    19       <li>
    20       <a href="#tab-3">
    21         <span>Local Roles
    22         </span></a>
    23       </li>
    24     </ul>
    25     <div id="tab-1">
    26       <table class="zebra">
     7  <ul class="tabs" data-tabs="tabs">
     8    <li class="active">
     9    <a href="#tab-1">
     10      <span>Settings
     11      </span></a>
     12    </li>
     13    <li>
     14    <a href="#tab-2">
     15      <span>Applicants
     16      </span></a>
     17    </li>
     18    <li>
     19    <a href="#tab-3">
     20      <span>Local Roles
     21      </span></a>
     22    </li>
     23  </ul>
     24  <div class="tab-content">
     25    <div id="tab-1" class="active">
     26      <table class="form-table">
    2727        <tbody>
    2828          <tal:block repeat="widget view/widgets">
    2929            <tr>
    30               <td class="label">
    31                 <label tal:attributes="for widget/name">
    32                   <span class="required" tal:condition="widget/required">*
    33                   </span>
    34                   <span i18n:translate="" tal:content="widget/label">label
    35                   </span>:
    36                 </label> </td>
    37               <td class="field">
    38                 <span class="widget" tal:content="structure widget">
     30              <td class="fieldname">
     31                <span tal:condition="widget/required">*
     32                </span>
     33                <span i18n:translate="" tal:content="widget/label">label
     34                </span>:
     35              </td>
     36              <td>
     37                <span tal:content="structure widget">
    3938                  <input type="text" />
    4039                </span>
     
    4443                </tal:error>
    4544                <tal:hint tal:condition="widget/hint">
    46                   <span class="hint" tal:content="structure widget/hint">hint
     45                  <span tal:content="structure widget/hint">hint
    4746                  </span>
    4847                </tal:hint> </td>
     
    5150        </tbody>
    5251      </table>
    53       <div class="actionButtons" tal:condition="view/availableActions">
     52      <div tal:condition="view/availableActions">
    5453        <span tal:repeat="action view/actions" tal:omit-tag="">
    5554          <input tal:condition="python:action.label in view.taboneactions"
     
    9897        </tbody>
    9998      </table>
    100       <div class="actionButtons" tal:condition="view/availableActions">
     99      <div tal:condition="view/availableActions">
    101100        <span tal:repeat="action view/actions" tal:omit-tag="">
    102101          <input tal:condition="python:action.label in view.tabtwoactions"
     
    120119        </thead>
    121120        <tbody>
    122           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeB"> <td>
     121          <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
    123122              <input type="checkbox" name="role_id"
    124123                tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     
    129128        </tbody>
    130129      </table>
    131       <div class="actionButtons" tal:condition="view/availableActions">
     130      <div tal:condition="view/availableActions">
    132131        <span tal:repeat="action view/actions" tal:omit-tag="">
    133132          <input tal:condition="python:action.label in view.tabthreeactions1"
     
    135134        </span>
    136135      </div> <br /><br />
    137       <table class="zebra">
     136      <table class="form-table">
    138137        <tr> <td>
    139138            <select id="user" name="user">
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantscontainerpage.pt

    r6509 r7459  
    55<br />
    66
    7 <table class="zebra" tal:condition="layout/isAuthenticated">
     7<table class="form-table" tal:condition="layout/isAuthenticated">
    88  <tbody>
    99    <tal:block repeat="widget view/widgets">
     
    1313          <tal:block replace="python:widget.label"/>:
    1414        </td>
    15         <td class="field">
     15        <td>
    1616          <tal:block tal:replace="structure widget" />
    1717        </td>
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootmanagepage.pt

    r7213 r7459  
    11<h2 i18n:translate="" tal:condition="view/label" tal:content="view/label">Label</h2>
    2 <div class="form-status" tal:define="status view/status" tal:condition="status">
     2<div tal:define="status view/status" tal:condition="status" class="alert-message error">
    33  <div i18n:translate="" tal:content="view/status"> Form status summary
    44  </div>
     
    1010  </ul>
    1111</div>
    12 <form action="." tal:attributes="action request/URL" method="POST"  class="edit-form" enctype="multipart/form-data">
    13   <div id="tabs">
    14     <ul>
    15       <li>
    16       <a href="#tab-1">
    17         <span tal:content="view/subunits">Contents
    18         </span></a>
    19       </li>
    20       <li>
    21       <a href="#tab-2">
    22         <span>Local Roles
    23         </span></a>
    24       </li>
    25     </ul>
    26     <div id="tab-1">
     12<form action="." tal:attributes="action request/URL" method="POST"  enctype="multipart/form-data">
     13  <ul class="tabs" data-tabs="tabs">
     14    <li class="active">
     15    <a href="#tab-1">
     16      <span tal:content="view/subunits">Contents
     17      </span></a>
     18    </li>
     19    <li>
     20    <a href="#tab-2">
     21      <span>Local Roles
     22      </span></a>
     23    </li>
     24  </ul>
     25  <div class="tab-content">
     26    <div id="tab-1" class="active">
    2727      <h3 tal:content="view/subunits">Applicants Containers</h3>
    2828      <table class="display dataTableManage">
     
    4040        </thead>
    4141        <tbody>
    42           <tr tal:repeat="entry context/values"         class="gradeB"> <td>
     42          <tr tal:repeat="entry context/values"         class="gradeC"> <td>
    4343              <input type="checkbox" name="val_id"   tal:attributes="value entry/__name__" /> </td>
    4444            <td tal:content="entry/year">Year </td> <td>
     
    4848        </tbody>
    4949      </table>
    50       <div class="actionButtons" tal:condition="view/availableActions">
     50      <div tal:condition="view/availableActions">
    5151        <span tal:repeat="action view/actions" tal:omit-tag="">
    5252          <input tal:condition="python:action.label in view.taboneactions"   tal:replace="structure action/render"/>
     
    6969        </thead>
    7070        <tbody>
    71           <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeB">  <td>
     71          <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC">  <td>
    7272              <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" />  </td>
    7373            <td tal:content="entry/user_name"> USERNAME   </td>
     
    7777        </tbody>
    7878      </table>
    79       <div class="actionButtons" tal:condition="view/availableActions">
     79      <div tal:condition="view/availableActions">
    8080        <span tal:repeat="action view/actions" tal:omit-tag="">
    8181          <input tal:condition="python:action.label in view.tabtwoactions1" tal:replace="structure action/render"/>
    8282        </span>
    8383      </div> <br /><br />
    84       <table class="zebra">
     84      <table class="form-table">
    8585        <tr> <td>
    8686            <select id="user" name="user">
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantsrootpage.pt

    r6756 r7459  
    1010  </thead>
    1111  <tbody>
    12     <tr tal:repeat="entry context/values"
    13         class="gradeB">
     12    <tr tal:repeat="entry context/values" class="gradeC">
    1413      <td tal:content="entry/year">Year
    1514      </td>     
    1615      <td>
    17         <a href=""
    18            tal:attributes="href python:view.url(entry)"
    19            tal:content="entry/__name__">Code</a>
     16             <a href=""
     17           tal:attributes="href python:view.url(entry)"
     18           tal:content="entry/__name__">Code</a>
    2019      </td>
    2120      <td tal:content="entry/title">Title
Note: See TracChangeset for help on using the changeset viewer.