source: waeup_product/trunk/skins/waeup_default/getWAeUPLayouts.py @ 170

Last change on this file since 170 was 169, checked in by Henrik Bettermann, 19 years ago

temporary views modified

  • Property svn:keywords set to Id
File size: 74.2 KB
Line 
1#-*- mode: python; mode: fold -*-
2##parameters=
3# $Id: getWAeUPLayouts.py 169 2005-11-13 22:23:03Z henrik $
4"""Return custom layouts types."""
5
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
204firstname = { ###(
205            'type': 'String Widget',
206            'data': {
207                'title': 'First Name',
208                'fields': ('firstname',),
209                'is_required': False,
210                'label': 'First Name',
211                'label_edit': 'First Name',
212                'description': 'First Name',
213                'help': 'First name',
214                'is_i18n': False,
215                'display_width': 40,
216                },
217            }
218
219###)
220
221middlename = { ###(
222            'type': 'String Widget',
223            'data': {
224                'title': '',
225                'fields': ('middlename',),
226                'is_required': False,
227                'label': 'Middle Name',
228                'label_edit': 'Middle Name',
229                'description': '',
230                'help': 'middle name',
231                'is_i18n': False,
232                'readonly_layout_modes': (),
233                'hidden_layout_modes': (),
234                'hidden_readonly_layout_modes': (),
235                'hidden_empty': True,
236                'hidden_if_expr': '',
237                'css_class': '',
238                'widget_mode_expr': '',
239                'display_width': 40,
240                'size_max': 0,
241                },
242            }
243
244###)
245
246lastname = { ###(
247            'type': 'String Widget',
248            'data': {
249                'title': '',
250                'fields': ('lastname',),
251                'is_required': False,
252                'label': 'Surname',
253                'label_edit': 'Surname',
254                'description': '',
255                'help': 'Surname',
256                'is_i18n': False,
257                'readonly_layout_modes': (),
258                'hidden_layout_modes': (),
259                'hidden_readonly_layout_modes': (),
260                'hidden_empty': False,
261                'hidden_if_expr': '',
262                'css_class': '',
263                'widget_mode_expr': '',
264                'display_width': 40,
265                'size_max': 0,
266            },
267        }
268
269###)
270
271email = { ###(
272            'type': 'Email Widget',
273            'data': {
274                'title': 'Email',
275                'fields': ('email',),
276                'is_required': False,
277                'label': 'Email',
278                'label_edit': 'Email',
279                'description': 'First Name',
280                'help': 'First name',
281                'is_i18n': False,
282                'display_width': 40,
283                },
284            }
285###)
286
287sex = { ###(
288            'type': 'Boolean Widget',
289            'data': {
290                'title': '',
291                'fields': ('sex',),
292                'is_required': False,
293                'label': 'Sex',
294                'label_edit': 'Sex',
295                'label_false': 'male',
296                'label_true': 'female',
297                'description': '',
298                'help': '',
299                'is_i18n': False,
300                'readonly_layout_modes': (),
301                'hidden_layout_modes': (),
302                'hidden_readonly_layout_modes': (),
303                'hidden_empty': False,
304                'hidden_if_expr': '',
305                'css_class': '',
306                'widget_mode_expr': '',
307                'display_width': 20,
308                'size_max': 0,
309            }
310        }
311
312###)
313
314pw = { ###(
315            'type': 'Password Widget',
316            'data': {
317                'title': 'Password',
318                'fields': ('pw',),
319                'is_required': False,
320                'label': 'New Password',
321                'label_edit': 'New Password',
322                'description': '',
323                'help': 'enter a new Password',
324                'is_i18n': 0,
325                'readonly_layout_modes': [],
326                'hidden_layout_modes': [],
327                'hidden_readonly_layout_modes': [],
328                'hidden_empty': 0,
329                'hidden_if_expr': '',
330                'widget_mode_expr': '',
331                'css_class': '',
332                'css_class_expr': '',
333                'javascript_expr': '',
334                'display_width': 12,
335                'size_max': 8,
336                'password_widget': '',
337                'check_lower': 0,
338                'check_upper': 0,
339                'check_digit': 0,
340                'check_extra': 0,
341                'size_min': 5,
342            },
343        }
344###)
345
346rpw = { ###(
347            'type': 'Password Widget',
348            'data': {
349                'title': 'confirm Password',
350                'fields': ('rpw',),
351                'is_required': False,
352                'label': 'Confirm Password',
353                'label_edit': 'Confirm Password',
354                'description': '',
355                'help': 'confirm the new Password',
356                'is_i18n': False,
357                'display_width': 12,
358                'size_max': 8,
359                'password_widget': 'pw',
360                'check_lower': 0,
361                'check_upper': 0,
362                'check_digit': 0,
363                'check_extra': 0,
364                'size_min': 5,
365                },
366            }
367
368###)
369
370student_layout = { ###(
371    'widgets': {
372        'jamb_is_admitted': {
373            'type': 'Boolean Widget',
374            'data': {
375                'title': 'JAMB Admission',
376                'fields': ('jamb_is_admitted',),
377                'is_required': False,
378                'label': 'JAMB Admission',
379                'label_edit': 'JAMB Admission',
380                'description': '',
381                'help': '',
382                'is_i18n': False,
383                'readonly_layout_modes': (),
384                'hidden_layout_modes': (),
385                'hidden_readonly_layout_modes': (),
386                'hidden_empty': False,
387                'hidden_if_expr': '',
388                'css_class': '',
389                'widget_mode_expr': '',
390                'display_width': 10,
391                'size_max': 0,
392            },
393        },
394
395        'faculty': {
396            'type': 'String Widget',
397            'data': {
398                'title': 'Faculty',
399                'fields': ('faculty',),
400                'is_required': False,
401                'label': 'Faculty',
402                'label_edit': 'Faculty',
403                'description': '',
404                'help': '',
405                'is_i18n': False,
406                'readonly_layout_modes': (),
407                'hidden_layout_modes': (),
408                'hidden_readonly_layout_modes': (),
409                'hidden_empty': False,
410                'hidden_if_expr': '',
411                'css_class': '',
412                'widget_mode_expr': '',
413                'display_width': 10,
414                'size_max': 0,
415            },
416        },
417        'accommodation': {
418            'type': 'String Widget',
419            'data': {
420                'title': 'Accommodation',
421                'fields': ('accommodation',),
422                'is_required': False,
423                'label': 'Accommodation',
424                'label_edit': 'Accommodation',
425                'description': '',
426                'help': '',
427                'is_i18n': False,
428                'readonly_layout_modes': (),
429                'hidden_layout_modes': (),
430                'hidden_readonly_layout_modes': (),
431                'hidden_empty': False,
432                'hidden_if_expr': '',
433                'css_class': '',
434                'widget_mode_expr': '',
435                'display_width': 10,
436                'size_max': 0,
437            },
438        },
439        'accommodation_sc_id': { ###(
440            'type': 'String Widget',
441            'data': {
442                'title': 'Accommodation SC ID',
443                'fields': ('accommodation_sc_id',),
444                'is_required': False,
445                'label': 'Accommodation SC ID',
446                'label_edit': 'Accommodation SC ID',
447                'description': '',
448                'help': '',
449                'is_i18n': False,
450                'readonly_layout_modes': (),
451                'hidden_layout_modes': (),
452                'hidden_readonly_layout_modes': (),
453                'hidden_empty': False,
454                'hidden_if_expr': '',
455                'css_class': '',
456                'widget_mode_expr': '',
457                'display_width': 10,
458                'size_max': 0,
459            },
460        },###)
461        'accommodation_sc_pin': { ###(
462            'type': 'String Widget',
463            'data': {
464                'title': 'Accommodation SC Pin',
465                'fields': ('accommodation_sc_pin',),
466                'is_required': False,
467                'label': 'Accommodation SC Pin',
468                'label_edit': 'Accommodation SC Pin',
469                'description': '',
470                'help': '',
471                'is_i18n': False,
472                'readonly_layout_modes': (),
473                'hidden_layout_modes': (),
474                'hidden_readonly_layout_modes': (),
475                'hidden_empty': False,
476                'hidden_if_expr': '',
477                'css_class': '',
478                'widget_mode_expr': '',
479                'display_width': 10,
480                'size_max': 0,
481            },
482        },###)
483        'accommodation_sc_value': { ###(
484            'type': 'Float Widget',
485            'data': {
486                'title': 'Accommodation SC Value',
487                'fields': ('accommodation_sc_value',),
488                'is_required': False,
489                'label': 'Accommodation SC Value',
490                'label_edit': 'Accommodation SC Value',
491                'description': '',
492                'help': '',
493                'is_i18n': False,
494                'readonly_layout_modes': (),
495                'hidden_layout_modes': (),
496                'hidden_readonly_layout_modes': (),
497                'hidden_empty': False,
498                'hidden_if_expr': '',
499                'css_class': '',
500                'widget_mode_expr': '',
501                'display_width': 10,
502                'size_max': 0,
503            },
504        },###)
505        'accommodation_date': { ###(
506            'type': 'DateTime Widget',
507            'data': {
508                'title': 'Accommodation SC Pin',
509                'fields': ('accommodation_date',),
510                'is_required': False,
511                'label': 'Accommodation SC Date',
512                'label_edit': 'Accommodation SC Date',
513                'description': '',
514                'help': '',
515                'is_i18n': False,
516                'readonly_layout_modes': (),
517                'hidden_layout_modes': (),
518                'hidden_readonly_layout_modes': (),
519                'hidden_empty': False,
520                'hidden_if_expr': '',
521                'css_class': '',
522                'widget_mode_expr': '',
523                'display_width': 10,
524                'size_max': 0,
525            },
526        },###)
527        'hostel_fee_sc_id': { ###(
528            'type': 'String Widget',
529            'data': {
530                'title': 'hostel_fee SC ID',
531                'fields': ('hostel_fee_sc_id',),
532                'is_required': False,
533                'label': 'Hostel Fee SC ID',
534                'label_edit': 'Hostel Fee SC ID',
535                'description': '',
536                'help': '',
537                'is_i18n': False,
538                'readonly_layout_modes': (),
539                'hidden_layout_modes': (),
540                'hidden_readonly_layout_modes': (),
541                'hidden_empty': False,
542                'hidden_if_expr': '',
543                'css_class': '',
544                'widget_mode_expr': '',
545                'display_width': 10,
546                'size_max': 0,
547            },
548        },###)
549        'hostel_fee_sc_pin': { ###(
550            'type': 'String Widget',
551            'data': {
552                'title': 'hostel_fee SC Pin',
553                'fields': ('hostel_fee_sc_pin',),
554                'is_required': False,
555                'label': 'Hostel Fee SC Pin',
556                'label_edit': 'Hostel Fee SC Pin',
557                'description': '',
558                'help': '',
559                'is_i18n': False,
560                'readonly_layout_modes': (),
561                'hidden_layout_modes': (),
562                'hidden_readonly_layout_modes': (),
563                'hidden_empty': False,
564                'hidden_if_expr': '',
565                'css_class': '',
566                'widget_mode_expr': '',
567                'display_width': 10,
568                'size_max': 0,
569            },
570        },###)
571        'hostel_fee_sc_value': { ###(
572            'type': 'Float Widget',
573            'data': {
574                'title': 'hostel_fee SC Value',
575                'fields': ('hostel_fee_sc_value',),
576                'is_required': False,
577                'label': 'Hostel Fee SC Value',
578                'label_edit': 'Hostel Fee SC Value',
579                'description': '',
580                'help': '',
581                'is_i18n': False,
582                'readonly_layout_modes': (),
583                'hidden_layout_modes': (),
584                'hidden_readonly_layout_modes': (),
585                'hidden_empty': False,
586                'hidden_if_expr': '',
587                'css_class': '',
588                'widget_mode_expr': '',
589                'display_width': 10,
590                'size_max': 0,
591            },
592        },###)
593        'hostel_fee_date': { ###(
594            'type': 'DateTime Widget',
595            'data': {
596                'title': 'hostel_fee SC Pin',
597                'fields': ('hostel_fee_date',),
598                'is_required': False,
599                'label': 'Hostel Fee SC Date',
600                'label_edit': 'Hostel Fee SC Date',
601                'description': '',
602                'help': '',
603                'is_i18n': False,
604                'readonly_layout_modes': (),
605                'hidden_layout_modes': (),
606                'hidden_readonly_layout_modes': (),
607                'hidden_empty': False,
608                'hidden_if_expr': '',
609                'css_class': '',
610                'widget_mode_expr': '',
611                'display_width': 10,
612                'size_max': 0,
613            },
614        },###)
615        'adm_check_sc_id': { ###(
616            'type': 'String Widget',
617            'data': {
618                'title': 'Admission check SC ID',
619                'fields': ('adm_check_sc_id',),
620                'is_required': False,
621                'label': 'Admission check SC ID',
622                'label_edit': 'Admission check SC ID',
623                'description': '',
624                'help': '',
625                'is_i18n': False,
626                'readonly_layout_modes': (),
627                'hidden_layout_modes': (),
628                'hidden_readonly_layout_modes': (),
629                'hidden_empty': False,
630                'hidden_if_expr': '',
631                'css_class': '',
632                'widget_mode_expr': '',
633                'display_width': 10,
634                'size_max': 0,
635            },
636        },###)
637        'adm_check_sc_pin': { ###(
638            'type': 'String Widget',
639            'data': {
640                'title': 'Admission check SC Pin',
641                'fields': ('adm_check_sc_pin',),
642                'is_required': False,
643                'label': 'Admission check SC Pin',
644                'label_edit': 'Admission check SC Pin',
645                'description': '',
646                'help': '',
647                'is_i18n': False,
648                'readonly_layout_modes': (),
649                'hidden_layout_modes': (),
650                'hidden_readonly_layout_modes': (),
651                'hidden_empty': False,
652                'hidden_if_expr': '',
653                'css_class': '',
654                'widget_mode_expr': '',
655                'display_width': 10,
656                'size_max': 0,
657            },
658        },###)
659        'adm_check_sc_value': { ###(
660            'type': 'Float Widget',
661            'data': {
662                'title': 'Admission check SC Value',
663                'fields': ('adm_check_sc_value',),
664                'is_required': False,
665                'label': 'Admission check SC Value',
666                'label_edit': 'Admission check SC Value',
667                'description': '',
668                'help': '',
669                'is_i18n': False,
670                'readonly_layout_modes': (),
671                'hidden_layout_modes': (),
672                'hidden_readonly_layout_modes': (),
673                'hidden_empty': False,
674                'hidden_if_expr': '',
675                'css_class': '',
676                'widget_mode_expr': '',
677                'display_width': 10,
678                'size_max': 0,
679            },
680        },###)
681        'adm_check_date': { ###(
682            'type': 'DateTime Widget',
683            'data': {
684                'title': 'Admission check SC Pin',
685                'fields': ('adm_check_date',),
686                'is_required': False,
687                'label': 'Admission check SC Date',
688                'label_edit': 'Admission check SC Date',
689                'description': '',
690                'help': '',
691                'is_i18n': False,
692                'readonly_layout_modes': (),
693                'hidden_layout_modes': (),
694                'hidden_readonly_layout_modes': (),
695                'hidden_empty': False,
696                'hidden_if_expr': '',
697                'css_class': '',
698                'widget_mode_expr': '',
699                'display_width': 10,
700                'size_max': 0,
701            },
702        },###)
703        'clearence_sc_id': { ###(
704            'type': 'String Widget',
705            'data': {
706                'title': 'Clearence SC ID',
707                'fields': ('clearence_sc_id',),
708                'is_required': False,
709                'label': 'Clearence SC ID',
710                'label_edit': 'Clearence SC ID',
711                'description': '',
712                'help': '',
713                'is_i18n': False,
714                'readonly_layout_modes': (),
715                'hidden_layout_modes': (),
716                'hidden_readonly_layout_modes': (),
717                'hidden_empty': False,
718                'hidden_if_expr': '',
719                'css_class': '',
720                'widget_mode_expr': '',
721                'display_width': 10,
722                'size_max': 0,
723            },
724        },###)
725        'clearence_sc_pin': { ###(
726            'type': 'String Widget',
727            'data': {
728                'title': 'clearence SC Pin',
729                'fields': ('clearence_sc_pin',),
730                'is_required': False,
731                'label': 'Clearence SC Pin',
732                'label_edit': 'Clearence SC Pin',
733                'description': '',
734                'help': '',
735                'is_i18n': False,
736                'readonly_layout_modes': (),
737                'hidden_layout_modes': (),
738                'hidden_readonly_layout_modes': (),
739                'hidden_empty': False,
740                'hidden_if_expr': '',
741                'css_class': '',
742                'widget_mode_expr': '',
743                'display_width': 10,
744                'size_max': 0,
745            },
746        },###)
747        'clearence_sc_value': { ###(
748            'type': 'Float Widget',
749            'data': {
750                'title': 'clearence SC Value',
751                'fields': ('clearence_sc_value',),
752                'is_required': False,
753                'label': 'Clearence SC Value',
754                'label_edit': 'Clearence SC Value',
755                'description': '',
756                'help': '',
757                'is_i18n': False,
758                'readonly_layout_modes': (),
759                'hidden_layout_modes': (),
760                'hidden_readonly_layout_modes': (),
761                'hidden_empty': False,
762                'hidden_if_expr': '',
763                'css_class': '',
764                'widget_mode_expr': '',
765                'display_width': 10,
766                'size_max': 0,
767            },
768        },###)
769        'clearence_date': { ###(
770            'type': 'DateTime Widget',
771            'data': {
772                'title': 'clearence SC Pin',
773                'fields': ('clearence_date',),
774                'is_required': False,
775                'label': 'Clearence SC Date',
776                'label_edit': 'Clearence SC Date',
777                'description': '',
778                'help': '',
779                'is_i18n': False,
780                'readonly_layout_modes': (),
781                'hidden_layout_modes': (),
782                'hidden_readonly_layout_modes': (),
783                'hidden_empty': False,
784                'hidden_if_expr': '',
785                'css_class': '',
786                'widget_mode_expr': '',
787                'display_width': 10,
788                'size_max': 0,
789            },
790        },###)
791    },
792    'layout': {
793        'style_prefix': 'layout_waeup_',
794        'flexible_widgets': (),
795        'ncols': 1,
796        'rows': [
797            [{'widget_id': 'adm_check_sc_id', 'ncols': 1},],
798            [{'widget_id': 'adm_check_sc_pin', 'ncols': 1},],
799            [{'widget_id': 'adm_check_sc_value', 'ncols': 1},],
800            [{'widget_id': 'adm_check_date', 'ncols': 1},],
801            [{'widget_id': 'clearence_sc_id', 'ncols': 1},],
802            [{'widget_id': 'clearence_sc_pin', 'ncols': 1},],
803            [{'widget_id': 'clearence_sc_value', 'ncols': 1},],
804            [{'widget_id': 'clearence_date', 'ncols': 1},],
805            [{'widget_id': 'accommodation', 'ncols': 1},],
806            [{'widget_id': 'accommodation_sc_id', 'ncols': 1},],
807            [{'widget_id': 'accommodation_sc_pin', 'ncols': 1},],
808            [{'widget_id': 'accommodation_sc_value', 'ncols': 1},],
809            [{'widget_id': 'accommodation_date', 'ncols': 1},],
810            [{'widget_id': 'hostel_fee_sc_id', 'ncols': 1},],
811            [{'widget_id': 'hostel_fee_sc_pin', 'ncols': 1},],
812            [{'widget_id': 'hostel_fee_sc_value', 'ncols': 1},],
813            [{'widget_id': 'hostel_fee_date', 'ncols': 1},],
814        ]
815    },
816}###)
817
818student_personal_layout = { ###(
819    'widgets': {
820        'firstname': firstname,
821        'middlename': middlename,
822        'lastname': lastname,
823        'sex': sex,
824        'birthday': {
825            'type': 'Date Widget',
826            'data': {
827                'title': '',
828                'fields': ('birthday',),
829                'is_required': False,
830                'label': 'Day of birth',
831                'label_edit': 'Day of birth',
832                'description': 'Day of birth',
833                'help': '',
834                'is_i18n': False,
835                'readonly_layout_modes': (),
836                'hidden_layout_modes': (),
837                'hidden_readonly_layout_modes': (),
838                'hidden_empty': False,
839                'hidden_if_expr': '',
840                'css_class': '',
841                'widget_mode_expr': '',
842                'display_width': 10,
843                'size_max': 0,
844            },
845        },
846    },
847    'layout': {
848        'style_prefix': 'layout_personal_',
849        'flexible_widgets': (),
850        'ncols': 1,
851        'rows': [
852            [{'widget_id': 'firstname', 'ncols': 1},],
853            [{'widget_id': 'middlename', 'ncols': 1},],
854            [{'widget_id': 'lastname', 'ncols': 1},],
855            [{'widget_id': 'sex', 'ncols': 1},],
856            [{'widget_id': 'birthday', 'ncols': 1},],
857        ]
858    },
859}###)
860
861student_documents = { ###(
862    'widgets': {
863        'photo': { ###(
864            'type': 'Photo Widget',
865            'data': {
866                'title': '',
867                'fields': ('photo',),
868                'is_required': True,
869                'label': 'Personal Picture',
870                'label_edit': 'Personal Picture',
871                'description': '',
872                'help': '',
873                'is_i18n': False,
874                'readonly_layout_modes': (),
875                'hidden_layout_modes': (),
876                'hidden_readonly_layout_modes': (),
877                'hidden_empty': False,
878                'hidden_if_expr': '',
879                'widget_mode_expr': '',
880                'css_class': '',
881                'css_class_expr': '',
882                'javascript_expr': '',
883                'deletable': True,
884                'size_max': 40960,
885                'display_width': 90,
886                'display_height': 180,
887                'allow_resize': True,
888                'render_position': 'left',
889                'configurable': 'nothing',
890                'keep_original': 1,
891            },
892        },###)
893        'birth_certificate': { ###(
894            'type': 'Image Widget',
895            'data': {
896                'title': '',
897                'fields': ('birth_certificate',),
898                'is_required': True,
899                'label': 'Birth Certificate',
900                'label_edit': 'Birth Certificate',
901                'description': '',
902                'help': '',
903                'is_i18n': False,
904                'readonly_layout_modes': (),
905                'hidden_layout_modes': (),
906                'hidden_readonly_layout_modes': (),
907                'hidden_empty': False,
908                'hidden_if_expr': '',
909                'widget_mode_expr': '',
910                'css_class': '',
911                'css_class_expr': '',
912                'javascript_expr': '',
913                'deletable': True,
914                'size_max': 40960,
915                'display_width': 300,
916                'display_height':600,
917                'allow_resize': True,
918            },
919        },###)
920        'passport': { ###(
921            'type': 'Image Widget',
922            'data': {
923                'title': '',
924                'fields': ('passport',),
925                'is_required': True,
926                'label': 'scanned Passport',
927                'label_edit': 'scanned Passport',
928                'description': '',
929                'help': '',
930                'is_i18n': False,
931                'readonly_layout_modes': (),
932                'hidden_layout_modes': (),
933                'hidden_readonly_layout_modes': (),
934                'hidden_empty': False,
935                'hidden_if_expr': '',
936                'widget_mode_expr': '',
937                'css_class': '',
938                'css_class_expr': '',
939                'javascript_expr': '',
940                'deletable': True,
941                'size_max': 40960,
942                'display_width': 300,
943                'display_height':600,
944                'allow_resize': True,
945            },
946        },###)
947        'results_first': { ###(
948            'type': 'Image Widget',
949            'data': {
950                'title': '',
951                'fields': ('results_first',),
952                'is_required': True,
953                'label': '1st Sitting Results',
954                'label_edit': '1st Sitting Results',
955                'description': '',
956                'help': '',
957                'is_i18n': False,
958                'readonly_layout_modes': (),
959                'hidden_layout_modes': (),
960                'hidden_readonly_layout_modes': (),
961                'hidden_empty': False,
962                'hidden_if_expr': '',
963                'widget_mode_expr': '',
964                'css_class': '',
965                'css_class_expr': '',
966                'javascript_expr': '',
967                'deletable': True,
968                'size_max': 40960,
969                'display_width': 300,
970                'display_height':600,
971                'allow_resize': True,
972            },
973        },###)
974        'results_second': { ###(
975            'type': 'Image Widget',
976            'data': {
977                'title': '',
978                'fields': ('results_second',),
979                'is_required': False,
980                'label': '2nd Sitting Results',
981                'label_edit': '2nd Sitting Results',
982                'description': '',
983                'help': '',
984                'is_i18n': False,
985                'readonly_layout_modes': (),
986                'hidden_layout_modes': (),
987                'hidden_readonly_layout_modes': (),
988                'hidden_empty': False,
989                'hidden_if_expr': '',
990                'widget_mode_expr': '',
991                'css_class': '',
992                'css_class_expr': '',
993                'javascript_expr': '',
994                'deletable': True,
995                'size_max': 40960,
996                'display_width': 300,
997                'display_height':600,
998                'allow_resize': True,
999            },
1000        },###)
1001    },
1002    'layout': {
1003        'style_prefix': 'layout_personal_',
1004        'flexible_widgets': (),
1005        'ncols': 1,
1006        'rows': [
1007            [{'widget_id': 'photo', 'ncols': 1},],
1008            [{'widget_id': 'birth_certificate', 'ncols': 1},],
1009            [{'widget_id': 'passport', 'ncols': 1},],
1010            [{'widget_id': 'results_first', 'ncols': 1},],
1011            [{'widget_id': 'results_second', 'ncols': 1},],
1012        ]
1013    },
1014}
1015
1016###)
1017
1018student_eligibility = { ###(
1019    'widgets': {
1020        'firstname': firstname,
1021        'middlename': middlename,
1022        'lastname': lastname,
1023        'sex': sex,
1024        'email': email,
1025        'pw': pw,
1026        'rpw': rpw,
1027    },
1028    'layout': {
1029        'style_prefix': 'layout_eligibility_',
1030        'flexible_widgets': (),
1031        'ncols': 1,
1032        'rows': [
1033            #[{'widget_id': 'firstname', 'ncols': 1},],
1034            #[{'widget_id': 'middlename', 'ncols': 1},],
1035            #[{'widget_id': 'lastname', 'ncols': 1},],
1036            #[{'widget_id': 'sex', 'ncols': 1},],
1037            [{'widget_id': 'email', 'ncols': 1},],
1038            [{'widget_id': 'pw', 'ncols': 1},],
1039            [{'widget_id': 'rpw', 'ncols': 1},],
1040        ]
1041    },
1042}
1043###)
1044
1045scratch_card = { ###(
1046    'widgets': {
1047        'sc_id': {
1048            'type': 'String Widget',
1049            'data': {
1050                'title': 'SC ID',
1051                'fields': ('sc_id',),
1052                'is_required': True,
1053                'label': 'Scratch card ID',
1054                'label_edit': 'Scratch card ID',
1055                'description': '',
1056                'help': '',
1057                'is_i18n': False,
1058                'readonly_layout_modes': (),
1059                'hidden_layout_modes': (),
1060                'hidden_readonly_layout_modes': (),
1061                'hidden_empty': False,
1062                'hidden_if_expr': '',
1063                'css_class': '',
1064                'widget_mode_expr': '',
1065                'display_width': 10,
1066                'size_max': 0,
1067            },
1068        },
1069        'sc_pin': {
1070            'type': 'Scratchcard Pin Widget',
1071            'data': {
1072                'title': 'SC Pin',
1073                'fields': ('sc_pin'),
1074                'is_required': True,
1075                'label': 'Scratchcard Pin',
1076                'label_edit': 'Scratchcard Pin',
1077                'description': '',
1078                'help': 'Please enter a valid Scratch card pin',
1079                'is_i18n': False,
1080                'readonly_layout_modes': (),
1081                'hidden_layout_modes': (),
1082                'hidden_readonly_layout_modes': (),
1083                'hidden_empty': False,
1084                'hidden_if_expr': '',
1085                'css_class': '',
1086                'widget_mode_expr': '',
1087                'display_width': 10,
1088                'size_max': 10,
1089            },
1090        },
1091    },
1092   'layout': {
1093        'style_prefix': 'layout_waeup_',
1094        'flexible_widgets': (),
1095        'ncols': 1,
1096        'rows': [
1097            [{'widget_id': 'reg_nr', 'ncols': 1},],
1098            [{'widget_id': 'sc_pin', 'ncols': 1},],
1099        ]
1100    },
1101}
1102###)
1103
1104jamb_id = { ###(
1105           'type': 'StudentId Widget',
1106           'data': {
1107                'title': 'Registration Number',
1108                'fields': ('reg_nr'),
1109                'is_required': True,
1110                'label': 'Registration Number',
1111                'label_edit': 'Registration Number',
1112                'description': '',
1113                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
1114                'is_i18n': False,
1115                'readonly_layout_modes': (),
1116                'hidden_layout_modes': (),
1117                'hidden_readonly_layout_modes': (),
1118                'hidden_empty': False,
1119                'hidden_if_expr': '',
1120                'css_class': '',
1121                'widget_mode_expr': '',
1122                'display_width': 10,
1123                'size_max': 10,
1124                 },
1125           }
1126
1127###)
1128
1129admission = { ###(
1130    'widgets': {
1131        'sc_id': {
1132            'type': 'String Widget',
1133            'data': {
1134                'title': 'SC ID',
1135                'fields': ('sc_id',),
1136                'is_required': False,
1137                'label': 'Card Serial Number ',
1138                'label_edit': 'Card Serial Number',
1139                'description': 'Card Serial Number ',
1140                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
1141                'is_i18n': False,
1142                'readonly_layout_modes': (),
1143                'hidden_layout_modes': (),
1144                'hidden_readonly_layout_modes': (),
1145                'hidden_empty': False,
1146                'hidden_if_expr': '',
1147                'css_class': '',
1148                'widget_mode_expr': '',
1149                'display_width': 10,
1150                'size_max': 0,
1151            },
1152        },
1153        'sc_value': { ###(
1154         'type': 'Float Widget',
1155         'data': {
1156                'title': 'Scratch card value',
1157                'fields': ('sc_value',),
1158                'is_required': False,
1159                'label': 'SC Value',
1160                'label_edit': 'Scratcard Value',
1161                'description': '',
1162                'help': '',
1163                'is_i18n': False,
1164                'readonly_layout_modes': ('create'),
1165                'hidden_layout_modes': (),
1166                'hidden_readonly_layout_modes': (),
1167                'hidden_empty': False,
1168                'hidden_if_expr': '',
1169                'css_class': '',
1170                'widget_mode_expr': '',
1171                'display_width': 10,
1172                'size_max': 10,
1173            },
1174        },###)
1175        'sc_pin': {
1176            'type': 'Scratchcard Pin Widget',
1177            'data': {
1178                'title': 'SC Pin',
1179                'fields': ('sc_pin'),
1180                'is_required': True,
1181                'label': 'PIN',
1182                'label_edit': 'PIN',
1183                'description': '',
1184                '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',
1185                'is_i18n': False,
1186                'readonly_layout_modes': (),
1187                'hidden_layout_modes': (),
1188                'hidden_readonly_layout_modes': (),
1189                'hidden_empty': False,
1190                'hidden_if_expr': '',
1191                'css_class': '',
1192                'widget_mode_expr': '',
1193                'display_width': 10,
1194                'size_max': 10,
1195            },
1196        },
1197        'jamb_id' : jamb_id,
1198    },
1199   'layout': {
1200        'style_prefix': 'layout_sc_',
1201        'flexible_widgets': (),
1202        'ncols': 1,
1203        'rows': [
1204            #[{'widget_id': 'sc_id', 'ncols': 1},],
1205            [{'widget_id': 'sc_value', 'ncols': 1},],
1206            [{'widget_id': 'sc_pin', 'ncols': 1},],
1207            [{'widget_id': 'jamb_id', 'ncols': 1},],
1208        ]
1209    },
1210}
1211###)
1212
1213clearence = { ###(
1214    'widgets': {
1215        'sc_id': {
1216            'type': 'String Widget',
1217            'data': {
1218                'title': 'SC ID',
1219                'fields': ('sc_id',),
1220                'is_required': False,
1221                'label': 'Card Serial Number ',
1222                'label_edit': 'Card Serial Number',
1223                'description': 'Card Serial Number ',
1224                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
1225                'is_i18n': False,
1226                'readonly_layout_modes': (),
1227                'hidden_layout_modes': (),
1228                'hidden_readonly_layout_modes': (),
1229                'hidden_empty': False,
1230                'hidden_if_expr': 'python:1',
1231                'css_class': '',
1232                'widget_mode_expr': '',
1233                'display_width': 10,
1234                'size_max': 0,
1235            },
1236        },
1237        'sc_pin': {
1238            'type': 'Scratchcard Pin Widget',
1239            'data': {
1240                'title': 'SC Pin',
1241                'fields': ('sc_pin'),
1242                'is_required': True,
1243                'label': 'PIN',
1244                'label_edit': 'PIN',
1245                'description': '',
1246                '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',
1247                'is_i18n': False,
1248                'readonly_layout_modes': (),
1249                'hidden_layout_modes': (),
1250                'hidden_readonly_layout_modes': (),
1251                'hidden_empty': False,
1252                'hidden_if_expr': '',
1253                'css_class': '',
1254                'widget_mode_expr': '',
1255                'display_width': 10,
1256                'size_max': 10,
1257            },
1258        },
1259        'sc_value': { ###(
1260         'type': 'Float Widget',
1261         'data': {
1262                'title': 'Scratch card value',
1263                'fields': ('sc_value',),
1264                'is_required': False,
1265                'label': 'SC Value',
1266                'label_edit': 'Scratcard Value',
1267                'description': '',
1268                'help': '',
1269                'is_i18n': False,
1270                'readonly_layout_modes': ('create'),
1271                'hidden_layout_modes': (),
1272                'hidden_readonly_layout_modes': (),
1273                'hidden_empty': False,
1274                'hidden_if_expr': '',
1275                'css_class': '',
1276                'widget_mode_expr': '',
1277                'display_width': 10,
1278                'size_max': 10,
1279            },
1280        },###)
1281        'lastname': { ###(
1282         'type': 'String Widget',
1283         'data': {
1284                'title': 'Scratch card value',
1285                'fields': ('lastname',),
1286                'is_required': False,
1287                'label': 'Surname',
1288                'label_edit': 'Surname',
1289                'description': '',
1290                'help': '',
1291                'is_i18n': False,
1292                'readonly_layout_modes': ('create'),
1293                'hidden_layout_modes': (),
1294                'hidden_readonly_layout_modes': (),
1295                'hidden_empty': False,
1296                'hidden_if_expr': '',
1297                'css_class': '',
1298                'widget_mode_expr': '',
1299                'display_width': 10,
1300                'size_max': 10,
1301            },
1302        },###)
1303        'jamb_id' : jamb_id,
1304    },
1305   'layout': {
1306        'style_prefix': 'layout_sc_',
1307        'flexible_widgets': (),
1308        'ncols': 1,
1309        'rows': [
1310            #[{'widget_id': 'sc_id', 'ncols': 1},],
1311            [{'widget_id': 'sc_value', 'ncols': 1},],
1312            [{'widget_id': 'sc_pin', 'ncols': 1},],
1313            [{'widget_id': 'jamb_id', 'ncols': 1},],
1314            #[{'widget_id': 'lastname', 'ncols': 1},],
1315        ]
1316    },
1317}
1318###)
1319
1320admission_status = { ###(
1321    'widgets': {
1322       'quick_search': {
1323            'type': 'String Widget',
1324            'data': {
1325                'title': 'A search string',
1326                'fields': ('admission_sc_id',),
1327                'is_required': False,
1328                'label': 'Quick Search',
1329                'label_edit': 'Quick Search',
1330                'description': 'Search',
1331                'help': '',
1332                'is_i18n': False,
1333                'readonly_layout_modes': (),
1334                'hidden_layout_modes': (),
1335                'hidden_readonly_layout_modes': (),
1336                'hidden_empty': False,
1337                'hidden_if_expr': 'python:0',
1338                'css_class': '',
1339                'widget_mode_expr': '',
1340                'display_width': 20,
1341                'size_max': 0,
1342            },
1343        },
1344
1345    },
1346   'layout': {
1347        'style_prefix': 'layout_admission_status_',
1348        'flexible_widgets': (),
1349        'ncols': 2,
1350        'rows': [
1351            [{'widget_id': 'quick_search', 'ncols': 2},],
1352        ]
1353    },
1354}
1355###)
1356
1357jamb_widgets = { ###(
1358        'reg_nr': {
1359            'type': 'StudentId Widget',
1360            'data': {
1361                'title': 'registration nr',
1362                'fields': ('reg_nr',),
1363                'is_required': True,
1364                'label': 'Registration Nr',
1365                'label_edit': 'Registration Nr',
1366                'description': 'The student id from JAMB',
1367                'help': 'The student id from JAMB',
1368                'is_i18n': False,
1369                'display_width': 10,
1370                'size_max': 10,
1371            },
1372        },
1373        'firstname': firstname,
1374        'middlename': middlename,
1375        'lastname': lastname,
1376        'age': {
1377            'type': 'Int Widget',
1378            'data': {
1379                'title': '',
1380                'fields': ('age',),
1381                'is_required': False,
1382                'label': 'Age',
1383                'label_edit': 'Age',
1384                'description': '',
1385                'help': '',
1386                'is_i18n': False,
1387                'readonly_layout_modes': (),
1388                'hidden_layout_modes': (),
1389                'hidden_readonly_layout_modes': (),
1390                'hidden_empty': False,
1391                'hidden_if_expr': '',
1392                'css_class': '',
1393                'widget_mode_expr': '',
1394                'display_width': 2,
1395                'size_max': 2,
1396            },
1397        },
1398        'sex': sex,
1399        'state': {
1400            'type': 'Select Widget',
1401            'data': {
1402                'title': '',
1403                'fields': ('state',),
1404                'is_required': False,
1405                'label': 'State of Origin',
1406                'label_edit': 'State of Origin',
1407                'description': '',
1408                'help': '',
1409                'is_i18n': False,
1410                'vocabulary': 'nigerian_states',
1411            },
1412        },
1413        'exam_results': {
1414            'type': 'String Widget',
1415            'data': {
1416                'title': '',
1417                'fields': ('exam_results',),
1418                'is_required': False,
1419                'label': 'JAMB Results',
1420                'label_edit': 'JAMB Results',
1421                'description': '',
1422                'help': '',
1423                'is_i18n': False,
1424                'readonly_layout_modes': (),
1425                'hidden_layout_modes': (),
1426                'hidden_readonly_layout_modes': (),
1427                'hidden_empty': False,
1428                'hidden_if_expr': '',
1429                'css_class': '',
1430                'widget_mode_expr': '',
1431                'display_width': 20,
1432                'size_max': 0,
1433            },
1434        },
1435        'aggregate': {
1436            'type': 'Int Widget',
1437            'data': {
1438                'title': 'Agregate',
1439                'fields': ('aggregate',),
1440                'is_required': False,
1441                'label': 'Score',
1442                'label_edit': 'Score',
1443                'description': '',
1444                'help': '',
1445                'is_i18n': False,
1446            },
1447        },
1448        'faculty': {
1449            'type': 'Select Widget',
1450            'data': {
1451                'title': 'Faculty',
1452                'fields': ('faculty',),
1453                'is_required': True,
1454                'label': 'Faculty',
1455                'label_edit': 'Faculty',
1456                'description': '',
1457                'help': '',
1458                'is_i18n': False,
1459                'vocabulary': 'faculties',
1460            },
1461        },
1462        'course': {
1463            'type': 'String Widget',
1464            'data': {
1465                'title': 'Study Course',
1466                'fields': ('course',),
1467                'is_required': True,
1468                'label': 'Study Course',
1469                'label_edit': 'Study Course',
1470                'description': '',
1471                'help': 'The course to study',
1472                'is_i18n': False,
1473            },
1474        },
1475        'listing_date': {
1476            'type': 'Date Widget',
1477            'data': {
1478                'title': 'Listing Date',
1479                'fields': ('listing_date',),
1480                'is_required': False,
1481                'label': 'Listing Date',
1482                'label_edit': 'Listing Date',
1483                'description': '',
1484                'help': '',
1485                'is_i18n': False,
1486                'readonly_layout_modes': (),
1487                'hidden_layout_modes': (),
1488                'hidden_readonly_layout_modes': (),
1489                'hidden_empty': False,
1490                'hidden_if_expr': '',
1491                'css_class': '',
1492                'widget_mode_expr': '',
1493                'display_width': 3,
1494                'size_max': 0,
1495            },
1496        },
1497##        '2nd_choice': { ###(
1498##            'type': 'String Widget',
1499##            'data': {
1500##                'title': 'Second choice',
1501##                'fields': ('2nd_choice',),
1502##                'is_required': False,
1503##                'label': 'Second choice',
1504##                'label_edit': 'Second choice',
1505##                'description': '',
1506##                'help': 'second_choice',
1507##                'is_i18n': False,
1508##                'readonly_layout_modes': (),
1509##                'hidden_layout_modes': (),
1510##                'hidden_readonly_layout_modes': (),
1511##                'hidden_empty': False,
1512##                'hidden_if_expr': '',
1513##                'css_class': '',
1514##                'widget_mode_expr': '',
1515##                'display_width': 20,
1516##                'size_max': 0,
1517##            },
1518##        },
1519##
1520##        '3rd_choice': {
1521##            'type': 'String Widget',
1522##            'data': {
1523##                'title': 'Third_choice',
1524##                'fields': ('3rd_choice',),
1525##                'is_required': False,
1526##                'label': 'Third choice',
1527##                'label_edit': 'Third choice',
1528##                'description': 'third_choice',
1529##                'help': 'third_choice',
1530##                'is_i18n': False,
1531##                'readonly_layout_modes': (),
1532##                'hidden_layout_modes': (),
1533##                'hidden_readonly_layout_modes': (),
1534##                'hidden_empty': False,
1535##                'hidden_if_expr': '',
1536##                'css_class': '',
1537##                'widget_mode_expr': '',
1538##                'display_width': 20,
1539##                'size_max': 0,
1540##            },
1541##        },
1542###)
1543
1544        'sc_id': {
1545            'type': 'String Widget',
1546            'data': {
1547                'title': '',
1548                'fields': ('admission_sc_id',),
1549                'is_required': False,
1550                'label': 'Scratch card ID used',
1551                'label_edit': 'Scratch card ID used',
1552                'description': '',
1553                'help': '',
1554                'is_i18n': False,
1555                'readonly_layout_modes': (),
1556                'hidden_layout_modes': (),
1557                'hidden_readonly_layout_modes': (),
1558                'hidden_empty': False,
1559                'hidden_if_expr': '',
1560                'css_class': '',
1561                'widget_mode_expr': '',
1562                'display_width': 20,
1563                'size_max': 0,
1564            },
1565        },
1566        'sc_pin': {
1567            'type': 'String Widget',
1568            'data': {
1569                'title': '',
1570                'fields': ('admission_sc_pin',),
1571                'is_required': False,
1572                'label': 'Scratch Card PIN',
1573                'label_edit': 'Scratch Card PIN',
1574                'description': '',
1575                'help': '',
1576                'is_i18n': False,
1577                'readonly_layout_modes': (),
1578                'hidden_layout_modes': (),
1579                'hidden_readonly_layout_modes': (),
1580                'hidden_empty': False,
1581                'hidden_if_expr': '',
1582                'css_class': '',
1583                'widget_mode_expr': '',
1584                'display_width': 20,
1585                'size_max': 0,
1586            },
1587        },
1588    }
1589###)
1590
1591jamb_layoutcreate = { ###(
1592    'widgets': jamb_widgets,
1593    'layout': {
1594        'style_prefix': 'layout_jambcreate_',
1595        'flexible_widgets': (),
1596        'ncols': 1,
1597        'rows': [
1598            [{'widget_id': 'reg_nr', 'ncols': 1},],
1599            [{'widget_id': 'firstname', 'ncols': 1},],
1600            [{'widget_id': 'middlename', 'ncols': 1},],
1601            [{'widget_id': 'lastname', 'ncols': 1},],
1602            #[{'widget_id': 'sc_id', 'ncols': 1},],
1603            #[{'widget_id': 'sc_pin', 'ncols': 1},],
1604            [{'widget_id': 'age', 'ncols': 1},],
1605            [{'widget_id': 'sex', 'ncols': 1},],
1606            [{'widget_id': 'state', 'ncols': 1},],
1607            #[{'widget_id': 'exam_results', 'ncols': 1},],
1608            [{'widget_id': 'aggregate', 'ncols': 1},],
1609            [{'widget_id': 'faculty', 'ncols': 1},],
1610            [{'widget_id': 'course', 'ncols': 1},],
1611            [{'widget_id': 'listing_date', 'ncols': 1},],
1612            #[{'widget_id': '2nd_choice', 'ncols': 1},],
1613            #[{'widget_id': '3rd_choice', 'ncols': 1},],
1614        ]
1615    },
1616}
1617###)
1618
1619jamb_layout = { ###(
1620    'widgets': jamb_widgets,
1621    'layout': {
1622        'style_prefix': 'layout_waeup_',
1623        'flexible_widgets': (),
1624        'ncols': 1,
1625        'rows': [
1626            [{'widget_id': 'reg_nr', 'ncols': 1},],
1627            [{'widget_id': 'firstname', 'ncols': 1},],
1628            [{'widget_id': 'middlename', 'ncols': 1},],
1629            [{'widget_id': 'lastname', 'ncols': 1},],
1630            #[{'widget_id': 'sc_id', 'ncols': 1},],
1631            [{'widget_id': 'sc_pin', 'ncols': 1},],
1632            [{'widget_id': 'age', 'ncols': 1},],
1633            [{'widget_id': 'sex', 'ncols': 1},],
1634            [{'widget_id': 'state', 'ncols': 1},],
1635            #[{'widget_id': 'exam_results', 'ncols': 1},],
1636            [{'widget_id': 'aggregate', 'ncols': 1},],
1637            [{'widget_id': 'faculty', 'ncols': 1},],
1638            [{'widget_id': 'course', 'ncols': 1},],
1639            [{'widget_id': 'listing_date', 'ncols': 1},],
1640            #[{'widget_id': '2nd_choice', 'ncols': 1},],
1641            #[{'widget_id': '3rd_choice', 'ncols': 1},],
1642        ]
1643    },
1644}
1645###)
1646
1647admission_slip = { ###(
1648    'widgets': jamb_widgets,
1649    'layout': {
1650        'style_prefix': 'layout_waeup_',
1651        'flexible_widgets': (),
1652        'ncols': 1,
1653        'rows': [
1654            [{'widget_id': 'reg_nr', 'ncols': 1},],
1655            [{'widget_id': 'firstname', 'ncols': 1},],
1656            [{'widget_id': 'middlename', 'ncols': 1},],
1657            [{'widget_id': 'lastname', 'ncols': 1},],
1658            #[{'widget_id': 'sc_id', 'ncols': 1},],
1659            #[{'widget_id': 'sc_pin', 'ncols': 1},],
1660            [{'widget_id': 'age', 'ncols': 1},],
1661            [{'widget_id': 'sex', 'ncols': 1},],
1662            [{'widget_id': 'state', 'ncols': 1},],
1663            #[{'widget_id': 'exam_results', 'ncols': 1},],
1664            [{'widget_id': 'aggregate', 'ncols': 1},],
1665            [{'widget_id': 'faculty', 'ncols': 1},],
1666            [{'widget_id': 'course', 'ncols': 1},],
1667            [{'widget_id': 'listing_date', 'ncols': 1},],
1668            #[{'widget_id': '2nd_choice', 'ncols': 1},],
1669            #[{'widget_id': '3rd_choice', 'ncols': 1},],
1670        ]
1671    },
1672}
1673###)
1674
1675course = { ###(
1676    'widgets': {
1677        'heading': {
1678         'type': 'String Widget',
1679         'data': {
1680                'fields': ['heading'],
1681                'is_i18n': 0,
1682                'is_required': 1,
1683                'label': 'Title',
1684                'label_edit': 'Title',
1685                'help': 'Course Title',
1686                'display_width': 40,
1687                'size_max': 40,
1688            },
1689        },
1690        'text': Text,
1691        'level': {
1692            'type': 'Select Widget',
1693            'data': {
1694                'title': '',
1695                'fields': ('level',),
1696                'is_required': True,
1697                'label': 'Level',
1698                'label_edit': 'Level',
1699                'description': '',
1700                'help': '',
1701                'is_i18n': False,
1702                'vocabulary': 'courselevel',
1703            },
1704        },
1705        'code': {
1706            'type': 'String Widget',
1707            'data': {
1708                'title': 'Code',
1709                'fields': ('code',),
1710                'is_required': True,
1711                'label': 'Code',
1712                'label_edit': 'Code',
1713                'description': '',
1714                'help': '',
1715                'is_i18n': False,
1716                'display_width': 10,
1717                'size_max': 0,
1718            },
1719        },
1720        'semester': {
1721            'type': 'Boolean Widget',
1722            'data': {
1723                'title': '',
1724                'fields': ('semester',),
1725                'is_required': True,
1726                'label': 'Semester',
1727                'label_edit': 'Semester',
1728                'label_false': 'Second Semester',
1729                'label_true': 'First Semester',
1730                'description': '',
1731                'help': '',
1732                'is_i18n': False,
1733                'display_width': 10,
1734                'size_max': 0,
1735            },
1736        },
1737        'credit': {
1738            'type': 'Int Widget',
1739            'data': {
1740                'title': '',
1741                'fields': ('credit',),
1742                'is_required': True,
1743                'label': 'Credit',
1744                'label_edit': 'Credit',
1745                'description': '',
1746                'help': '',
1747                'is_i18n': False,
1748                'display_width': 2,
1749                'size_max': 0,
1750            },
1751        },
1752        'core_elective': {
1753            'type': 'Boolean Widget',
1754            'data': {
1755                'title': '',
1756                'fields': ('core_elective',),
1757                'is_required': True,
1758                'label': 'Core or elective',
1759                'label_edit': 'Core or elective',
1760                'label_true': 'Core Course',
1761                'label_false': 'Elective Course',
1762                'description': '',
1763                'help': '',
1764                'is_i18n': False,
1765                'display_width': 10,
1766                'size_max': 0,
1767            },
1768        },
1769    },
1770   'layout': {
1771        'style_prefix': 'layout_waeup_',
1772        'flexible_widgets': (),
1773        'ncols': 1,
1774        'rows': [
1775            [{'widget_id': 'heading', 'ncols': 1},],
1776            #[{'widget_id': 'Title', 'ncols': 1},],
1777            [{'widget_id': 'text', 'ncols': 1},],
1778            [{'widget_id': 'level', 'ncols': 1},],
1779            [{'widget_id': 'code', 'ncols': 1},],
1780            [{'widget_id': 'semester', 'ncols': 1},],
1781            [{'widget_id': 'credit', 'ncols': 1},],
1782            [{'widget_id': 'core_elective', 'ncols': 1},],
1783        ]
1784    },
1785}
1786###)
1787
1788course_results = { ###(
1789    'widgets': {
1790        'points': {
1791            'type': 'Int Widget',
1792            'data': {
1793                'title': '',
1794                'fields': ('points',),
1795                'is_required': False,
1796                'label': 'Points',
1797                'label_edit': 'Points',
1798                'description': '',
1799                'help': '',
1800                'is_i18n': False,
1801                'readonly_layout_modes': (),
1802                'hidden_layout_modes': (),
1803                'hidden_readonly_layout_modes': (),
1804                'hidden_empty': False,
1805                'hidden_if_expr': '',
1806                'css_class': '',
1807                'widget_mode_expr': '',
1808                'display_width': 3,
1809                'size_max': 3,
1810            },
1811        },
1812        'grade': {
1813            'type': 'String Widget',
1814            'data': {
1815                'title': '',
1816                'fields': ('grade'),
1817                'is_required': False,
1818                'label': 'Grade',
1819                'label_edit': 'Grade',
1820                'description': '',
1821                'help': '',
1822                'is_i18n': False,
1823                'readonly_layout_modes': (),
1824                'hidden_layout_modes': (),
1825                'hidden_readonly_layout_modes': (),
1826                'hidden_empty': False,
1827                'hidden_if_expr': '',
1828                'css_class': '',
1829                'widget_mode_expr': '',
1830                'display_width': 2,
1831                'size_max': 1,
1832            },
1833        },
1834    },
1835   'layout': {
1836        'style_prefix': 'layout_waeup_',
1837        'flexible_widgets': (),
1838        'ncols': 1,
1839        'rows': [
1840            [{'widget_id': 'points', 'ncols': 1},],
1841            [{'widget_id': 'grade', 'ncols': 1},],
1842        ]
1843    },
1844}
1845###)
1846
1847accommodation = { ###(
1848    'widgets': {
1849        'heading': {
1850         'type': 'String Widget',
1851         'data': {
1852                'fields': ['heading'],
1853                'level': 2,
1854                'is_i18n': 0,
1855                'is_required': 1,
1856                'label': 'Hall Name',
1857                'label_edit': 'Hall Name',
1858                'help': '',
1859                'display_width': 40,
1860                'size_max': 40,
1861            },
1862        },
1863        'text': Text,
1864        'which_sex': {
1865            'type': 'Boolean Widget',
1866            'data': {
1867                'title': '',
1868                'fields': ('which_sex',),
1869                'is_required': False,
1870                'label': 'Sex',
1871                'label_edit': 'Sex',
1872                'label_false': 'male',
1873                'label_true': 'female',
1874                'description': '',
1875                'help': '',
1876                'is_i18n': False,
1877            },
1878        },
1879        'nr_of_blocks': {
1880            'type': 'Select Widget',
1881            'data': {
1882                'title': '',
1883                'fields': ('nr_of_blocks',),
1884                'is_required': True,
1885                'label': 'Nr of Blocks',
1886                'label_edit': 'Nr of Blocks',
1887                'description': '',
1888                'help': 'Number of blocks',
1889                'is_i18n': False,
1890                'vocabulary': 'range10',
1891            },
1892        },
1893        'nr_of_floors': {
1894            'type': 'Select Widget',
1895            'data': {
1896                'title': '',
1897                'fields': ('nr_of_floors',),
1898                'is_required': True,
1899                'label': 'Nr of Floors ',
1900                'label_edit': 'Nr of Floors',
1901                'description': '',
1902                'help': 'Number of floors per block',
1903                'is_i18n': False,
1904                'vocabulary': 'range5',
1905            },
1906        },
1907        'rooms_per_floor': {
1908            'type': 'Select Widget',
1909            'data': {
1910                'title': '',
1911                'fields': ('rooms_per_floor',),
1912                'is_required': True,
1913                'label': 'Rooms per Floor',
1914                'label_edit': 'Rooms per Floor',
1915                'description': '',
1916                'help': 'Number of rooms per floor',
1917                'is_i18n': False,
1918                'vocabulary': 'range50',
1919            },
1920        },
1921        'beds_per_room': {
1922            'type': 'Select Widget',
1923            'data': {
1924                'title': '',
1925                'fields': ('beds_per_room',),
1926                'is_required': True,
1927                'label': 'Beds per Room',
1928                'label_edit': 'Beds per Room',
1929                'description': '',
1930                'help': 'Number of beds per room',
1931                'is_i18n': False,
1932                'vocabulary': 'range10',
1933            },
1934        },
1935        'beds_assigned': {
1936            'type': 'Int Widget',
1937            'data': {
1938                'title': '',
1939                'fields': ('beds_assigned',),
1940                'is_required': True,
1941                'label': 'Assigned Beds',
1942                'label_edit': 'Assigned Beds',
1943                'description': '',
1944                'help': 'Number of beds already assined to students',
1945                'is_i18n': False,
1946            },
1947        },
1948    },
1949   'layout': {
1950        'style_prefix': 'layout_waeup_',
1951        'flexible_widgets': (),
1952        'ncols': 1,
1953        'rows': [
1954            [{'widget_id': 'heading', 'ncols': 1},],
1955            #[{'widget_id': 'Title', 'ncols': 1},],
1956            [{'widget_id': 'text', 'ncols': 1},],
1957            [{'widget_id': 'which_sex', 'ncols': 1},],
1958            [{'widget_id': 'nr_of_blocks', 'ncols': 1},],
1959            [{'widget_id': 'nr_of_floors', 'ncols': 1},],
1960            [{'widget_id': 'rooms_per_floor', 'ncols': 1},],
1961            [{'widget_id': 'beds_per_room', 'ncols': 1},],
1962            [{'widget_id': 'beds_assigned', 'ncols': 1},],
1963        ]
1964    },
1965}
1966###)
1967
1968study_level = { ###(
1969    'widgets': {
1970      'sc_id': { ###(
1971        'type': 'String Widget',
1972        'data': {
1973                'title': 'SC ID',
1974                'fields': ('sc_id'),
1975                'is_required': False,
1976                'label': 'Card Serial Number ',
1977                'label_edit': 'Card Serial Number',
1978                'description': 'Card Serial Number ',
1979                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
1980                'is_i18n': False,
1981                'readonly_layout_modes': (),
1982                'hidden_layout_modes': (),
1983                'hidden_readonly_layout_modes': (),
1984                'hidden_empty': False,
1985                'hidden_if_expr': 'python:1',
1986                'css_class': '',
1987                'widget_mode_expr': '',
1988                'display_width': 10,
1989                'size_max': 0,
1990            }
1991        },###)
1992      'sc_pin': { ###(
1993         'type': 'Scratchcard Pin Widget',
1994         'data': {
1995                'title': 'SC Pin',
1996                'fields': ('sc_pin'),
1997                'is_required': True,
1998                'label': 'enter  PIN',
1999                'label_edit': 'enter Scratchcard PIN with the value above',
2000                'description': '',
2001                'help': 'Please enter a Scratchcard PIN valid for Registration of next level',
2002                'is_i18n': False,
2003                'readonly_layout_modes': (),
2004                'hidden_layout_modes': (),
2005                'hidden_readonly_layout_modes': (),
2006                'hidden_empty': False,
2007                'hidden_if_expr': '',
2008                'css_class': '',
2009                'widget_mode_expr': '',
2010                'display_width': 10,
2011                'size_max': 10,
2012            },
2013        },###)
2014      'sc_value': { ###(
2015         'type': 'Float Widget',
2016         'data': {
2017                'title': 'Scratch card value',
2018                'fields': ('sc_value',),
2019                'is_required': False,
2020                'label': 'Scratcard Value',
2021                'label_edit': 'Scratcard Value',
2022                'description': '',
2023                'help': '',
2024                'is_i18n': False,
2025                'readonly_layout_modes': ('create'),
2026                'hidden_layout_modes': (),
2027                'hidden_readonly_layout_modes': (),
2028                'hidden_empty': False,
2029                'hidden_if_expr': '',
2030                'css_class': '',
2031                'widget_mode_expr': '',
2032                'display_width': 10,
2033                'size_max': 10,
2034            },
2035        },###)
2036               },
2037   'layout': {
2038        'style_prefix': 'layout_slregister_',
2039        'flexible_widgets': (),
2040        'ncols': 1,
2041        'rows': [
2042            #[{'widget_id': 'sc_id', 'ncols': 1},],
2043            [{'widget_id': 'sc_value', 'ncols': 1},],
2044            [{'widget_id': 'sc_pin', 'ncols': 1},],
2045        ]
2046    },
2047}###)
2048
2049accobook = { ###(
2050    'widgets': {
2051     'sc_id': { ###(
2052        'type': 'String Widget',
2053        'data': {
2054                'title': 'SC ID',
2055                'fields': ('sc_id'),
2056                'is_required': False,
2057                'label': 'Card Serial Number ',
2058                'label_edit': 'Card Serial Number',
2059                'description': 'Card Serial Number ',
2060                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
2061                'is_i18n': False,
2062                'readonly_layout_modes': (),
2063                'hidden_layout_modes': (),
2064                'hidden_readonly_layout_modes': (),
2065                'hidden_empty': False,
2066                'hidden_if_expr': 'python:1',
2067                'css_class': '',
2068                'widget_mode_expr': '',
2069                'display_width': 10,
2070                'size_max': 0,
2071            }
2072        },###)
2073    'sc_pin': { ###(
2074         'type': 'Scratchcard Pin Widget',
2075         'data': {
2076                'title': 'SC Pin',
2077                'fields': ('sc_pin'),
2078                'is_required': True,
2079                'label': 'enter  PIN',
2080                'label_edit': 'enter an Accommodation PIN',
2081                'description': '',
2082                'help': 'Please enter a PIN valid for Accomodation booking',
2083                'is_i18n': False,
2084                'readonly_layout_modes': (),
2085                'hidden_layout_modes': (),
2086                'hidden_readonly_layout_modes': (),
2087                'hidden_empty': False,
2088                'hidden_if_expr': '',
2089                'css_class': '',
2090                'widget_mode_expr': '',
2091                'display_width': 10,
2092                'size_max': 10,
2093            },
2094        },###)
2095    'sc_value': { ###(
2096         'type': 'Float Widget',
2097         'data': {
2098                'title': 'Scratch card value',
2099                'fields': ('sc_value',),
2100                'is_required': False,
2101                'label': 'SC Value',
2102                'label_edit': 'Scratcard Value',
2103                'description': '',
2104                'help': '',
2105                'is_i18n': False,
2106                'readonly_layout_modes': ('create'),
2107                'hidden_layout_modes': (),
2108                'hidden_readonly_layout_modes': (),
2109                'hidden_empty': False,
2110                'hidden_if_expr': '',
2111                'css_class': '',
2112                'widget_mode_expr': '',
2113                'display_width': 10,
2114                'size_max': 10,
2115            },
2116        },###)
2117               },
2118   'layout': {
2119        'style_prefix': 'layout_sc_',
2120        'flexible_widgets': (),
2121        'ncols': 1,
2122        'rows': [
2123            #[{'widget_id': 'sc_id', 'ncols': 1},],
2124            [{'widget_id': 'sc_value', 'ncols': 1},],
2125            [{'widget_id': 'sc_pin', 'ncols': 1},],
2126        ]
2127    },
2128}
2129###)
2130
2131accopay = { ###(
2132    'widgets': {
2133     'sc_id': { ###(
2134        'type': 'String Widget',
2135        'data': {
2136                'title': 'SC ID',
2137                'fields': ('sc_id'),
2138                'is_required': False,
2139                'label': 'Card Serial Number ',
2140                'label_edit': 'Card Serial Number',
2141                'description': 'Card Serial Number ',
2142                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
2143                'is_i18n': False,
2144                'readonly_layout_modes': (),
2145                'hidden_layout_modes': (),
2146                'hidden_readonly_layout_modes': (),
2147                'hidden_empty': False,
2148                'hidden_if_expr': 'python:1',
2149                'css_class': '',
2150                'widget_mode_expr': '',
2151                'display_width': 10,
2152                'size_max': 0,
2153            }
2154        },###)
2155    'sc_pin': { ###(
2156         'type': 'Scratchcard Pin Widget',
2157         'data': {
2158                'title': 'SC Pin',
2159                'fields': ('sc_pin'),
2160                'is_required': True,
2161                'label': 'enter  PIN',
2162                'label_edit': 'enter an Hostel payment PIN',
2163                'description': '',
2164                'help': 'Please enter a PIN valid for paying hostel fee',
2165                'is_i18n': False,
2166                'readonly_layout_modes': (),
2167                'hidden_layout_modes': (),
2168                'hidden_readonly_layout_modes': (),
2169                'hidden_empty': False,
2170                'hidden_if_expr': '',
2171                'css_class': '',
2172                'widget_mode_expr': '',
2173                'display_width': 10,
2174                'size_max': 10,
2175            },
2176        },###)
2177    'sc_value': { ###(
2178         'type': 'Float Widget',
2179         'data': {
2180                'title': 'Scratch card value',
2181                'fields': ('sc_value',),
2182                'is_required': False,
2183                'label': 'SC Value',
2184                'label_edit': 'Scratcard Value',
2185                'description': '',
2186                'help': '',
2187                'is_i18n': False,
2188                'readonly_layout_modes': ('create'),
2189                'hidden_layout_modes': (),
2190                'hidden_readonly_layout_modes': (),
2191                'hidden_empty': False,
2192                'hidden_if_expr': '',
2193                'css_class': '',
2194                'widget_mode_expr': '',
2195                'display_width': 10,
2196                'size_max': 10,
2197            },
2198        },###)
2199               },
2200   'layout': {
2201        'style_prefix': 'layout_sc_',
2202        'flexible_widgets': (),
2203        'ncols': 1,
2204        'rows': [
2205            #[{'widget_id': 'sc_id', 'ncols': 1},],
2206            [{'widget_id': 'sc_value', 'ncols': 1},],
2207            [{'widget_id': 'sc_pin', 'ncols': 1},],
2208        ]
2209    },
2210}###)
2211
2212layouts = {}
2213layouts['university'] = common_layout
2214layouts['waeup_common'] = common_layout
2215layouts['student'] = student_layout
2216layouts['study_level'] = study_level
2217layouts['student_documents'] = student_documents
2218layouts['student_personal'] = student_personal_layout
2219layouts['student_eligibility'] = student_eligibility
2220layouts['accommodation'] = accommodation
2221layouts['accobook'] = accobook
2222layouts['accopay'] = accopay
2223layouts['scratch_card'] = scratch_card
2224layouts['admission'] = admission
2225layouts['clearence'] = clearence
2226layouts['admission_slip'] = admission_slip
2227layouts['jambcreate'] = jamb_layoutcreate
2228layouts['jamb'] = jamb_layout
2229layouts['faculty'] = common_layout
2230layouts['department'] = common_layout
2231layouts['course'] = course
2232layouts['admission_status'] = admission_status
2233return layouts
Note: See TracBrowser for help on using the repository browser.