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

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

minor modifications

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