Changeset 5589


Ignore:
Timestamp:
11 Nov 2010, 07:29:08 (14 years ago)
Author:
Henrik Bettermann
Message:

Add 'enable accommodation' check box.

Categorize fresh and returning students in getAccommodationInfo.py.

Location:
WAeUP_SRP/trunk/skins/waeup_futminna
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_futminna/config_form.pt

    r5215 r5589  
    161161        </td>
    162162      </tr>   
     163      <tr>
     164        <th>
     165          <label>
     166            Enable Accommodation Booking:
     167          </label>
     168        </th>
     169        <td>
     170          <input type="checkbox" name="enable_acco_booking" id="enable_acco_booking" value=""
     171                 tal:attributes="value pprops/enable_acco_booking;
     172                                 checked pprops/enable_acco_booking" />
     173        </td>
     174      </tr>         
    163175     
    164176    </table>
  • WAeUP_SRP/trunk/skins/waeup_futminna/getAccommodationInfo.py

    r5042 r5589  
    1616import DateTime
    1717
    18 booking_disabled = True
     18
     19pprops = context.portal_properties
     20booking_disabled = not pprops.enable_acco_booking
     21
    1922
    2023request = context.REQUEST
     
    8891d = {}
    8992d['sex'] = 'male'
    90 d['bt'] = 'all'
     93#d['bt'] = 'all'
    9194if student_record.sex:
    9295    d['sex'] = 'female'
     96   
     97if level == 100:
     98    d['bt'] = 'fr'
     99else:
     100    d['bt'] = 're'   
    93101
    94102info['sex']=d['sex']
Note: See TracChangeset for help on using the changeset viewer.