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

Last change on this file since 100 was 96, checked in by joachim, 19 years ago

=adding and editing of several types

  • Property svn:keywords set to Id
File size: 30.1 KB
RevLine 
[47]1#-*- mode: python; mode: fold -*-
[19]2##parameters=
3# $Id: getWAeUPLayouts.py 96 2005-10-27 06:51:08Z joachim $
4"""Return custom layouts types."""
5
[47]6##    'widgets': { ###(
7##        '': {
8##            'type': 'String Widget',
9##            'data': {
10##                'title': '',
11##                'fields': ('',),
12##                'is_required': False,
13##                'label': '',
14##                'label_edit': '',
15##                'description': '',
16##                'help': '',
17##                'is_i18n': False,
18##                'readonly_layout_modes': (),
19##                'hidden_layout_modes': (),
20##                'hidden_readonly_layout_modes': (),
21##                'hidden_empty': False,
22##                'hidden_if_expr': '',
23##                'css_class': '',
24##                'widget_mode_expr': '',
25##                'display_width': 10,
26##                'size_max': 0,
27##            },
28
29###)
30
[96]31Heading = { ###(
32         'type': 'Heading Widget',
33         'data': {
34                'fields': ['heading'],
35                'level': 1,
36                'is_i18n': 0,
37                'is_required': 1,
38                'label_edit': 'Headline',
39                'help': 'a short headline',
40                'display_width': 40,
41                'size_max': 200,
42            },
43        }###)
44
45Text = { ###(
46            'type': 'Text Widget',
[45]47            'data': {
[96]48                'fields': ['text'],
49                'is_i18n': 1,
50                'label_edit': 'Text',
51                'label': 'Text',
52                'help': 'a short Description',
53                'css_class': 'description',
54                'width': 72,
55                'height': 5,
56                'render_format': 'text',
57                'hidden_layout_modes': (),
[45]58            },
[96]59        }###)
60
61Title = { ###(
62         'type': 'Heading Widget',
63         'data': {
[45]64                'fields': ['Title'],
65                'level': 1,
[96]66                'is_i18n': 0,
[45]67                'is_required': 1,
68                'label_edit': 'Name',
69                'display_width': 40,
70                'size_max': 200,
71            },
[96]72        }###)
73
74Description = { ###(
[45]75            'type': 'Text Widget',
76            'data': {
77                'fields': ['Description'],
78                'is_i18n': 1,
[96]79                'label_edit': 'Description',
80                'label': 'Description',
81                'css_class': 'description',
[45]82                'width': 72,
83                'height': 5,
84                'render_format': 'text',
[96]85                'hidden_layout_modes': (),
[45]86            },
[96]87        }###)
88
89common_layout = {###(
90    'widgets': {
91        'LanguageSelector': {
92            'type': 'Document Language Select Widget',
93            'data': {
94                'fields': ['Language'],
95            },
[45]96        },
[96]97        'Title': Title,
98        'Description': Description,
[45]99        'LanguageSelectorCreation': {
100            'type': 'Select Widget',
101            'data': {
102                'title': 'Language',
103                'fields': ('Language',),
104                'is_required': 0,
105                'label': 'label_language',
106                'label_edit': 'label_language',
107                'description': '',
108                'help': '',
109                'is_i18n': 0,
110                'readonly_layout_modes': (),
111                'hidden_layout_modes': ('create','edit', 'view'),
112                'hidden_readonly_layout_modes': (),
113                'hidden_empty': 0,
114                'hidden_if_expr': '',
115                'css_class': '',
116                'vocabulary': 'language_voc',
117            },
118        },
119    },
120    'layout': {
[84]121        'style_prefix': 'layout_waeup_',
[45]122        'rows': [
[84]123            #[{'widget_id': 'LanguageSelector'}],
[45]124            [{'widget_id': 'Title'},],
125            [{'widget_id': 'Description'},],
[84]126            #[{'widget_id': 'LanguageSelectorCreation'}],
[45]127            ],
128        },
129    }
130#
[47]131###)
132
133student_layout = { ###(
[19]134    'widgets': {
135        'jamb_is_admitted': {
136            'type': 'Boolean Widget',
137            'data': {
138                'title': 'Jamb Admission',
[49]139                'fields': ('jamb_is_admitted',),
[19]140                'is_required': False,
141                'label': 'Jamb Admission',
142                'label_edit': 'Jamb Admission',
143                'description': '',
144                'help': '',
145                'is_i18n': False,
146                'readonly_layout_modes': (),
147                'hidden_layout_modes': (),
148                'hidden_readonly_layout_modes': (),
149                'hidden_empty': False,
150                'hidden_if_expr': '',
151                'css_class': '',
152                'widget_mode_expr': '',
153                'display_width': 10,
154                'size_max': 0,
155            },
156        },
[49]157##        'jamb_where_admitted': {
158##            'type': 'String Widget',
159##            'data': {
160##                'title': 'Jamb Admission Location',
161##                'fields': ('jamb_where_admitted',),
162##                'is_required': False,
163##                'label': 'University',
164##                'label_edit': 'University',
165##                'description': '',
166##                'help': '',
167##                'is_i18n': False,
168##                'readonly_layout_modes': (),
169##                'hidden_layout_modes': (),
170##                'hidden_readonly_layout_modes': (),
171##                'hidden_empty': False,
172##                'hidden_if_expr': '',
173##                'css_class': '',
174##                'widget_mode_expr': '',
175##                'display_width': 10,
176##                'size_max': 0,
177##            },
178##        },
[47]179##        'jamb_pin_usage': {
180##            'type': 'Int Widget',
181##            'data': {
182##                'title': 'Jamb Pin usage',
183##                'fields': ('jamb_pin_usage',),
184##                'is_required': False,
185##                'label': 'Nr of Cardusage',
186##                'label_edit': 'Nr of Cardusage',
187##                'description': '',
188##                'help': 'How many times has the scratchcard been used',
189##                'is_i18n': False,
190##                'readonly_layout_modes': (),
191##                'hidden_layout_modes': (),
192##                'hidden_readonly_layout_modes': (),
193##                'hidden_empty': False,
194##                'hidden_if_expr': '',
195##                'css_class': '',
196##                'widget_mode_expr': '',
197##                'display_width': 2,
198##                'size_max': 2,
199##            },
200##        },
201        'faculty': {
202            'type': 'String Widget',
[25]203            'data': {
[47]204                'title': 'Faculty',
205                'fields': ('faculty',),
[25]206                'is_required': False,
[47]207                'label': 'Faculty',
208                'label_edit': 'Faculty',
[25]209                'description': '',
[47]210                'help': '',
[25]211                'is_i18n': False,
212                'readonly_layout_modes': (),
213                'hidden_layout_modes': (),
214                'hidden_readonly_layout_modes': (),
215                'hidden_empty': False,
216                'hidden_if_expr': '',
217                'css_class': '',
218                'widget_mode_expr': '',
[47]219                'display_width': 10,
220                'size_max': 0,
[25]221            },
222        },
[47]223    },
224    'layout': {
225        'style_prefix': 'layout_default_',
226        'flexible_widgets': (),
227        'ncols': 1,
228        'rows': [
229            [{'widget_id': 'jamb_is_admitted', 'ncols': 1},],
[49]230            #[{'widget_id': 'jamb_where_admitted', 'ncols': 1},],
[47]231            #[{'widget_id': 'jamb_pin_usage', 'ncols': 1},],
232            [{'widget_id': 'faculty', 'ncols': 1},],
233        ]
234    },
235}
236###)
237
[76]238firstname = { ###(
[19]239            'type': 'String Widget',
240            'data': {
[76]241                'title': 'First Name',
[47]242                'fields': ('firstname',),
[19]243                'is_required': False,
[76]244                'label': 'first name',
245                'label_edit': 'first name',
246                'description': 'First Name',
247                'help': 'First name',
[19]248                'is_i18n': False,
[76]249                'display_width': 40,
250                },
251            }
252middlename = {
[47]253            'type': 'String Widget',
254            'data': {
255                'title': '',
256                'fields': ('middlename',),
257                'is_required': False,
[76]258                'label': 'middle name',
259                'label_edit': 'middle name',
[47]260                'description': '',
[76]261                'help': 'middle name',
[47]262                'is_i18n': False,
263                'readonly_layout_modes': (),
264                'hidden_layout_modes': (),
265                'hidden_readonly_layout_modes': (),
[76]266                'hidden_empty': True,
[47]267                'hidden_if_expr': '',
268                'css_class': '',
269                'widget_mode_expr': '',
[76]270                'display_width': 40,
[47]271                'size_max': 0,
[76]272                },
273            }
274
275lastname = {
[47]276            'type': 'String Widget',
277            'data': {
278                'title': '',
279                'fields': ('lastname',),
280                'is_required': False,
[76]281                'label': 'surname',
282                'label_edit': 'surname',
[47]283                'description': '',
[76]284                'help': 'Surname',
[47]285                'is_i18n': False,
286                'readonly_layout_modes': (),
287                'hidden_layout_modes': (),
288                'hidden_readonly_layout_modes': (),
289                'hidden_empty': False,
290                'hidden_if_expr': '',
291                'css_class': '',
292                'widget_mode_expr': '',
[76]293                'display_width': 40,
[47]294                'size_max': 0,
295            },
[76]296        }
297sex = {
[47]298            'type': 'Boolean Widget',
299            'data': {
300                'title': '',
301                'fields': ('sex',),
302                'is_required': False,
[76]303                'label': 'sex',
304                'label_edit': 'sex',
[47]305                'label_false': 'male',
306                'label_true': 'female',
307                'description': '',
308                'help': '',
309                'is_i18n': False,
310                'readonly_layout_modes': (),
311                'hidden_layout_modes': (),
312                'hidden_readonly_layout_modes': (),
313                'hidden_empty': False,
314                'hidden_if_expr': '',
315                'css_class': '',
316                'widget_mode_expr': '',
[76]317                'display_width': 20,
[47]318                'size_max': 0,
[76]319            }
320        }
321           
322###)
323
324student_personal_layout = { ###(
325    'widgets': {
326        'firstname': firstname,
327        'middlename': middlename,
328        'lastname': lastname,
329        'sex': sex,
[47]330        'birthday': {
331            'type': 'Date Widget',
332            'data': {
333                'title': '',
334                'fields': ('birthday',),
335                'is_required': False,
336                'label': '',
337                'label_edit': 'Day of birth',
338                'description': 'Day of birth',
339                'help': '',
340                'is_i18n': False,
341                'readonly_layout_modes': (),
342                'hidden_layout_modes': (),
343                'hidden_readonly_layout_modes': (),
344                'hidden_empty': False,
345                'hidden_if_expr': '',
346                'css_class': '',
347                'widget_mode_expr': '',
348                'display_width': 10,
349                'size_max': 0,
350            },
351        },
[19]352    },
353    'layout': {
[76]354        'style_prefix': 'layout_personal_',
[19]355        'flexible_widgets': (),
356        'ncols': 1,
357        'rows': [
[47]358            [{'widget_id': 'firstname', 'ncols': 1},],
359            [{'widget_id': 'middlename', 'ncols': 1},],
360            [{'widget_id': 'lastname', 'ncols': 1},],
361            [{'widget_id': 'sex', 'ncols': 1},],
362            [{'widget_id': 'birthday', 'ncols': 1},],
[19]363        ]
364    },
365}
[47]366
367###)
368
369scratch_card = { ###(
[20]370    'widgets': {
[27]371        'sc_id': {
372            'type': 'String Widget',
[20]373            'data': {
[27]374                'title': 'SC ID',
375                'fields': ('sc_id',),
[20]376                'is_required': True,
[27]377                'label': 'Scratch card ID',
378                'label_edit': 'Scratch card ID',
[20]379                'description': '',
380                'help': '',
381                'is_i18n': False,
382                'readonly_layout_modes': (),
383                'hidden_layout_modes': (),
384                'hidden_readonly_layout_modes': (),
385                'hidden_empty': False,
386                'hidden_if_expr': '',
387                'css_class': '',
388                'widget_mode_expr': '',
389                'display_width': 10,
390                'size_max': 0,
391            },
392        },
393        'sc_pin': {
394            'type': 'Scratchcard Pin Widget',
395            'data': {
396                'title': 'SC Pin',
[25]397                'fields': ('sc_pin'),
[20]398                'is_required': True,
399                'label': 'Scratchcard Pin',
400                'label_edit': 'Scratchcard Pin',
401                'description': '',
402                'help': 'Please enter a valid Scratch card pin',
403                'is_i18n': False,
404                'readonly_layout_modes': (),
405                'hidden_layout_modes': (),
406                'hidden_readonly_layout_modes': (),
407                'hidden_empty': False,
408                'hidden_if_expr': '',
409                'css_class': '',
410                'widget_mode_expr': '',
411                'display_width': 10,
412                'size_max': 10,
413            },
414        },
415    },
416   'layout': {
[27]417        'style_prefix': 'layout_default_',
[20]418        'flexible_widgets': (),
419        'ncols': 1,
420        'rows': [
421            [{'widget_id': 'reg_nr', 'ncols': 1},],
422            [{'widget_id': 'sc_pin', 'ncols': 1},],
423        ]
424    },
425}
[68]426###)
[20]427
[76]428jamb_id = { ###(
[68]429           'type': 'StudentId Widget',
430           'data': {
431                'title': 'Registration Number',
432                'fields': ('reg_nr'),
433                'is_required': True,
434                'label': 'Registration Number',
435                'label_edit': 'Registration Number',
436                'description': '',
437                'help': 'This is the combination of 8 digits and 2 letters you are assigned when you purchase an examination form.',
438                'is_i18n': False,
439                'readonly_layout_modes': (),
440                'hidden_layout_modes': (),
441                'hidden_readonly_layout_modes': (),
442                'hidden_empty': False,
443                'hidden_if_expr': '',
444                'css_class': '',
445                'widget_mode_expr': '',
446                'display_width': 10,
447                'size_max': 10,
448                 },
449           }
[20]450
[76]451###)
452
[47]453admission = { ###(
[19]454    'widgets': {
[47]455        'sc_id': {
456            'type': 'String Widget',
457            'data': {
458                'title': 'SC ID',
459                'fields': ('admission_sc_id',),
460                'is_required': False,
461                'label': 'Card Serial Number ',
462                'label_edit': 'Card Serial Number',
463                'description': 'Card Serial Number ',
464                'help': 'This can be found on the bottom right of the reverse side of your Scratch Card',
465                'is_i18n': False,
466                'readonly_layout_modes': (),
467                'hidden_layout_modes': (),
468                'hidden_readonly_layout_modes': (),
469                'hidden_empty': False,
470                'hidden_if_expr': 'python:1',
471                'css_class': '',
472                'widget_mode_expr': '',
473                'display_width': 10,
474                'size_max': 0,
475            },
476        },
477        'sc_pin': {
[57]478            'type': 'Scratchcard Pin Widget',
[47]479            'data': {
480                'title': 'SC Pin',
481                'fields': ('admission_sc_pin'),
482                'is_required': True,
483                'label': 'PIN',
484                'label_edit': 'PIN',
485                'description': '',
486                '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',
487                'is_i18n': False,
488                'readonly_layout_modes': (),
489                'hidden_layout_modes': (),
490                'hidden_readonly_layout_modes': (),
491                'hidden_empty': False,
492                'hidden_if_expr': '',
493                'css_class': '',
494                'widget_mode_expr': '',
495                'display_width': 10,
496                'size_max': 10,
497            },
498        },
[68]499        'jamb_id' : jamb_id,
500    },
501   'layout': {
502        'style_prefix': 'layout_admission_',
503        'flexible_widgets': (),
504        'ncols': 1,
505        'rows': [
506            [{'widget_id': 'sc_id', 'ncols': 1},],
507            [{'widget_id': 'sc_pin', 'ncols': 1},],
508            [{'widget_id': 'jamb_id', 'ncols': 1},],
509        ]
510    },
511}
512###)
513
514admission_status = { ###(
515    'widgets': {       
516       'quick_search': {
517            'type': 'String Widget',
[47]518            'data': {
[68]519                'title': 'A search string',
520                'fields': ('admission_sc_id',),
521                'is_required': False,
522                'label': 'Quick Search',
523                'label_edit': 'Quick Search',
524                'description': 'Search',
525                'help': '',
[47]526                'is_i18n': False,
527                'readonly_layout_modes': (),
528                'hidden_layout_modes': (),
529                'hidden_readonly_layout_modes': (),
530                'hidden_empty': False,
[68]531                'hidden_if_expr': 'python:0',
[47]532                'css_class': '',
533                'widget_mode_expr': '',
[68]534                'display_width': 20,
535                'size_max': 0,
[47]536            },
537        },
[68]538
[47]539    },
540   'layout': {
[68]541        'style_prefix': 'layout_admission_status_',
[47]542        'flexible_widgets': (),
[68]543        'ncols': 2,
[47]544        'rows': [
[68]545            [{'widget_id': 'quick_search', 'ncols': 2},],
[47]546        ]
547    },
548}
549###)
550
[57]551jamb_widgets = { ###(
[49]552        'reg_nr': {
553            'type': 'StudentId Widget',
554            'data': {
[76]555                'title': 'registration nr',
[49]556                'fields': ('reg_nr',),
557                'is_required': True,
[76]558                'label': 'registration nr',
559                'label_edit': 'registration nr',
[49]560                'description': 'The Student ID from JAMB',
561                'help': 'The Student ID from JAMB',
562                'is_i18n': False,
[57]563                'display_width': 10,
564                'size_max': 10,
565            },
566        },
[76]567        'firstname': firstname,
568        'middlename': middlename,
569        'lastname': lastname,
[49]570        'age': {
571            'type': 'Int Widget',
572            'data': {
573                'title': '',
574                'fields': ('age',),
575                'is_required': False,
576                'label': 'Age',
577                'label_edit': 'Age',
578                'description': '',
579                'help': '',
580                'is_i18n': False,
581                'readonly_layout_modes': (),
582                'hidden_layout_modes': (),
583                'hidden_readonly_layout_modes': (),
584                'hidden_empty': False,
585                'hidden_if_expr': '',
586                'css_class': '',
587                'widget_mode_expr': '',
588                'display_width': 2,
589                'size_max': 2,
590            },
591        },
[76]592        'sex': sex,
[49]593        'state': {
[57]594            'type': 'Select Widget',
[49]595            'data': {
596                'title': '',
[57]597                'fields': ('state',),
[49]598                'is_required': False,
[76]599                'label': 'state of origin',
600                'label_edit': 'state of origin',
[49]601                'description': '',
602                'help': '',
603                'is_i18n': False,
[57]604                'vocabulary': 'nigerian_states',
[49]605            },
606        },
607        'exam_results': {
608            'type': 'String Widget',
609            'data': {
610                'title': '',
611                'fields': ('exam_results',),
612                'is_required': False,
613                'label': 'Jamb Results',
614                'label_edit': 'Jamb Results',
615                'description': '',
616                'help': '',
617                'is_i18n': False,
618                'readonly_layout_modes': (),
619                'hidden_layout_modes': (),
620                'hidden_readonly_layout_modes': (),
621                'hidden_empty': False,
622                'hidden_if_expr': '',
623                'css_class': '',
624                'widget_mode_expr': '',
625                'display_width': 20,
626                'size_max': 0,
627            },
628        },
629        'aggregate': {
[57]630            'type': 'Int Widget',
[49]631            'data': {
632                'title': 'Agregate',
633                'fields': ('aggregate',),
634                'is_required': False,
[57]635                'label': 'Score',
636                'label_edit': 'Score',
[49]637                'description': '',
638                'help': '',
639                'is_i18n': False,
640            },
641        },
[57]642        'faculty': {
643            'type': 'Select Widget',
[49]644            'data': {
[57]645                'title': 'Faculty',
646                'fields': ('faculty',),
[49]647                'is_required': False,
[76]648                'label': 'faculty',
649                'label_edit': 'faculty',
[49]650                'description': '',
[57]651                'help': '',
[49]652                'is_i18n': False,
[57]653                'vocabulary': 'faculties',
[49]654            },
655        },
[57]656        'listing_date': {
657            'type': 'Date Widget',
[49]658            'data': {
[57]659                'title': 'Listing Date',
660                'fields': ('listing_date',),
[49]661                'is_required': False,
[57]662                'label': 'Listing Date',
663                'label_edit': 'Listing Date',
664                'description': '',
665                'help': '',
[49]666                'is_i18n': False,
667                'readonly_layout_modes': (),
668                'hidden_layout_modes': (),
669                'hidden_readonly_layout_modes': (),
670                'hidden_empty': False,
671                'hidden_if_expr': '',
672                'css_class': '',
673                'widget_mode_expr': '',
[57]674                'display_width': 3,
[49]675                'size_max': 0,
676            },
677        },
[57]678##        '2nd_choice': { ###(
679##            'type': 'String Widget',
680##            'data': {
681##                'title': 'Second choice',
682##                'fields': ('2nd_choice',),
683##                'is_required': False,
684##                'label': 'Second choice',
685##                'label_edit': 'Second choice',
686##                'description': '',
687##                'help': 'second_choice',
688##                'is_i18n': False,
689##                'readonly_layout_modes': (),
690##                'hidden_layout_modes': (),
691##                'hidden_readonly_layout_modes': (),
692##                'hidden_empty': False,
693##                'hidden_if_expr': '',
694##                'css_class': '',
695##                'widget_mode_expr': '',
696##                'display_width': 20,
697##                'size_max': 0,
698##            },
699##        },
700##       
701##        '3rd_choice': {
702##            'type': 'String Widget',
703##            'data': {
704##                'title': 'Third_choice',
705##                'fields': ('3rd_choice',),
706##                'is_required': False,
707##                'label': 'Third choice',
708##                'label_edit': 'Third choice',
709##                'description': 'third_choice',
710##                'help': 'third_choice',
711##                'is_i18n': False,
712##                'readonly_layout_modes': (),
713##                'hidden_layout_modes': (),
714##                'hidden_readonly_layout_modes': (),
715##                'hidden_empty': False,
716##                'hidden_if_expr': '',
717##                'css_class': '',
718##                'widget_mode_expr': '',
719##                'display_width': 20,
720##                'size_max': 0,
721##            },
722##        },
723###)
724
[49]725        'sc_id': {
726            'type': 'String Widget',
727            'data': {
728                'title': '',
729                'fields': ('admission_sc_id',),
730                'is_required': False,
731                'label': 'Scratch card ID used',
732                'label_edit': 'Scratch card ID used',
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': 20,
744                'size_max': 0,
745            },
746        },
747        'sc_pin': {
748            'type': 'String Widget',
749            'data': {
750                'title': '',
751                'fields': ('admission_sc_pin',),
752                'is_required': False,
[76]753                'label': 'pin card code',
754                'label_edit': 'pin card code',
[49]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': 20,
766                'size_max': 0,
767            },
768        },
[57]769    }
770###)
771
772jamb_layoutcreate = { ###(
773    'widgets': jamb_widgets,
[49]774    'layout': {
775        'style_prefix': 'layout_jambcreate_',
776        'flexible_widgets': (),
777        'ncols': 1,
778        'rows': [
779            [{'widget_id': 'reg_nr', 'ncols': 1},],
[57]780            [{'widget_id': 'firstname', 'ncols': 1},],
781            [{'widget_id': 'middlename', 'ncols': 1},],
782            [{'widget_id': 'lastname', 'ncols': 1},],
[49]783            #[{'widget_id': 'sc_id', 'ncols': 1},],
784            #[{'widget_id': 'sc_pin', 'ncols': 1},],
785            [{'widget_id': 'age', 'ncols': 1},],
786            [{'widget_id': 'sex', 'ncols': 1},],
787            [{'widget_id': 'state', 'ncols': 1},],
[57]788            #[{'widget_id': 'exam_results', 'ncols': 1},],
[49]789            [{'widget_id': 'aggregate', 'ncols': 1},],
[57]790            [{'widget_id': 'faculty', 'ncols': 1},],
791            [{'widget_id': 'listing_date', 'ncols': 1},],
792            #[{'widget_id': '2nd_choice', 'ncols': 1},],
793            #[{'widget_id': '3rd_choice', 'ncols': 1},],
[49]794        ]
795    },
796}
797###)
798
[47]799jamb_layout = { ###(
[57]800    'widgets': jamb_widgets,
[19]801    'layout': {
[76]802        'style_prefix': 'layout_waeup_',
[19]803        'flexible_widgets': (),
804        'ncols': 1,
805        'rows': [
806            [{'widget_id': 'reg_nr', 'ncols': 1},],
[57]807            [{'widget_id': 'firstname', 'ncols': 1},],
808            [{'widget_id': 'middlename', 'ncols': 1},],
809            [{'widget_id': 'lastname', 'ncols': 1},],
810            #[{'widget_id': 'sc_id', 'ncols': 1},],
[76]811            [{'widget_id': 'sc_pin', 'ncols': 1},],
[19]812            [{'widget_id': 'age', 'ncols': 1},],
813            [{'widget_id': 'sex', 'ncols': 1},],
814            [{'widget_id': 'state', 'ncols': 1},],
[57]815            #[{'widget_id': 'exam_results', 'ncols': 1},],
[19]816            [{'widget_id': 'aggregate', 'ncols': 1},],
[57]817            [{'widget_id': 'faculty', 'ncols': 1},],
818            [{'widget_id': 'listing_date', 'ncols': 1},],
819            #[{'widget_id': '2nd_choice', 'ncols': 1},],
820            #[{'widget_id': '3rd_choice', 'ncols': 1},],
[19]821        ]
822    },
823}
[47]824###)
[19]825
[68]826course = { ###(
827    'widgets': {
[96]828        'heading': Heading,
829        'text': Text,
[68]830        'level': {
831            'type': 'String Widget',
832            'data': {
833                'title': '',
834                'fields': ('level',),
835                'is_required': True,
836                'label': 'Level',
837                'label_edit': 'Level',
838                'description': '',
839                'help': '',
840                'is_i18n': False,
841                'display_width': 10,
842                'size_max': 0,
843            },
844        },
845        'code': {
846            'type': 'String Widget',
847            'data': {
848                'title': 'Code',
849                'fields': ('code',),
850                'is_required': True,
851                'label': 'Code',
852                'label_edit': 'Code',
853                'description': '',
854                'help': '',
855                'is_i18n': False,
856                'display_width': 10,
857                'size_max': 0,
858            },
859        },
860        'semester': {
861            'type': 'Boolean Widget',
862            'data': {
863                'title': '',
864                'fields': ('semester',),
865                'is_required': True,
866                'label': 'Semester',
867                'label_edit': 'Semester',
868                'label_false': 'Second Semester',
869                'label_true': 'First Semester',
870                'description': '',
871                'help': '',
872                'is_i18n': False,
873                'display_width': 10,
874                'size_max': 0,
875            },
876        },
877        'credit': {
878            'type': 'Int Widget',
879            'data': {
880                'title': '',
881                'fields': ('credit',),
882                'is_required': True,
883                'label': 'Credit',
884                'label_edit': 'Credit',
885                'description': '',
886                'help': '',
887                'is_i18n': False,
[78]888                'display_width': 2,
[68]889                'size_max': 0,
890            },
891        },
892        'core_elective': {
893            'type': 'Boolean Widget',
894            'data': {
895                'title': '',
896                'fields': ('core_elective',),
897                'is_required': True,
898                'label': 'Core or elective',
899                'label_edit': 'Core or elective',
900                'label_true': 'Core Course',
901                'label_false': 'Elective Course',
902                'description': '',
903                'help': '',
904                'is_i18n': False,
905                'display_width': 10,
906                'size_max': 0,
907            },
908        },
909    },
910   'layout': {
[84]911        'style_prefix': 'layout_waeup_',
[68]912        'flexible_widgets': (),
913        'ncols': 1,
914        'rows': [
[96]915            [{'widget_id': 'heading', 'ncols': 1},],
916            [{'widget_id': 'text', 'ncols': 1},],
[68]917            [{'widget_id': 'level', 'ncols': 1},],
918            [{'widget_id': 'code', 'ncols': 1},],
919            [{'widget_id': 'semester', 'ncols': 1},],
920            [{'widget_id': 'credit', 'ncols': 1},],
921            [{'widget_id': 'core_elective', 'ncols': 1},],
922        ]
923    },
924}
925###)
926
[47]927layouts = {}
[96]928layouts['university'] = common_layout
[47]929layouts['waeup_common'] = common_layout
930layouts['student'] = student_layout
931layouts['student_personal'] = student_personal_layout
932layouts['scratch_card'] = scratch_card
933layouts['admission'] = admission
[49]934layouts['jambcreate'] = jamb_layoutcreate
[19]935layouts['jamb'] = jamb_layout
[96]936layouts['faculty'] = common_layout
937layouts['department'] = common_layout
[68]938layouts['course'] = course
939layouts['admission_status'] = admission_status
[19]940return layouts
Note: See TracBrowser for help on using the repository browser.