Ignore:
Timestamp:
10 Nov 2005, 21:40:01 (19 years ago)
Author:
joachim
Message:

=clearence + eligibility added

Location:
waeup_product/trunk/skins/waeup_default
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py

    r161 r164  
    44"""Return custom layouts types."""
    55
    6 ##    'widgets': { ###(
    7 ##        '': {
     6##def widget(type = 'String Widget',
     7##            'data': {
     8##                'title': '',
     9##                'fields': ('nr_of_floors',),
     10##                'is_required': True,
     11##                'label': 'Nr of Floors ',
     12##                'label_edit': 'Nr of Floors',
     13##                'description': '',
     14##                'help': 'Number of floors per block',
     15##                'is_i18n': False,
     16##                'readonly_layout_modes': [],
     17##                'hidden_layout_modes': [],
     18##                'hidden_readonly_layout_modes': [],
     19##                'hidden_empty': 0,
     20##                'hidden_if_expr': '',
     21##                'widget_mode_expr': '',
     22##                'css_class': '',
     23##                'css_class_expr': '',
     24##                'javascript_expr': '',
     25##                'vocabulary': 'range5',
     26##                'translated': False,
     27##            },
     28##        },
     29
     30Heading = { ###(
     31         'type': 'Heading Widget',
     32         'data': {
     33                'fields': ['heading'],
     34                'level': 1,
     35                'is_i18n': 0,
     36                'is_required': 1,
     37                'label_edit': 'Headline',
     38                'help': 'a short headline',
     39                'display_width': 40,
     40                'size_max': 200,
     41            },
     42        }###)
     43
     44Text = { ###(
     45            'type': 'Text Widget',
     46            'data': {
     47                'fields': ['text'],
     48                'is_i18n': 1,
     49                'label_edit': 'Text',
     50                'label': 'Text',
     51                'help': 'a short Description',
     52                'css_class': 'description',
     53                'width': 72,
     54                'height': 5,
     55                'render_format': 'text',
     56                'hidden_layout_modes': (),
     57            },
     58        }###)
     59
     60Title = { ###(
     61         'type': 'String Widget',
     62         'data': {
     63                'fields': ['Title'],
     64                'is_i18n': 0,
     65                'is_required': 1,
     66                'label': 'Title',
     67                'label_edit': 'Title',
     68                'display_width': 40,
     69                'size_max': 200,
     70            },
     71        }###)
     72
     73sc_id = { ###(
     74        'type': 'String Widget',
     75        'data': {
     76                'title': 'SC ID',
     77                'fields': ('sc_id'),
     78                'is_required': False,
     79                'label': 'Card Serial Number ',
     80                'label_edit': 'Card Serial Number',
     81                'description': 'Card Serial Number ',
     82                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
     83                'is_i18n': False,
     84                'readonly_layout_modes': (),
     85                'hidden_layout_modes': (),
     86                'hidden_readonly_layout_modes': (),
     87                'hidden_empty': False,
     88                'hidden_if_expr': 'python:1',
     89                'css_class': '',
     90                'widget_mode_expr': '',
     91                'display_width': 10,
     92                'size_max': 0,
     93            }
     94        }
     95###)
     96
     97sc_pin = { ###(
     98         'type': 'Scratchcard Pin Widget',
     99         'data': {
     100                'title': 'SC Pin',
     101                'fields': ('sc_pin'),
     102                'is_required': True,
     103                'label': 'enter  PIN',
     104                'label_edit': 'enter an Accommodation PIN',
     105                'description': '',
     106                'help': 'Please enter a PIN valid for Accomodation booking',
     107                'is_i18n': False,
     108                'readonly_layout_modes': (),
     109                'hidden_layout_modes': (),
     110                'hidden_readonly_layout_modes': (),
     111                'hidden_empty': False,
     112                'hidden_if_expr': '',
     113                'css_class': '',
     114                'widget_mode_expr': '',
     115                'display_width': 10,
     116                'size_max': 10,
     117            },
     118        }
     119###)
     120
     121sc_value = { ###(
     122         'type': 'Float Widget',
     123         'data': {
     124                'title': 'Scratch card value',
     125                'fields': ('sc_value',),
     126                'is_required': True,
     127                'label': 'SC Value',
     128                'label_edit': 'Scratcard Value',
     129                'description': '',
     130                'help': '',
     131                'is_i18n': False,
     132                'readonly_layout_modes': (),
     133                'hidden_layout_modes': (),
     134                'hidden_readonly_layout_modes': (),
     135                'hidden_empty': False,
     136                'hidden_if_expr': '',
     137                'css_class': '',
     138                'widget_mode_expr': '',
     139                'display_width': 10,
     140                'size_max': 10,
     141            },
     142        }
     143###)
     144
     145Description = { ###(
     146            'type': 'Text Widget',
     147            'data': {
     148                'fields': ['Description'],
     149                'is_i18n': 1,
     150                'label_edit': 'Description',
     151                'label': 'Description',
     152                'css_class': 'description',
     153                'width': 72,
     154                'height': 5,
     155                'render_format': 'text',
     156                'hidden_layout_modes': (),
     157            },
     158        }###)
     159
     160common_layout = {###(
     161    'widgets': {
     162        'LanguageSelector': {
     163            'type': 'Document Language Select Widget',
     164            'data': {
     165                'fields': ['Language'],
     166            },
     167        },
     168        'Title': Title,
     169        'Description': Description,
     170        'LanguageSelectorCreation': {
     171            'type': 'Select Widget',
     172            'data': {
     173                'title': 'Language',
     174                'fields': ('Language',),
     175                'is_required': 0,
     176                'label': 'label_language',
     177                'label_edit': 'label_language',
     178                'description': '',
     179                'help': '',
     180                'is_i18n': 0,
     181                'readonly_layout_modes': (),
     182                'hidden_layout_modes': ('create','edit', 'view'),
     183                'hidden_readonly_layout_modes': (),
     184                'hidden_empty': 0,
     185                'hidden_if_expr': '',
     186                'css_class': '',
     187                'vocabulary': 'language_voc',
     188            },
     189        },
     190    },
     191    'layout': {
     192        'style_prefix': 'layout_waeup_',
     193        'rows': [
     194            #[{'widget_id': 'LanguageSelector'}],
     195            [{'widget_id': 'Title'},],
     196            [{'widget_id': 'Description'},],
     197            #[{'widget_id': 'LanguageSelectorCreation'}],
     198            ],
     199        },
     200    }
     201#
     202###)
     203
     204student_layout = { ###(
     205    'widgets': {
     206        'jamb_is_admitted': {
     207            'type': 'Boolean Widget',
     208            'data': {
     209                'title': 'JAMB Admission',
     210                'fields': ('jamb_is_admitted',),
     211                'is_required': False,
     212                'label': 'JAMB Admission',
     213                'label_edit': 'JAMB Admission',
     214                'description': '',
     215                'help': '',
     216                'is_i18n': False,
     217                'readonly_layout_modes': (),
     218                'hidden_layout_modes': (),
     219                'hidden_readonly_layout_modes': (),
     220                'hidden_empty': False,
     221                'hidden_if_expr': '',
     222                'css_class': '',
     223                'widget_mode_expr': '',
     224                'display_width': 10,
     225                'size_max': 0,
     226            },
     227        },
     228##        'accommodation': {
    8229##            'type': 'String Widget',
    9230##            'data': {
    10 ##                'title': '',
    11 ##                'fields': ('',),
     231##                'title': 'Accommodation',
     232##                'fields': ('accommodation',),
    12233##                'is_required': False,
    13 ##                'label': '',
    14 ##                'label_edit': '',
     234##                'label': 'Accommodation',
     235##                'label_edit': 'Accommodation',
    15236##                'description': '',
    16237##                'help': '',
     
    26247##                'size_max': 0,
    27248##            },
    28 
    29 ###)
    30 
    31 Heading = { ###(
    32          'type': 'Heading Widget',
    33          'data': {
    34                 'fields': ['heading'],
    35                 'level': 1,
    36                 'is_i18n': 0,
    37                 'is_required': 1,
    38                 'label_edit': 'Headline',
    39                 'help': 'a short headline',
    40                 'display_width': 40,
    41                 'size_max': 200,
    42             },
    43         }###)
    44 
    45 Text = { ###(
    46             'type': 'Text Widget',
    47             'data': {
    48                 'fields': ['text'],
    49                 'is_i18n': 1,
    50                 'label_edit': 'Text',
    51                 'label': 'Text',
    52                 'help': 'a short Description',
    53                 'css_class': 'description',
    54                 'width': 72,
    55                 'height': 5,
    56                 'render_format': 'text',
    57                 'hidden_layout_modes': (),
    58             },
    59         }###)
    60 
    61 Title = { ###(
    62          'type': 'String Widget',
    63          'data': {
    64                 'fields': ['Title'],
    65                 'is_i18n': 0,
    66                 'is_required': 1,
    67                 'label': 'Title',
    68                 'label_edit': 'Title',
    69                 'display_width': 40,
    70                 'size_max': 200,
    71             },
    72         }###)
    73 
    74 Description = { ###(
    75             'type': 'Text Widget',
    76             'data': {
    77                 'fields': ['Description'],
    78                 'is_i18n': 1,
    79                 'label_edit': 'Description',
    80                 'label': 'Description',
    81                 'css_class': 'description',
    82                 'width': 72,
    83                 'height': 5,
    84                 'render_format': 'text',
    85                 'hidden_layout_modes': (),
    86             },
    87         }###)
    88 
    89 common_layout = {###(
    90     'widgets': {
    91         'LanguageSelector': {
    92             'type': 'Document Language Select Widget',
    93             'data': {
    94                 'fields': ['Language'],
    95             },
    96         },
    97         'Title': Title,
    98         'Description': Description,
    99         'LanguageSelectorCreation': {
    100             'type': 'Select Widget',
    101             'data': {
    102                 'title': 'Language',
    103                 'fields': ('Language',),
    104                 'is_required': 0,
    105                 'label': 'label_language',
    106                 'label_edit': 'label_language',
    107                 'description': '',
    108                 'help': '',
    109                 'is_i18n': 0,
    110                 'readonly_layout_modes': (),
    111                 'hidden_layout_modes': ('create','edit', 'view'),
    112                 'hidden_readonly_layout_modes': (),
    113                 'hidden_empty': 0,
    114                 'hidden_if_expr': '',
    115                 'css_class': '',
    116                 'vocabulary': 'language_voc',
    117             },
    118         },
    119     },
    120     'layout': {
    121         'style_prefix': 'layout_waeup_',
    122         'rows': [
    123             #[{'widget_id': 'LanguageSelector'}],
    124             [{'widget_id': 'Title'},],
    125             [{'widget_id': 'Description'},],
    126             #[{'widget_id': 'LanguageSelectorCreation'}],
    127             ],
    128         },
    129     }
    130 #
    131 ###)
    132 
    133 student_layout = { ###(
    134     'widgets': {
    135         'jamb_is_admitted': {
    136             'type': 'Boolean Widget',
    137             'data': {
    138                 'title': 'JAMB Admission',
    139                 'fields': ('jamb_is_admitted',),
    140                 'is_required': False,
    141                 'label': 'JAMB Admission',
    142                 'label_edit': 'JAMB Admission',
    143                 'description': '',
    144                 'help': '',
    145                 'is_i18n': False,
    146                 'readonly_layout_modes': (),
    147                 'hidden_layout_modes': (),
    148                 'hidden_readonly_layout_modes': (),
    149                 'hidden_empty': False,
    150                 'hidden_if_expr': '',
    151                 'css_class': '',
    152                 'widget_mode_expr': '',
    153                 'display_width': 10,
    154                 'size_max': 0,
    155             },
    156         },
    157 ##        'jamb_where_admitted': {
     249##        },
     250##        'accommodation_sc_pin': {
    158251##            'type': 'String Widget',
    159252##            'data': {
    160 ##                'title': 'Jamb Admission Location',
    161 ##                'fields': ('jamb_where_admitted',),
     253##                'title': 'Accommodation SC Pin',
     254##                'fields': ('accommodation_sc_pin',),
    162255##                'is_required': False,
    163 ##                'label': 'University',
    164 ##                'label_edit': 'University',
     256##                'label': 'Accommodation SC Pin',
     257##                'label_edit': 'Accommodation SC Pin',
    165258##                'description': '',
    166259##                'help': '',
     
    206299        'rows': [
    207300            #[{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
    208             #[{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
    209             #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
     301            #[{'widget_id': 'accommodation', 'ncols': 1},],
     302            #[{'widget_id': 'accommodation_sc_pin', 'ncols': 1},],
    210303            #[{'widget_id': 'faculty', 'ncols': 1},],
    211304        ]
     
    228321                },
    229322            }
    230 middlename = {
     323
     324###)
     325
     326middlename = { ###(
    231327            'type': 'String Widget',
    232328            'data': {
     
    251347            }
    252348
    253 lastname = {
     349###)
     350
     351lastname = { ###(
    254352            'type': 'String Widget',
    255353            'data': {
     
    273371            },
    274372        }
    275 sex = {
     373
     374###)
     375
     376email = { ###(
     377            'type': 'Email Widget',
     378            'data': {
     379                'title': 'Email',
     380                'fields': ('email',),
     381                'is_required': False,
     382                'label': 'Email',
     383                'label_edit': 'Email',
     384                'description': 'First Name',
     385                'help': 'First name',
     386                'is_i18n': False,
     387                'display_width': 40,
     388                },
     389            }
     390###)
     391
     392sex = { ###(
    276393            'type': 'Boolean Widget',
    277394            'data': {
     
    297414            }
    298415        }
     416
     417###)
     418
     419pw = { ###(
     420            'type': 'Password Widget',
     421            'data': {
     422                'title': 'Password',
     423                'fields': ('pw',),
     424                'is_required': False,
     425                'label': 'New Password',
     426                'label_edit': 'New Password',
     427                'description': '',
     428                'help': 'enter a new Password',
     429                'is_i18n': 0,
     430                'readonly_layout_modes': [],
     431                'hidden_layout_modes': [],
     432                'hidden_readonly_layout_modes': [],
     433                'hidden_empty': 0,
     434                'hidden_if_expr': '',
     435                'widget_mode_expr': '',
     436                'css_class': '',
     437                'css_class_expr': '',
     438                'javascript_expr': '',
     439                'display_width': 12,
     440                'size_max': 8,
     441                'password_widget': '',
     442                'check_lower': 0,
     443                'check_upper': 0,
     444                'check_digit': 0,
     445                'check_extra': 0,
     446                'size_min': 5,
     447            },
     448        }
     449###)
     450
     451rpw = { ###(
     452            'type': 'Password Widget',
     453            'data': {
     454                'title': 'confirm Password',
     455                'fields': ('rpw',),
     456                'is_required': False,
     457                'label': 'Confirm Password',
     458                'label_edit': 'Confirm Password',
     459                'description': '',
     460                'help': 'confirm the new Password',
     461                'is_i18n': False,
     462                'display_width': 12,
     463                'size_max': 8,
     464                'password_widget': 'pw',
     465                'check_lower': 0,
     466                'check_upper': 0,
     467                'check_digit': 0,
     468                'check_extra': 0,
     469                'size_min': 5,
     470                },
     471            }
    299472
    300473###)
     
    404577###)
    405578
     579student_eligibility = { ###(
     580    'widgets': {
     581        'firstname': firstname,
     582        'middlename': middlename,
     583        'lastname': lastname,
     584        'sex': sex,
     585        'email': email,
     586        'pw': pw,
     587        'rpw': rpw,
     588    },
     589    'layout': {
     590        'style_prefix': 'layout_eligibility_',
     591        'flexible_widgets': (),
     592        'ncols': 1,
     593        'rows': [
     594            #[{'widget_id': 'firstname', 'ncols': 1},],
     595            #[{'widget_id': 'middlename', 'ncols': 1},],
     596            #[{'widget_id': 'lastname', 'ncols': 1},],
     597            #[{'widget_id': 'sex', 'ncols': 1},],
     598            [{'widget_id': 'email', 'ncols': 1},],
     599            [{'widget_id': 'pw', 'ncols': 1},],
     600            [{'widget_id': 'rpw', 'ncols': 1},],
     601        ]
     602    },
     603}
     604###)
     605
    406606scratch_card = { ###(
    407607    'widgets': {
     
    494694            'data': {
    495695                'title': 'SC ID',
    496                 'fields': ('admission_sc_id',),
     696                'fields': ('sc_id',),
    497697                'is_required': False,
    498698                'label': 'Card Serial Number ',
     
    505705                'hidden_readonly_layout_modes': (),
    506706                'hidden_empty': False,
    507                 'hidden_if_expr': 'python:1',
    508                 'css_class': '',
    509                 'widget_mode_expr': '',
    510                 'display_width': 10,
    511                 'size_max': 0,
    512             },
    513         },
     707                'hidden_if_expr': '',
     708                'css_class': '',
     709                'widget_mode_expr': '',
     710                'display_width': 10,
     711                'size_max': 0,
     712            },
     713        },
     714        'sc_value': { ###(
     715         'type': 'Float Widget',
     716         'data': {
     717                'title': 'Scratch card value',
     718                'fields': ('sc_value',),
     719                'is_required': False,
     720                'label': 'SC Value',
     721                'label_edit': 'Scratcard Value',
     722                'description': '',
     723                'help': '',
     724                'is_i18n': False,
     725                'readonly_layout_modes': ('create'),
     726                'hidden_layout_modes': (),
     727                'hidden_readonly_layout_modes': (),
     728                'hidden_empty': False,
     729                'hidden_if_expr': '',
     730                'css_class': '',
     731                'widget_mode_expr': '',
     732                'display_width': 10,
     733                'size_max': 10,
     734            },
     735        },###)
    514736        'sc_pin': {
    515737            'type': 'Scratchcard Pin Widget',
    516738            'data': {
    517739                'title': 'SC Pin',
    518                 'fields': ('admission_sc_pin'),
     740                'fields': ('sc_pin'),
    519741                'is_required': True,
    520742                'label': 'PIN',
     
    541763        'ncols': 1,
    542764        'rows': [
    543             [{'widget_id': 'sc_id', 'ncols': 1},],
     765            #[{'widget_id': 'sc_id', 'ncols': 1},],
     766            [{'widget_id': 'sc_value', 'ncols': 1},],
    544767            [{'widget_id': 'sc_pin', 'ncols': 1},],
    545768            [{'widget_id': 'jamb_id', 'ncols': 1},],
     769        ]
     770    },
     771}
     772###)
     773
     774clearence = { ###(
     775    'widgets': {
     776        'sc_id': {
     777            'type': 'String Widget',
     778            'data': {
     779                'title': 'SC ID',
     780                'fields': ('sc_id',),
     781                'is_required': False,
     782                'label': 'Card Serial Number ',
     783                'label_edit': 'Card Serial Number',
     784                'description': 'Card Serial Number ',
     785                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
     786                'is_i18n': False,
     787                'readonly_layout_modes': (),
     788                'hidden_layout_modes': (),
     789                'hidden_readonly_layout_modes': (),
     790                'hidden_empty': False,
     791                'hidden_if_expr': 'python:1',
     792                'css_class': '',
     793                'widget_mode_expr': '',
     794                'display_width': 10,
     795                'size_max': 0,
     796            },
     797        },
     798        'sc_pin': {
     799            'type': 'Scratchcard Pin Widget',
     800            'data': {
     801                'title': 'SC Pin',
     802                'fields': ('sc_pin'),
     803                'is_required': True,
     804                'label': 'PIN',
     805                'label_edit': 'PIN',
     806                'description': '',
     807                'help': 'PIN-(Personal Identification Number) is an 8 or 12 digit number on the reverse side of the scratch card which you can purchase from many Banks',
     808                'is_i18n': False,
     809                'readonly_layout_modes': (),
     810                'hidden_layout_modes': (),
     811                'hidden_readonly_layout_modes': (),
     812                'hidden_empty': False,
     813                'hidden_if_expr': '',
     814                'css_class': '',
     815                'widget_mode_expr': '',
     816                'display_width': 10,
     817                'size_max': 10,
     818            },
     819        },
     820        'sc_value': { ###(
     821         'type': 'Float Widget',
     822         'data': {
     823                'title': 'Scratch card value',
     824                'fields': ('sc_value',),
     825                'is_required': False,
     826                'label': 'SC Value',
     827                'label_edit': 'Scratcard Value',
     828                'description': '',
     829                'help': '',
     830                'is_i18n': False,
     831                'readonly_layout_modes': ('create'),
     832                'hidden_layout_modes': (),
     833                'hidden_readonly_layout_modes': (),
     834                'hidden_empty': False,
     835                'hidden_if_expr': '',
     836                'css_class': '',
     837                'widget_mode_expr': '',
     838                'display_width': 10,
     839                'size_max': 10,
     840            },
     841        },###)
     842        'lastname': { ###(
     843         'type': 'String Widget',
     844         'data': {
     845                'title': 'Scratch card value',
     846                'fields': ('lastname',),
     847                'is_required': False,
     848                'label': 'Surname',
     849                'label_edit': 'Surname',
     850                'description': '',
     851                'help': '',
     852                'is_i18n': False,
     853                'readonly_layout_modes': ('create'),
     854                'hidden_layout_modes': (),
     855                'hidden_readonly_layout_modes': (),
     856                'hidden_empty': False,
     857                'hidden_if_expr': '',
     858                'css_class': '',
     859                'widget_mode_expr': '',
     860                'display_width': 10,
     861                'size_max': 10,
     862            },
     863        },###)
     864        'jamb_id' : jamb_id,
     865    },
     866   'layout': {
     867        'style_prefix': 'layout_clearence_',
     868        'flexible_widgets': (),
     869        'ncols': 1,
     870        'rows': [
     871            #[{'widget_id': 'sc_id', 'ncols': 1},],
     872            [{'widget_id': 'sc_value', 'ncols': 1},],
     873            [{'widget_id': 'sc_pin', 'ncols': 1},],
     874            [{'widget_id': 'jamb_id', 'ncols': 1},],
     875            #[{'widget_id': 'lastname', 'ncols': 1},],
    546876        ]
    547877    },
     
    8761206###)
    8771207
     1208admission_slip = { ###(
     1209    'widgets': jamb_widgets,
     1210    'layout': {
     1211        'style_prefix': 'layout_waeup_',
     1212        'flexible_widgets': (),
     1213        'ncols': 1,
     1214        'rows': [
     1215            [{'widget_id': 'reg_nr', 'ncols': 1},],
     1216            [{'widget_id': 'firstname', 'ncols': 1},],
     1217            [{'widget_id': 'middlename', 'ncols': 1},],
     1218            [{'widget_id': 'lastname', 'ncols': 1},],
     1219            #[{'widget_id': 'sc_id', 'ncols': 1},],
     1220            #[{'widget_id': 'sc_pin', 'ncols': 1},],
     1221            [{'widget_id': 'age', 'ncols': 1},],
     1222            [{'widget_id': 'sex', 'ncols': 1},],
     1223            [{'widget_id': 'state', 'ncols': 1},],
     1224            #[{'widget_id': 'exam_results', 'ncols': 1},],
     1225            [{'widget_id': 'aggregate', 'ncols': 1},],
     1226            [{'widget_id': 'faculty', 'ncols': 1},],
     1227            [{'widget_id': 'course', 'ncols': 1},],
     1228            [{'widget_id': 'listing_date', 'ncols': 1},],
     1229            #[{'widget_id': '2nd_choice', 'ncols': 1},],
     1230            #[{'widget_id': '3rd_choice', 'ncols': 1},],
     1231        ]
     1232    },
     1233}
     1234###)
     1235
    8781236course = { ###(
    8791237    'widgets': {
     
    10431401            [{'widget_id': 'points', 'ncols': 1},],
    10441402            [{'widget_id': 'grade', 'ncols': 1},],
    1045         ]
    1046     },
    1047 }
    1048 ###)
    1049 
    1050 study_level = { ###(
    1051     'widgets': {
    1052         'Title': {
    1053             'type': 'Select Widget',
    1054             'data': {
    1055                 'title': '',
    1056                 'fields': ('Title',),
    1057                 'is_required': False,
    1058                 'label': 'Study Level',
    1059                 'label_edit': 'Study Level',
    1060                 'description': '',
    1061                 'help': '',
    1062                 'vocabulary': 'courselevel',
    1063                 'is_i18n': False,
    1064                 'readonly_layout_modes': (),
    1065                 'hidden_layout_modes': (),
    1066                 'hidden_readonly_layout_modes': (),
    1067                 'hidden_empty': False,
    1068                 'hidden_if_expr': '',
    1069                 'css_class': '',
    1070                 'widget_mode_expr': '',
    1071                 'display_width': 20,
    1072                 'size_max': 0,
    1073             },
    1074         },
    1075     },
    1076    'layout': {
    1077         'style_prefix': 'layout_waeup_',
    1078         'flexible_widgets': (),
    1079         'ncols': 1,
    1080         'rows': [
    1081             [{'widget_id': 'Title', 'ncols': 1},],
    1082             #[{'widget_id': 'Year', 'ncols': 1},],
    10831403        ]
    10841404    },
     
    12071527###)
    12081528
    1209 accobook = { ###(
     1529study_level = { ###(
    12101530    'widgets': {
    1211         'sc_id': {
    1212             'type': 'String Widget',
    1213             'data': {
     1531      'sc_id': { ###(
     1532        'type': 'String Widget',
     1533        'data': {
    12141534                'title': 'SC ID',
    1215                 'fields': ('accommodation_sc_id',),
     1535                'fields': ('sc_id'),
    12161536                'is_required': False,
    12171537                'label': 'Card Serial Number ',
     
    12291549                'display_width': 10,
    12301550                'size_max': 0,
    1231             },
    1232         },
    1233         'sc_pin': {
    1234             'type': 'Scratchcard Pin Widget',
    1235             'data': {
     1551            }
     1552        },###)
     1553      'sc_pin': { ###(
     1554         'type': 'Scratchcard Pin Widget',
     1555         'data': {
     1556                'title': 'SC Pin',
     1557                'fields': ('sc_pin'),
     1558                'is_required': True,
     1559                'label': 'enter  PIN',
     1560                'label_edit': 'enter Scratchcard PIN with the value above',
     1561                'description': '',
     1562                'help': 'Please enter a Scratchcard PIN valid for Registration of next level',
     1563                'is_i18n': False,
     1564                'readonly_layout_modes': (),
     1565                'hidden_layout_modes': (),
     1566                'hidden_readonly_layout_modes': (),
     1567                'hidden_empty': False,
     1568                'hidden_if_expr': '',
     1569                'css_class': '',
     1570                'widget_mode_expr': '',
     1571                'display_width': 10,
     1572                'size_max': 10,
     1573            },
     1574        },###)
     1575      'sc_value': { ###(
     1576         'type': 'Float Widget',
     1577         'data': {
     1578                'title': 'Scratch card value',
     1579                'fields': ('sc_value',),
     1580                'is_required': False,
     1581                'label': 'Scratcard Value',
     1582                'label_edit': 'Scratcard Value',
     1583                'description': '',
     1584                'help': '',
     1585                'is_i18n': False,
     1586                'readonly_layout_modes': ('create'),
     1587                'hidden_layout_modes': (),
     1588                'hidden_readonly_layout_modes': (),
     1589                'hidden_empty': False,
     1590                'hidden_if_expr': '',
     1591                'css_class': '',
     1592                'widget_mode_expr': '',
     1593                'display_width': 10,
     1594                'size_max': 10,
     1595            },
     1596        },###)
     1597               },
     1598   'layout': {
     1599        'style_prefix': 'layout_slregister_',
     1600        'flexible_widgets': (),
     1601        'ncols': 1,
     1602        'rows': [
     1603            #[{'widget_id': 'sc_id', 'ncols': 1},],
     1604            [{'widget_id': 'sc_value', 'ncols': 1},],
     1605            [{'widget_id': 'sc_pin', 'ncols': 1},],
     1606        ]
     1607    },
     1608}###)
     1609
     1610accobook = { ###(
     1611    'widgets': {
     1612     'sc_id': { ###(
     1613        'type': 'String Widget',
     1614        'data': {
     1615                'title': 'SC ID',
     1616                'fields': ('accommodation_sc_id'),
     1617                'is_required': False,
     1618                'label': 'Card Serial Number ',
     1619                'label_edit': 'Card Serial Number',
     1620                'description': 'Card Serial Number ',
     1621                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
     1622                'is_i18n': False,
     1623                'readonly_layout_modes': (),
     1624                'hidden_layout_modes': (),
     1625                'hidden_readonly_layout_modes': (),
     1626                'hidden_empty': False,
     1627                'hidden_if_expr': 'python:1',
     1628                'css_class': '',
     1629                'widget_mode_expr': '',
     1630                'display_width': 10,
     1631                'size_max': 0,
     1632            }
     1633        },###)
     1634        'sc_pin': { ###(
     1635         'type': 'Scratchcard Pin Widget',
     1636         'data': {
    12361637                'title': 'SC Pin',
    12371638                'fields': ('accommodation_sc_pin'),
    12381639                'is_required': True,
    1239                 'label': 'enter an Accommodation PIN',
     1640                'label': 'enter PIN',
    12401641                'label_edit': 'enter an Accommodation PIN',
    12411642                'description': '',
     
    12521653                'size_max': 10,
    12531654            },
    1254         },
    1255     },
     1655        },###)
     1656        'sc_value': { ###(
     1657         'type': 'Float Widget',
     1658         'data': {
     1659                'title': 'Scratch card value',
     1660                'fields': ('accommodation_sc_value',),
     1661                'is_required': False,
     1662                'label': 'SC Value',
     1663                'label_edit': 'Scratcard Value',
     1664                'description': '',
     1665                'help': '',
     1666                'is_i18n': False,
     1667                'readonly_layout_modes': ('create'),
     1668                'hidden_layout_modes': (),
     1669                'hidden_readonly_layout_modes': (),
     1670                'hidden_empty': False,
     1671                'hidden_if_expr': '',
     1672                'css_class': '',
     1673                'widget_mode_expr': '',
     1674                'display_width': 10,
     1675                'size_max': 10,
     1676            },
     1677        },###)
     1678               },
    12561679   'layout': {
    12571680        'style_prefix': 'layout_accobook_',
     
    12601683        'rows': [
    12611684            #[{'widget_id': 'sc_id', 'ncols': 1},],
     1685            [{'widget_id': 'sc_value', 'ncols': 1},],
    12621686            [{'widget_id': 'sc_pin', 'ncols': 1},],
    12631687        ]
     
    12721696layouts['study_level'] = study_level
    12731697layouts['student_personal'] = student_personal_layout
     1698layouts['student_eligibility'] = student_eligibility
    12741699layouts['accommodation'] = accommodation
    12751700layouts['accobook'] = accobook
    12761701layouts['scratch_card'] = scratch_card
    12771702layouts['admission'] = admission
     1703layouts['clearence'] = clearence
     1704layouts['admission_slip'] = admission_slip
    12781705layouts['jambcreate'] = jamb_layoutcreate
    12791706layouts['jamb'] = jamb_layout
  • waeup_product/trunk/skins/waeup_default/getWAeUPSchemas.py

    r161 r164  
    11#-*- mode: python; mode: fold -*-
    22# $Id$
     3
     4sc_id = { ###(
     5        'type': 'CPS String Field',
     6        'data': {
     7            'default_expr': 'string:',
     8            'is_searchabletext': True,
     9            'acl_read_permissions': '',
     10            'acl_read_roles': '',
     11            'acl_read_expr': '',
     12            'acl_write_permissions': '',
     13            'acl_write_roles': 'SectionReader',
     14            'acl_write_expr': '',
     15            'read_ignore_storage': False,
     16            'read_process_expr': '',
     17            'read_process_dependent_fields': (),
     18            'write_ignore_storage': False,
     19            'write_process_expr': '',
     20            },
     21        }
     22###)
     23
     24sc_pin = { ###(
     25        'type': 'CPS String Field',
     26        'data': {
     27            'default_expr': 'string:',
     28            'is_searchabletext': True,
     29            'acl_read_permissions': '',
     30            'acl_read_roles': '',
     31            'acl_read_expr': '',
     32            'acl_write_permissions': '',
     33            'acl_write_roles': 'SectionReader',
     34            'acl_write_expr': '',
     35            'read_ignore_storage': False,
     36            'read_process_expr': '',
     37            'read_process_dependent_fields': (),
     38            'write_ignore_storage': False,
     39            'write_process_expr': '',
     40            },
     41        }
     42       
     43###)
     44
     45sc_value = { ###(
     46        'type': 'CPS Float Field',
     47        'data': {
     48            'default_expr': 'python:500.',
     49            'is_searchabletext': True,
     50            'acl_read_permissions': '',
     51            'acl_read_roles': '',
     52            'acl_read_expr': '',
     53            'acl_write_permissions': '',
     54            'acl_write_roles': '',
     55            'acl_write_expr': '',
     56            'read_ignore_storage': False,
     57            'read_process_expr': '',
     58            'read_process_dependent_fields': (),
     59            'write_ignore_storage': False,
     60            'write_process_expr': '',
     61            },
     62        }
     63###)
    364
    465university_schema = { ###(
     
    67128            'write_ignore_storage': False,
    68129            'write_process_expr': '',
    69         },
    70     },
    71     'accommodation_sc_id': {
    72         'type': 'CPS String Field',
    73         'data': {
    74             'default_expr': 'string:',
    75             'is_searchabletext': True,
    76             'acl_read_permissions': '',
    77             'acl_read_roles': '',
    78             'acl_read_expr': '',
    79             'acl_write_permissions': '',
    80             'acl_write_roles': '',
    81             'acl_write_expr': '',
    82             'read_ignore_storage': False,
    83             'read_process_expr': '',
    84             'read_process_dependent_fields': (),
    85             'write_ignore_storage': False,
    86             'write_process_expr': '',
    87         },
    88     },
    89     'accommodation_sc_pin': {
    90         'type': 'CPS String Field',
    91         'data': {
    92             'default_expr': 'string:',
    93             'is_searchabletext': True,
    94             'acl_read_permissions': '',
    95             'acl_read_roles': '',
    96             'acl_read_expr': '',
    97             'acl_write_permissions': '',
    98             'acl_write_roles': '',
    99             'acl_write_expr': '',
    100             'read_ignore_storage': False,
    101             'read_process_expr': '',
    102             'read_process_dependent_fields': (),
    103             'write_ignore_storage': False,
    104             'write_process_expr': '',
    105         },
    106     },
    107 }
    108 #
    109 ###)
    110 
    111 studylevel = { ###(
    112 }
    113 #
     130             },
     131        },
     132    'adm_check_sc_id' : sc_id,
     133    'adm_check_sc_pin' : sc_pin,
     134    'adm_check_sc_value' : sc_value,
     135    'adm_check_date' : {
     136        'type': 'CPS DateTime Field',
     137        'data': {
     138            'is_searchabletext': 0,
     139            'acl_write_roles': 'SectionReader',
     140        },
     141    },
     142    'clearence_sc_id' : sc_id,
     143    'clearence_sc_pin' : sc_pin,
     144    'clearence_sc_value' : sc_value,
     145    'clearence_date' : {
     146        'type': 'CPS DateTime Field',
     147        'data': {
     148            'is_searchabletext': 0,
     149            'acl_write_roles': 'SectionReader',
     150        },
     151    },
     152    'accommodation_sc_id' : sc_id,
     153    'accommodation_sc_pin' : sc_pin,
     154    'accommodation_sc_value' : sc_value,
     155    'accommodation_date' : {
     156        'type': 'CPS DateTime Field',
     157        'data': {
     158            'is_searchabletext': 0,
     159            'acl_write_roles': 'SectionReader',
     160        },
     161    },
     162}
     163###)
     164
     165student_accommodation = { ###(
     166    'sc_id': sc_id,
     167    'sc_pin': sc_pin,
     168    'sc_value': { ###(
     169        'type': 'CPS Float Field',
     170        'data': {
     171            'default_expr': 'python:500.',
     172            'is_searchabletext': True,
     173            'acl_read_permissions': '',
     174            'acl_read_roles': '',
     175            'acl_read_expr': '',
     176            'acl_write_permissions': '',
     177            'acl_write_roles': '',
     178            'acl_write_expr': '',
     179            'read_ignore_storage': False,
     180            'read_process_expr': '',
     181            'read_process_dependent_fields': (),
     182            'write_ignore_storage': False,
     183            'write_process_expr': '',
     184            },
     185        },###)
     186    'accommodation': {
     187        'type': 'CPS String Field',
     188        'data': {
     189            'default_expr': 'string:',
     190            'is_searchabletext': True,
     191            'acl_read_permissions': '',
     192            'acl_read_roles': '',
     193            'acl_read_expr': '',
     194            'acl_write_permissions': '',
     195            'acl_write_roles': '',
     196            'acl_write_expr': '',
     197            'read_ignore_storage': False,
     198            'read_process_expr': '',
     199            'read_process_dependent_fields': (),
     200            'write_ignore_storage': False,
     201            'write_process_expr': '',
     202             },
     203        },
     204}
     205###)
     206
     207student_admission = { ###(
     208    'sc_id': sc_id,
     209    'sc_pin': sc_pin,
     210    'sc_value': { ###(
     211        'type': 'CPS Float Field',
     212        'data': {
     213            'default_expr': 'python:300.',
     214            'is_searchabletext': True,
     215            'acl_read_permissions': '',
     216            'acl_read_roles': '',
     217            'acl_read_expr': '',
     218            'acl_write_permissions': '',
     219            'acl_write_roles': '',
     220            'acl_write_expr': '',
     221            'read_ignore_storage': False,
     222            'read_process_expr': '',
     223            'read_process_dependent_fields': (),
     224            'write_ignore_storage': False,
     225            'write_process_expr': '',
     226            },
     227        },###)
     228    'reg_nr': {
     229        'type': 'CPS String Field',
     230        'data': {
     231            'default_expr': 'string:',
     232            'is_searchabletext': True,
     233        },
     234    },
     235}
     236###)
     237
     238student_clearence = { ###(
     239    'sc_id': sc_id,
     240    'sc_pin': sc_pin,
     241    'sc_value': { ###(
     242        'type': 'CPS Float Field',
     243        'data': {
     244            'default_expr': 'python:800.',
     245            'is_searchabletext': True,
     246            'acl_read_permissions': '',
     247            'acl_read_roles': '',
     248            'acl_read_expr': '',
     249            'acl_write_permissions': '',
     250            'acl_write_roles': '',
     251            'acl_write_expr': '',
     252            'read_ignore_storage': False,
     253            'read_process_expr': '',
     254            'read_process_dependent_fields': (),
     255            'write_ignore_storage': False,
     256            'write_process_expr': '',
     257            },
     258        },###)
     259    'reg_nr': {
     260        'type': 'CPS String Field',
     261        'data': {
     262            'default_expr': 'string:',
     263            'is_searchabletext': True,
     264        },
     265    },
     266    'lastname': {
     267        'type': 'CPS String Field',
     268        'data': {
     269            'default_expr': 'string:',
     270            'is_searchabletext': True,
     271            'acl_read_permissions': '',
     272            'acl_read_roles': '',
     273            'acl_read_expr': '',
     274            'acl_write_permissions': '',
     275            'acl_write_roles': '',
     276            'acl_write_expr': '',
     277            'read_ignore_storage': False,
     278            'read_process_expr': '',
     279            'read_process_dependent_fields': (),
     280            'write_ignore_storage': False,
     281            'write_process_expr': '',
     282             },
     283        },
     284}###)
     285
     286study_level = { ###(
     287    'sc_id': sc_id,
     288    'sc_pin': sc_pin,
     289    'sc_value': { ###(
     290        'type': 'CPS Float Field',
     291        'data': {
     292            'default_expr': 'python:1000.',
     293            'is_searchabletext': True,
     294            'acl_read_permissions': '',
     295            'acl_read_roles': '',
     296            'acl_read_expr': '',
     297            'acl_write_permissions': '',
     298            'acl_write_roles': '',
     299            'acl_write_expr': '',
     300            'read_ignore_storage': False,
     301            'read_process_expr': '',
     302            'read_process_dependent_fields': (),
     303            'write_ignore_storage': False,
     304            'write_process_expr': '',
     305            },
     306        },###)
     307}
    114308###)
    115309
     
    164358        },
    165359    },
     360}
     361###)
     362
     363student_eligibility = { ###(
     364     'firstname': {
     365        'type': 'CPS String Field',
     366        'data': {
     367            'is_searchabletext': 1,
     368        },
     369    },
     370    'middlename': {
     371        'type': 'CPS String Field',
     372        'data': {
     373            'is_searchabletext': 1,
     374        },
     375    },
     376     'lastname': {
     377        'type': 'CPS String Field',
     378        'data': {
     379            'is_searchabletext': 1,
     380        },
     381    },
     382     'sex': {
     383        'type': 'CPS Boolean Field',
     384        'default_expr': 'python:True',
     385        'data': {
     386            'is_searchabletext': 0,
     387        },
     388    },
     389##     'birthday': {
     390##        'type': 'CPS DateTime Field',
     391##        'data': {
     392##            'is_searchabletext': 1,
     393##        },
     394##    },
     395     'age': {
     396        'type': 'CPS DateTime Field',
     397        'data': {
     398            'is_searchabletext': 0,
     399        },
     400    },
     401    'email': {
     402        'type': 'CPS String Field',
     403        'data': {
     404            'is_searchabletext': 1,
     405        },
     406    },
     407    'pw': {
     408        'type': 'CPS String Field',
     409        'data': {
     410            'default_expr': 'string:default',
     411        },
     412    },
     413    'rpw': {
     414        'type': 'CPS String Field',
     415        'data': {
     416            'default_expr': 'string:default',
     417        },
     418    },
     419##     'photo': {
     420##        'type': 'CPS Image Field',
     421##        'data': {
     422##            'is_searchabletext': 0,
     423##        },
     424##    },
     425##     'birth_certificate': {
     426##        'type': 'CPS Image Field',
     427##        'data': {
     428##            'is_searchabletext': 0,
     429##        },
     430##    },
    166431}
    167432###)
     
    497762schemas['students'] = students_folder_schema
    498763schemas['student'] = student_schema
    499 schemas['studylevel'] = studylevel
     764schemas['student_admission'] = student_admission
     765schemas['student_clearence'] = student_clearence
     766schemas['student_eligibility'] = student_eligibility
     767schemas['student_accommodation'] = student_accommodation
     768schemas['study_level'] = study_level
    500769schemas['course_results'] = course_results_schema
    501770schemas['student_personal'] = student_personal_schema
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r162 r164  
    2020    'global_allow': 1,
    2121    'filter_content_types': 1,
    22     'allowed_content_types': ('StudentsFolder','Faculty','AccoFolder','Section','CPSProxyDocument'),
     22    'allowed_content_types': ('Chat','FAQ','CPSCalendar','Forum','StudentsFolder','Faculty','AccoFolder','Section','CPSProxyDocument'),
    2323    'allow_discussion': 0,
    2424    'cps_is_searchable': 1,
     
    111111                'permissions': (UniversityManage,StudentManage)},
    112112                {
    113                 'id'        : 'my_admission',
    114                 'name'      : 'My Admission Status',
     113                'id'        : 'check_admission',
     114                'name'      : 'Check Admission Status',
    115115                'action'    : 'string:${object/absolute_url}/check_admission',
    116116                'condition':  'object/portal_membership/isAnonymousUser',
     
    118118                {
    119119                'id'        : 'admission_list',
    120                 'name'      : 'Admission List',
    121                 'action'    : 'string:${object/absolute_url}/admission_status',
     120                'name'      : 'Clearence Elegibility Process',
     121                'action'    : 'string:${object/absolute_url}/clearence',
    122122                'condition':  'object/portal_membership/isAnonymousUser',
    123123                'permission': (View,)},
     
    180180          #'action': 'string:${object_url}/student_index_html',
    181181          'action': 'temporary_view_all',
    182           'condition': '',
     182          'condition':  'object/memberIsOwner',
    183183          'permission': (View,),
    184184          'category': 'object',
    185           'visible': True,},
     185          'visible': True,
     186          },
    186187         {'id': 'metadata',
    187188          'name': 'action_metadata',
     
    194195          'permissions': (ModifyPortalContent),
    195196          'visible' : 0,
     197          },
     198         {'id'        : 'eligibility',
     199          'name'      : 'eligibility',
     200          'action'    : 'eligibility',
     201          'condition':  'object/memberIsOwner',
     202          'permission': (ModifyPortalContent,),
     203          'visible': False,
    196204          },
    197205         {'id'        : 'JAMB',
    198206          'name'      : 'JAMB Data',
    199207          'action'    : 'string:${object/absolute_url}/JAMB',
    200           'condition':  '',
     208          'condition':  'object/memberIsOwner',
    201209          'permission': (ModifyPortalContent,)},
    202210          {
     
    204212          'name'      : 'Personal Data',
    205213          'action'    : 'string:${object/absolute_url}/PERSONAL',
    206           'condition':  "python:getattr(object,'PERSONAL',None)",
     214          'condition':  "python: object.getContent().memberIsOwner() and getattr(object,'PERSONAL',None)",
    207215          'permission': (ModifyPortalContent,)},
    208216          {
     
    210218          'name'      : 'Register for next Level',
    211219          'action'    : 'string:${object/absolute_url}/register_level',
    212           'condition':  '',
     220          'condition':  'object/memberIsOwner',
    213221          'permission': (ModifyPortalContent,)},
    214222          {
     
    216224          'name'      : 'Book Accomodation',
    217225          'action'    : 'string:${object/absolute_url}/book_accommodation',
    218           'condition':  '',
     226          'condition':  'object/memberIsOwner',
    219227          'permission': (ModifyPortalContent,)},
    220228          )
  • waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py

    r153 r164  
    8383            ('200', "Year 2 (200 Level)", ''),
    8484            ('300', "Year 3 (300 Level)", ''),
    85             ('400', "Year 4 (100 Level)", ''),
     85            ('400', "Year 4 (400 Level)", ''),
    8686            )},
    8787        }
Note: See TracChangeset for help on using the changeset viewer.