Changeset d9fa47 in indico
- Timestamp:
- 06/07/10 16:44:15 (3 years ago)
- Branches:
- master, burotel, hello-world-walkthrough, ipv6, new-webex, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
- Children:
- c51c01, 16a6b5
- Parents:
- ad240b
- Location:
- indico/MaKaC
- Files:
-
- 4 edited
-
common/utils.py (modified) (1 diff)
-
registration.py (modified) (1 diff)
-
webinterface/pages/registrants.py (modified) (1 diff)
-
webinterface/pages/registrationForm.py (modified) (115 diffs)
Legend:
- Unmodified
- Added
- Removed
-
indico/MaKaC/common/utils.py
r30b4d4 rd9fa47 96 96 [ day, month, year ] = str.split("-") 97 97 98 return datetime(int(year),months[month],int(day)) 98 if months.has_key(month): 99 month = months[month] 100 else: 101 month = int(month) 102 return datetime(int(year),month,int(day)) 99 103 100 104 def getTextColorFromBackgroundColor(bgcolor): -
indico/MaKaC/registration.py
rf91f1d rd9fa47 3239 3239 raise FormValuesError( _("Departure date cannot be empty.")) 3240 3240 if ad is not None and dd is not None: 3241 ad = stringToDate(ad) 3242 dd = stringToDate(dd) 3241 ad = map(lambda x: int(x), ad.split("-")) 3242 ad = datetime(ad[2], ad[1], ad[0]) 3243 dd = map(lambda x: int(x), dd.split("-")) 3244 dd = datetime(dd[2], dd[1], dd[0]) 3243 3245 if ad > dd: 3244 3246 raise FormValuesError( _("Arrival date has to be earlier than departure date")) -
indico/MaKaC/webinterface/pages/registrants.py
r8174c0 rd9fa47 1557 1557 html.append(""" 1558 1558 <option value=%s %s>%s</option> 1559 """%(quoteattr(str(date.strftime("%d-% B-%Y"))), selected, date.strftime("%d-%B-%Y")))1559 """%(quoteattr(str(date.strftime("%d-%m-%Y"))), selected, date.strftime("%d-%B-%Y"))) 1560 1560 html.append("</select>") 1561 1561 return "".join(html) -
indico/MaKaC/webinterface/pages/registrationForm.py
rbdd862 rd9fa47 42 42 def _createTabCtrl(self): 43 43 self._tabCtrl = wcomponents.TabControl() 44 44 45 45 self._tabRegFormSetup = self._tabCtrl.newTab( "regformsetup", _("Setup"), \ 46 46 urlHandlers.UHConfModifRegForm.getURL( self._conf ) ) … … 51 51 self._tabEPay = self._tabCtrl.newTab( "epay", _("e-payment"), \ 52 52 urlHandlers.UHConfModifEPayment.getURL( self._conf ) ) 53 53 54 54 self._setActiveTab() 55 55 56 56 if not self._conf.hasEnabledSection("regForm"): 57 57 self._tabRegFormSetup.disable() … … 61 61 if not self._conf.hasEnabledSection("epay"): 62 62 self._tabEPay.disable() 63 63 64 64 def _getPageContent(self, params): 65 65 self._createTabCtrl() 66 66 return wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) 67 67 68 68 def _getTabContent(self, params): 69 69 return "nothing" 70 70 71 71 def _setActiveSideMenuItem(self): 72 72 self._regFormMenuItem.setActive() 73 73 74 74 def _setActiveTab(self): 75 75 pass 76 76 77 77 class WPConfModifRegFormPreview( WPConfModifRegFormBase ): 78 78 def _setActiveTab( self ): 79 self._tabRegistrationPreview.setActive() 79 self._tabRegistrationPreview.setActive() 80 80 81 81 def _getTabContent( self, params ): … … 92 92 93 93 class WConfModifRegForm( wcomponents.WTemplated ): 94 94 95 95 def __init__( self, conference ): 96 96 self._conf = conference … … 143 143 </tr> 144 144 """%(pdfield.getName(), switch) ) 145 145 146 146 html.insert(0, """<table>""") 147 147 html.append("</table>") … … 191 191 def _getStatusesHTML(self): 192 192 regForm=self._conf.getRegistrationForm() 193 html=[] 193 html=[] 194 194 for st in regForm.getStatusesList(): 195 195 urlStatus = urlHandlers.UHConfModifRegFormStatusModif.getURL(self._conf) … … 277 277 278 278 class WPConfModifRegFormDataModification( WPConfModifRegFormBase ): 279 279 280 280 def _getTabContent( self, params ): 281 281 wc = WConfModifRegFormDataModification(self._conf) … … 283 283 284 284 class WConfModifRegFormDataModification( wcomponents.WTemplated ): 285 285 286 286 def __init__( self, conference ): 287 287 self._conf = conference … … 330 330 331 331 class WPConfModifRegFormSectionsBase(WPConfModifRegFormBase): 332 332 333 333 def _setActiveSideMenuItem(self): 334 334 self._regFormMenuItem.setActive(True) … … 339 339 html = wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) 340 340 return banner+html 341 341 342 342 class WPConfModifRegFormSessionsBase(WPConfModifRegFormSectionsBase): 343 343 344 344 def __init__( self, rh, conference ): 345 345 WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 346 self._targetSection = self._conf.getRegistrationForm().getSessionsForm() 346 self._targetSection = self._conf.getRegistrationForm().getSessionsForm() 347 347 348 348 def _createTabCtrl( self ): … … 354 354 # wf.customiseTabCtrl( self._tabCtrl ) 355 355 self._setActiveTab() 356 356 357 357 # def _applyFrame( self, body ): 358 358 # frame = WRegFormSessionsModifFrame( self._conf, self._getAW() ) … … 369 369 370 370 #class WRegFormSessionsModifFrame(wcomponents.WTemplated): 371 # 371 # 372 372 # def __init__(self, conf, aw): 373 373 # self._conf = conf 374 374 # self._aw = aw 375 375 # self._sessions = self._conf.getRegistrationForm().getSessionsForm() 376 # 376 # 377 377 # def getHTML( self, body, **params ): 378 378 # params["body"] = body 379 379 # return wcomponents.WTemplated.getHTML( self, params ) 380 # 380 # 381 381 # def getVars( self ): 382 382 # vars = wcomponents.WTemplated.getVars( self ) … … 391 391 # wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 392 392 # return wc 393 # 393 # 394 394 # def getIntermediateVTabPixels( self ): 395 395 # wc = self.getOwnerComponent() 396 396 # return 7 + wc.getIntermediateVTabPixels() 397 # 397 # 398 398 # def getTitleTabPixels( self ): 399 399 # wc = self.getOwnerComponent() 400 400 # return wc.getTitleTabPixels() - 7 401 # 401 # 402 402 # def getCloseHeaderTags( self ): 403 403 # wc = self.getOwnerComponent() … … 405 405 406 406 class WPConfModifRegFormSessions( WPConfModifRegFormSessionsBase ): 407 407 408 408 def _getTabContent( self, params ): 409 409 wc = WConfModifRegFormSessions(self._conf) … … 415 415 416 416 class WConfModifRegFormSessions( wcomponents.WTemplated ): 417 417 418 418 def __init__( self, conference ): 419 419 self._conf = conference … … 450 450 451 451 class WPConfModifRegFormSessionsDataModif( WPConfModifRegFormSessionsBase ): 452 452 453 453 def _getTabContent( self, params ): 454 454 wc = WConfModifRegFormSessionsDataModif(self._conf) … … 458 458 459 459 class WConfModifRegFormSessionsDataModif( wcomponents.WTemplated ): 460 460 461 461 def __init__( self, conference ): 462 462 self._conf = conference … … 485 485 486 486 class WPConfModifRegFormSessionsAdd( WPConfModifRegFormSessionsBase ): 487 487 488 488 def _getTabContent( self, params ): 489 489 wc = WConfModifRegFormSessionsAdd(self._conf) … … 496 496 def __init__( self, conference ): 497 497 self._conf = conference 498 498 499 499 def _getSessionsHTML(self, sessions): 500 500 html = [] … … 519 519 520 520 class WPConfModifRegFormAccommodationBase(WPConfModifRegFormSectionsBase): 521 521 522 522 def __init__( self, rh, conference ): 523 523 WPConfModifRegFormSectionsBase.__init__(self, rh, conference) … … 540 540 541 541 #class WRegFormAccommodationModifFrame(wcomponents.WTemplated): 542 # 542 # 543 543 # def __init__(self, conf, aw): 544 544 # self._conf = conf 545 545 # self._aw = aw 546 546 # self._accommodation = self._conf.getRegistrationForm().getAccommodationForm() 547 # 547 # 548 548 # def getHTML( self, body, **params ): 549 549 # params["body"] = body 550 550 # return wcomponents.WTemplated.getHTML( self, params ) 551 # 551 # 552 552 # def getVars( self ): 553 553 # vars = wcomponents.WTemplated.getVars( self ) … … 562 562 # wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 563 563 # return wc 564 # 564 # 565 565 # def getIntermediateVTabPixels( self ): 566 566 # wc = self.getOwnerComponent() 567 567 # return 7 + wc.getIntermediateVTabPixels() 568 # 568 # 569 569 # def getTitleTabPixels( self ): 570 570 # wc = self.getOwnerComponent() 571 571 # return wc.getTitleTabPixels() - 7 572 # 572 # 573 573 # def getCloseHeaderTags( self ): 574 574 # wc = self.getOwnerComponent() … … 576 576 577 577 class WPConfModifRegFormAccommodation( WPConfModifRegFormAccommodationBase ): 578 578 579 579 def _getTabContent( self, params ): 580 580 wc = WConfModifRegFormAccommodation(self._conf) … … 587 587 588 588 class WConfModifRegFormAccommodation( wcomponents.WTemplated ): 589 589 590 590 def __init__( self, conference ): 591 591 self._conf = conference … … 621 621 622 622 class WPConfModifRegFormAccommodationDataModif( WPConfModifRegFormAccommodationBase ): 623 623 624 624 def _getTabContent( self, params ): 625 625 wc = WConfModifRegFormAccommodationDataModif(self._conf) … … 629 629 630 630 class WConfModifRegFormAccommodationDataModif( wcomponents.WTemplated ): 631 631 632 632 def __init__( self, conference ): 633 633 self._conf = conference … … 646 646 647 647 class WPConfModifRegFormAccommodationTypeAdd( WPConfModifRegFormAccommodationBase ): 648 648 649 649 def _getTabContent( self, params ): 650 650 wc = WConfModifRegFormAccommodationTypeAdd() … … 661 661 WPConfModifRegFormAccommodationBase.__init__(self, rh, conf) 662 662 self._accoType = accoType 663 663 664 664 def _getTabContent( self, params ): 665 665 wc = WConfModifRegFormAccommodationTypeModify(self._accoType) … … 672 672 def __init__(self, accoType): 673 673 self._accoType = accoType 674 674 675 675 def getVars( self ): 676 676 vars = wcomponents.WTemplated.getVars(self) … … 683 683 684 684 class WPConfRemoveAccommodationType(WPConfModifRegFormAccommodationBase): 685 685 686 686 def __init__(self, rh, conf, accoTypeIds, accommodationTypes): 687 687 WPConfModifRegFormAccommodationBase.__init__(self, rh, conf) … … 689 689 if self._rh.getWebFactory() is not None: 690 690 self._eventType=self._rh.getWebFactory().getId() 691 691 692 692 self._accoTypeIds = accoTypeIds 693 693 self._accommodationTypes = [] … … 695 695 for at in accommodationTypes : 696 696 self._accommodationTypes.append("<li>%s</li>"%at) 697 697 698 698 def _setActiveTab( self ): 699 699 self._tabMain.setActive() 700 700 701 701 def _getTabContent( self, params ): 702 702 msg = _(""" 703 703 <font size="+2"> _("Are you sure that you want to DELETE this accomodation")? <br><table><tr><td align="left"><ul>%s</ul></td></tr></table></font><br> 704 ( _("Note that if you delete this accomodation, registrants who applied for it 704 ( _("Note that if you delete this accomodation, registrants who applied for it 705 705 will lose their accomodation info") ) 706 706 """)%("".join(self._accommodationTypes)) … … 712 712 713 713 class WPConfModifRegFormFurtherInformationBase(WPConfModifRegFormSectionsBase): 714 714 715 715 def __init__( self, rh, conference ): 716 716 WPConfModifRegFormSectionsBase.__init__(self, rh, conference) … … 733 733 734 734 #class WRegFormFurtherInformationModifFrame(wcomponents.WTemplated): 735 # 735 # 736 736 # def __init__(self, conf, aw): 737 737 # self._conf = conf 738 738 # self._aw = aw 739 739 # self._furtherInformation = self._conf.getRegistrationForm().getFurtherInformationForm() 740 # 740 # 741 741 # def getHTML( self, body, **params ): 742 742 # params["body"] = body 743 743 # return wcomponents.WTemplated.getHTML( self, params ) 744 # 744 # 745 745 # def getVars( self ): 746 746 # vars = wcomponents.WTemplated.getVars( self ) … … 755 755 # wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 756 756 # return wc 757 # 757 # 758 758 # def getIntermediateVTabPixels( self ): 759 759 # wc = self.getOwnerComponent() 760 760 # return 7 + wc.getIntermediateVTabPixels() 761 # 761 # 762 762 # def getTitleTabPixels( self ): 763 763 # wc = self.getOwnerComponent() 764 764 # return wc.getTitleTabPixels() - 7 765 # 765 # 766 766 # def getCloseHeaderTags( self ): 767 767 # wc = self.getOwnerComponent() … … 769 769 770 770 class WPConfModifRegFormFurtherInformation( WPConfModifRegFormFurtherInformationBase ): 771 771 772 772 def _getTabContent( self, params ): 773 773 wc = WConfModifRegFormFurtherInformation(self._conf) … … 778 778 779 779 class WConfModifRegFormFurtherInformation( wcomponents.WTemplated ): 780 780 781 781 def __init__( self, conference ): 782 782 self._conf = conference … … 791 791 792 792 class WPConfModifRegFormFurtherInformationDataModif( WPConfModifRegFormFurtherInformationBase ): 793 793 794 794 def _getTabContent( self, params ): 795 795 wc = WConfModifRegFormFurtherInformationDataModif(self._conf) … … 799 799 800 800 class WConfModifRegFormFurtherInformationDataModif( wcomponents.WTemplated ): 801 801 802 802 def __init__( self, conference ): 803 803 self._conf = conference … … 812 812 813 813 class WPConfModifRegFormReasonParticipationBase(WPConfModifRegFormSectionsBase): 814 814 815 815 def __init__( self, rh, conference ): 816 816 WPConfModifRegFormSectionsBase.__init__(self, rh, conference) … … 833 833 834 834 #class WRegFormReasonParticipationModifFrame(wcomponents.WTemplated): 835 # 835 # 836 836 # def __init__(self, conf, aw): 837 837 # self._conf = conf 838 838 # self._aw = aw 839 839 # self._reasonParticipation = self._conf.getRegistrationForm().getReasonParticipationForm() 840 # 840 # 841 841 # def getHTML( self, body, **params ): 842 842 # params["body"] = body 843 843 # return wcomponents.WTemplated.getHTML( self, params ) 844 # 844 # 845 845 # def getVars( self ): 846 846 # vars = wcomponents.WTemplated.getVars( self ) … … 855 855 # wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 856 856 # return wc 857 # 857 # 858 858 # def getIntermediateVTabPixels( self ): 859 859 # wc = self.getOwnerComponent() 860 860 # return 7 + wc.getIntermediateVTabPixels() 861 # 861 # 862 862 # def getTitleTabPixels( self ): 863 863 # wc = self.getOwnerComponent() 864 864 # return wc.getTitleTabPixels() - 7 865 # 865 # 866 866 # def getCloseHeaderTags( self ): 867 867 # wc = self.getOwnerComponent() … … 869 869 870 870 class WPConfModifRegFormReasonParticipation( WPConfModifRegFormReasonParticipationBase ): 871 871 872 872 def _getTabContent( self, params ): 873 873 wc = WConfModifRegFormReasonParticipation(self._conf) … … 878 878 879 879 class WConfModifRegFormReasonParticipation( wcomponents.WTemplated ): 880 880 881 881 def __init__( self, conference ): 882 882 self._conf = conference … … 891 891 892 892 class WPConfModifRegFormReasonParticipationDataModif( WPConfModifRegFormReasonParticipationBase ): 893 893 894 894 def _getTabContent( self, params ): 895 895 wc = WConfModifRegFormReasonParticipationDataModif(self._conf) … … 899 899 900 900 class WConfModifRegFormReasonParticipationDataModif( wcomponents.WTemplated ): 901 901 902 902 def __init__( self, conference ): 903 903 self._conf = conference … … 912 912 913 913 class WPConfModifRegFormSocialEventBase(WPConfModifRegFormSectionsBase): 914 914 915 915 def __init__( self, rh, conference ): 916 916 WPConfModifRegFormSectionsBase.__init__(self, rh, conference) … … 933 933 934 934 #class WRegFormSocialEventModifFrame(wcomponents.WTemplated): 935 # 935 # 936 936 # def __init__(self, conf, aw): 937 937 # self._conf = conf 938 938 # self._aw = aw 939 939 # self._socialEvent = self._conf.getRegistrationForm().getSocialEventForm() 940 # 940 # 941 941 # def getHTML( self, body, **params ): 942 942 # params["body"] = body 943 943 # return wcomponents.WTemplated.getHTML( self, params ) 944 # 944 # 945 945 # def getVars( self ): 946 946 # vars = wcomponents.WTemplated.getVars( self ) … … 955 955 # wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 956 956 # return wc 957 # 957 # 958 958 # def getIntermediateVTabPixels( self ): 959 959 # wc = self.getOwnerComponent() 960 960 # return 7 + wc.getIntermediateVTabPixels() 961 # 961 # 962 962 # def getTitleTabPixels( self ): 963 963 # wc = self.getOwnerComponent() 964 964 # return wc.getTitleTabPixels() - 7 965 # 965 # 966 966 # def getCloseHeaderTags( self ): 967 967 # wc = self.getOwnerComponent() … … 969 969 970 970 class WPConfModifRegFormSocialEvent( WPConfModifRegFormSocialEventBase ): 971 971 972 972 def _getTabContent( self, params ): 973 973 wc = WConfModifRegFormSocialEvent(self._conf) … … 980 980 981 981 class WConfModifRegFormSocialEvent( wcomponents.WTemplated ): 982 982 983 983 def __init__( self, conference ): 984 984 self._conf = conference … … 1014 1014 1015 1015 class WPConfModifRegFormSocialEventDataModif( WPConfModifRegFormSocialEventBase ): 1016 1016 1017 1017 def _getTabContent( self, params ): 1018 1018 wc = WConfModifRegFormSocialEventDataModif(self._conf) … … 1022 1022 1023 1023 class WConfModifRegFormSocialEventDataModif( wcomponents.WTemplated ): 1024 1024 1025 1025 def __init__( self, conference ): 1026 1026 self._conf = conference … … 1037 1037 1038 1038 class WPConfModifRegFormSocialEventAdd( WPConfModifRegFormSocialEventBase ): 1039 1039 1040 1040 def _getTabContent( self, params ): 1041 1041 wc = WConfModifRegFormSocialEventAdd() … … 1052 1052 WPConfModifRegFormSocialEventBase.__init__(self, rh, conf) 1053 1053 self._socialEventItem = socialEventItem 1054 1054 1055 1055 def _getTabContent( self, params ): 1056 1056 wc = WConfModifRegFormSocialEventItemModify(self._socialEventItem) … … 1063 1063 def __init__(self, socialEventItem): 1064 1064 self._socialEventItem = socialEventItem 1065 1065 1066 1066 def getVars( self ): 1067 1067 vars = wcomponents.WTemplated.getVars(self) … … 1078 1078 1079 1079 class WPConfRemoveSocialEvent(WPConfModifRegFormSocialEventBase): 1080 1080 1081 1081 def __init__(self, rh, conf, socialEventIds, eventNames): 1082 1082 WPConfModifRegFormSocialEventBase.__init__(self, rh, conf) … … 1088 1088 if self._rh.getWebFactory() is not None: 1089 1089 self._eventType=self._rh.getWebFactory().getId() 1090 1090 1091 1091 def _setActiveTab( self ): 1092 1092 self._tabMain.setActive() 1093 1093 1094 1094 def _getTabContent( self, params ): 1095 1095 msg = _(""" 1096 1096 <font size="+2"> _("Are you sure that you want to DELETE this social event")? <br><table><tr><td align="left"><ul>%s</ul></td></tr></table></font><br> 1097 ( _("Note that if you delete this social event, registrants who applied for it 1097 ( _("Note that if you delete this social event, registrants who applied for it 1098 1098 will lose their social event info") ) 1099 1099 """)%("".join(self._eventNames)) … … 1105 1105 1106 1106 class WPConfModifRegFormStatusesRemConfirm(WPConfModifRegFormBase): 1107 1107 1108 1108 def __init__(self,rh,target, stids): 1109 1109 WPConfModifRegFormBase.__init__(self, rh, target) 1110 1110 self._statusesIds=stids 1111 1111 1112 1112 def _getTabContent(self,params): 1113 1113 wc=wcomponents.WConfirmation() … … 1127 1127 1128 1128 class WPConfModifRegFormGeneralSectionRemConfirm(WPConfModifRegFormBase): 1129 1129 1130 1130 def __init__(self,rh,target, gss): 1131 1131 WPConfModifRegFormBase.__init__(self, rh, target) 1132 1132 self._generalSections=gss 1133 1133 1134 1134 def _getTabContent(self,params): 1135 1135 wc=wcomponents.WConfirmation() … … 1170 1170 1171 1171 class WRegFormGeneralSectionModifFrame(wcomponents.WTemplated): 1172 1172 1173 1173 def __init__(self, gs, aw): 1174 1174 self._conf = gs.getConference() 1175 1175 self._aw = aw 1176 1176 self._generalSection = gs 1177 1177 1178 1178 def getHTML( self, body, **params ): 1179 1179 params["body"] = body 1180 1180 return wcomponents.WTemplated.getHTML( self, params ) 1181 1181 1182 1182 def getVars( self ): 1183 1183 vars = wcomponents.WTemplated.getVars( self ) … … 1192 1192 wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 1193 1193 return wc 1194 1194 1195 1195 def getIntermediateVTabPixels( self ): 1196 1196 wc = self.getOwnerComponent() 1197 1197 return 7 + wc.getIntermediateVTabPixels() 1198 1198 1199 1199 def getTitleTabPixels( self ): 1200 1200 wc = self.getOwnerComponent() 1201 1201 return wc.getTitleTabPixels() - 7 1202 1202 1203 1203 def getCloseHeaderTags( self ): 1204 1204 wc = self.getOwnerComponent() … … 1206 1206 1207 1207 class WPConfModifRegFormGeneralSection( WPConfModifRegFormGeneralSectionBase ): 1208 1208 1209 1209 def _getTabContent( self, params ): 1210 1210 wc = WConfModifRegFormGeneralSection(self._generalSectionForm) … … 1217 1217 1218 1218 class WConfModifRegFormGeneralSection( wcomponents.WTemplated ): 1219 1219 1220 1220 def __init__( self, gs ): 1221 1221 self._conf = gs.getConference() … … 1235 1235 spec = _(""" %s, _("mandatory") """)%spec 1236 1236 if f.isBillable(): 1237 spec = _(""" %s , _("Billable") = %s """)%(spec,self.htmlText(f.getPrice())) 1238 1237 spec = _(""" %s , _("Billable") = %s """)%(spec,self.htmlText(f.getPrice())) 1238 1239 1239 spec = " %s)</b>"%spec 1240 1240 1241 1241 # 1242 1242 # add the selection box here for sorting... … … 1251 1251 selbox += """ 1252 1252 </select>""" 1253 1253 1254 1254 html.append("""<tr> 1255 1255 <td align="left" style="padding-left:10px">%s<input type="checkbox" name="fieldsIds" value="%s"><a href=%s>%s</a>%s</td> … … 1269 1269 1270 1270 class WPConfModifRegFormGeneralSectionDataModif( WPConfModifRegFormGeneralSectionBase ): 1271 1271 1272 1272 def _getTabContent( self, params ): 1273 1273 wc = WConfModifRegFormGeneralSectionDataModif(self._generalSectionForm) … … 1277 1277 1278 1278 class WConfModifRegFormGeneralSectionDataModif( wcomponents.WTemplated ): 1279 1279 1280 1280 def __init__( self, generalSectionForm ): 1281 1281 self._generalSectionForm = generalSectionForm … … 1288 1288 1289 1289 class WPConfModifRegFormGeneralSectionFieldAdd( WPConfModifRegFormGeneralSectionBase ): 1290 1290 1291 1291 def __init__(self, rh, section, tmpField): 1292 1292 WPConfModifRegFormGeneralSectionBase.__init__(self, rh, section) 1293 1293 self._tmpField=tmpField 1294 1294 1295 1295 def _getTabContent( self, params ): 1296 1296 wc = WConfModifRegFormGeneralSectionFieldEdit(self._tmpField) … … 1300 1300 1301 1301 class WConfModifRegFormGeneralSectionFieldEdit( wcomponents.WTemplated ): 1302 1302 1303 1303 def __init__( self, generalField=None): 1304 1304 self._generalField = generalField … … 1324 1324 vars["mandatory"] = """ checked="checked" """ 1325 1325 #vars["billable"]= """ checked="checked" """ 1326 #vars["price"]="" 1326 #vars["price"]="" 1327 1327 if self._generalField is not None: 1328 1328 vars["caption"] = quoteattr(self._generalField.getCaption()) … … 1331 1331 vars["mandatory"] = "" 1332 1332 #if not self._generalField.isBillable(): 1333 # vars["billable"] = "" 1333 # vars["billable"] = "" 1334 1334 vars["inputtypes"]=self._getFieldTypesHTML() 1335 1335 vars["specialOptions"]="" … … 1344 1344 self._sectionField=field 1345 1345 self._tmpField=tmpField 1346 1346 1347 1347 def _getTabContent( self, params ): 1348 1348 wc = WConfModifRegFormGeneralSectionFieldEdit(self._tmpField) … … 1352 1352 1353 1353 class WPConfModifRegFormGeneralSectionFieldRemConfirm(WPConfModifRegFormGeneralSectionBase): 1354 1354 1355 1355 def __init__(self,rh,gs, fields): 1356 1356 WPConfModifRegFormGeneralSectionBase.__init__(self, rh, gs) 1357 1357 self._fields=fields 1358 1358 1359 1359 def _getTabContent(self,params): 1360 1360 wc=wcomponents.WConfirmation() … … 1380 1380 self._status=st 1381 1381 self._tempStatus=tmpst 1382 1382 1383 1383 def _getTabContent( self, params ): 1384 1384 wc = WConfModifRegFormStatusModif(self._status, self._tempStatus) 1385 1385 p = { 1386 1386 1387 1387 'postURL': quoteattr(str(urlHandlers.UHConfModifRegFormStatusPerformModif.getURL( self._status ))) 1388 1388 } … … 1390 1390 1391 1391 class WConfModifRegFormStatusModif( wcomponents.WTemplated ): 1392 1392 1393 1393 def __init__( self, st, tmpst ): 1394 1394 self._conf = st.getConference() … … 1427 1427 return wc.getHTML(pars) 1428 1428 1429 def _defineSectionMenu( self ): 1429 def _defineSectionMenu( self ): 1430 1430 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 1431 1431 self._sectionMenu.setCurrentItem(self._regFormOpt) … … 1468 1468 vars["announcement"] = regForm.getAnnouncement() 1469 1469 vars["title"] = regForm.getTitle() 1470 vars["usersLimit"] = "" 1470 vars["usersLimit"] = "" 1471 1471 if regForm.getUsersLimit() > 0: 1472 1472 vars["usersLimit"] = _(""" … … 1485 1485 """ )%regForm.getContactInfo() 1486 1486 return vars 1487 1487 1488 1488 class WPRegistrationFormDisplay( conferences.WPConferenceDefaultDisplayBase ): 1489 1489 navigationEntry = navigation.NERegistrationFormDisplay … … 1494 1494 return wc.getHTML(pars) 1495 1495 1496 def _defineSectionMenu( self ): 1496 def _defineSectionMenu( self ): 1497 1497 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 1498 1498 self._sectionMenu.setCurrentItem(self._newRegFormOpt) … … 1503 1503 self._currentUser = user 1504 1504 self._conf = conf 1505 1505 1506 1506 def _getWComp(self, sect): 1507 1507 if sect == self._conf.getRegistrationForm().getReasonParticipationForm(): … … 1519 1519 return WConfRegFormSocialEventDisplay(self._conf, self._currentUser) 1520 1520 return WConfRegFormGeneralSectionDisplay(sect, self._currentUser) 1521 1521 1522 1522 def _getOtherSectionsHTML(self): 1523 1523 regForm=self._conf.getRegistrationForm() … … 1557 1557 1558 1558 class WConfRegFormGeneralSectionDisplay(wcomponents.WTemplated): 1559 1559 1560 1560 def __init__(self, gs, currentUser): 1561 1561 self._generalSection = gs … … 1591 1591 vars["fields"]=self._getFieldsHTML(miscGroup) 1592 1592 return vars 1593 1593 1594 1594 class WConfRegFormPersonalDataDisplay(wcomponents.WTemplated): 1595 1595 … … 1623 1623 inputHTML += """<option value="%s" %s>%s</option>"""%(ck, selected, CountryHolder().getCountryById(ck)) 1624 1624 inputHTML = """<select name="%s">%s</select>"""%(item.getId(), inputHTML) 1625 1625 1626 1626 else: 1627 1627 inputHTML = """<input type="%s" name="%s" size="40" value="%s">"""%(item.getInput(), item.getId(), value) … … 1654 1654 1655 1655 class WConfRegFormReasonParticipationDisplay(wcomponents.WTemplated): 1656 1656 1657 1657 def __init__(self, conf, currentUser): 1658 1658 self._conf = conf … … 1764 1764 1765 1765 class WConfRegFormAccommodationDisplay(wcomponents.WTemplated): 1766 1766 1767 1767 def __init__(self, conf, currentUser): 1768 1768 self._conf = conf … … 1795 1795 html.append(""" 1796 1796 <option value=%s %s>%s</option> 1797 """%(quoteattr(str(date.strftime("%d-% B-%Y"))), selected, date.strftime("%d-%B-%Y")))1797 """%(quoteattr(str(date.strftime("%d-%m-%Y"))), selected, date.strftime("%d-%B-%Y"))) 1798 1798 html.append("</select>") 1799 1799 return "".join(html) … … 1813 1813 <td align="left" style="padding-left:10px"><input type="radio" name="accommodationType" value="%s" %s>%s%s</td> 1814 1814 </tr> 1815 """%(atype.getId(), selected, atype.getCaption(), placesLeft ) ) 1815 """%(atype.getId(), selected, atype.getCaption(), placesLeft ) ) 1816 1816 else: 1817 1817 html.append("""<tr> … … 1831 1831 """)%(currentAccoType.getCaption() ) ) 1832 1832 return "".join(html) 1833 1833 1834 1834 1835 1835 def getVars(self): … … 1856 1856 1857 1857 class WConfRegFormSocialEventDisplay(wcomponents.WTemplated): 1858 1858 1859 1859 def __init__(self, conf, currentUser): 1860 1860 self._conf = conf … … 1886 1886 placesLeft = "" 1887 1887 if seItem.getPlacesLimit() > 0: 1888 placesLeft = " <font color='green'><i>[%s place(s) left]</i></font>"%seItem.getNoPlacesLeft() 1888 placesLeft = " <font color='green'><i>[%s place(s) left]</i></font>"%seItem.getNoPlacesLeft() 1889 1889 inputType="checkbox" 1890 1890 if self._socialEvent.getSelectionTypeId() == "unique": 1891 1891 inputType="radio" 1892 1892 html.append("""<tr> 1893 <td align="left" nowrap style="padding-left:10px"><input type="%s" name="socialEvents" value="%s" %s>%s 1893 <td align="left" nowrap style="padding-left:10px"><input type="%s" name="socialEvents" value="%s" %s>%s 1894 1894 </td> 1895 1895 <td width="100%%" align="left"> … … 1916 1916 """%(se.getCaption(), cancelledReason ) ) 1917 1917 return "".join(html) 1918 1918 1919 1919 1920 1920 def getVars(self): … … 1931 1931 1932 1932 class WConfRegFormFurtherInformationDisplay(wcomponents.WTemplated): 1933 1933 1934 1934 def __init__(self, conf): 1935 1935 self._conf = conf … … 1948 1948 return wc.getHTML() 1949 1949 1950 def _defineSectionMenu( self ): 1950 def _defineSectionMenu( self ): 1951 1951 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 1952 1952 self._sectionMenu.setCurrentItem(self._regFormOpt) … … 1962 1962 return wc.getHTML() 1963 1963 1964 def _defineSectionMenu( self ): 1964 def _defineSectionMenu( self ): 1965 1965 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 1966 1966 self._sectionMenu.setCurrentItem(self._regFormOpt) … … 1982 1982 return wc.getHTML() 1983 1983 1984 def _defineSectionMenu( self ): 1984 def _defineSectionMenu( self ): 1985 1985 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 1986 1986 self._sectionMenu.setCurrentItem(self._regFormOpt) 1987 1987 1988 1989 1988 1989 1990 1990 class WConfRegistrationFormCreationDone(wcomponents.WTemplated): 1991 1991 … … 2135 2135 <tr> 2136 2136 <td style="color:black"><b>%s</b></td> 2137 <td bgcolor="white" class="blacktext">%s</td> 2137 <td bgcolor="white" class="blacktext">%s</td> 2138 2138 </tr> 2139 2139 <tr> … … 2201 2201 html.append("</table>") 2202 2202 return "".join(html) 2203 2204 def _getMiscInfoItemsHTMLBilllable(self, gsf,total): 2203 2204 def _getMiscInfoItemsHTMLBilllable(self, gsf,total): 2205 2205 regForm = self._conf.getRegistrationForm() 2206 2206 miscGroup=self._registrant.getMiscellaneousGroupById(gsf.getId()) … … 2220 2220 #caption=miscItem.getValue() 2221 2221 value=miscItem.getValue() 2222 price=string.atof(miscItem.getPrice()) 2222 price=string.atof(miscItem.getPrice()) 2223 2223 quantity=miscItem.getQuantity() 2224 total["value"]+=price*quantity 2224 total["value"]+=price*quantity 2225 2225 if value != "": 2226 2226 value=":%s"%value 2227 if(quantity>0): 2227 if(quantity>0): 2228 2228 html.append(""" 2229 2229 <tr> … … 2234 2234 </tr> 2235 2235 """%(quantity,gsf.getTitle(),caption,value,price,price*quantity,currency) ) 2236 return "".join(html) 2237 2236 return "".join(html) 2237 2238 2238 2239 2239 def _getMiscellaneousInfoHTML(self, gsf): … … 2266 2266 <td style="color:black;padding-right:10px" nowrap ><b>_("Unit Price")</b></td> 2267 2267 <td style="color:black"><b> _("Cost")</b></td> 2268 </tr> 2268 </tr> 2269 2269 """)) 2270 2270 for gsf in self._registrant.getMiscellaneousGroupList(): 2271 html.append("""<tr>%s</tr>"""%(self._getMiscInfoItemsHTMLBilllable(gsf,total))) 2272 2271 html.append("""<tr>%s</tr>"""%(self._getMiscInfoItemsHTMLBilllable(gsf,total))) 2272 2273 2273 url=urlHandlers.UHConfRegistrationFormconfirmBooking.getURL(self._registrant) 2274 url.addParam("registrantId", self._registrant.getId()) 2275 url.addParam("confId", self._conf.getId()) 2276 2274 url.addParam("registrantId", self._registrant.getId()) 2275 url.addParam("confId", self._conf.getId()) 2276 2277 2277 condChecking="" 2278 2278 if modPay.hasPaymentConditions(): … … 2285 2285 <td><br></td> 2286 2286 </tr>"""%str(urlHandlers.UHConfRegistrationFormConditions.getURL(self._conf)) 2287 2287 2288 2288 html.append( _(""" 2289 2289 <tr> </tr> … … 2297 2297 <tr> 2298 2298 <table width="100%%"> 2299 2299 2300 2300 <tr><td> </td></tr> 2301 2301 %s … … 2309 2309 """)%(total["value"],regForm.getCurrency(),url,condChecking)) 2310 2310 return "".join(html) 2311 2311 2312 2312 def _getPDInfoHTML(self): 2313 2313 personalData = self._conf.getRegistrationForm().getPersonalData() … … 2349 2349 </tr>""" % (fieldTitle,fieldValue) 2350 2350 return html 2351 2351 2352 2352 def _getFormSections(self): 2353 2353 sects = [] … … 2379 2379 vars["paymentInfo"] = self._getPaymentInfo() 2380 2380 vars["epaymentAnnounce"] = "" 2381 if self._conf.hasEnabledSection("epay") and self._conf.getModPay().isActivated() and self._registrant.doPay(): 2381 if self._conf.hasEnabledSection("epay") and self._conf.getModPay().isActivated() and self._registrant.doPay(): 2382 2382 vars["epaymentAnnounce"] = """<br><font color="black">Please proceed to the <b>payment of your order</b> (by using the "Next" button down this page). You will then receive the payment details.</font>""" 2383 2383 return vars … … 2394 2394 return wc.getHTML() 2395 2395 2396 def _defineSectionMenu( self ): 2396 def _defineSectionMenu( self ): 2397 2397 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 2398 self._sectionMenu.setCurrentItem(self._regFormOpt) 2399 2398 self._sectionMenu.setCurrentItem(self._regFormOpt) 2399 2400 2400 class WRegistrationFormconfirmBooking(wcomponents.WTemplated): 2401 2401 def __init__( self, registrant ): 2402 2402 self._registrant = registrant 2403 self._conf = self._registrant.getConference() 2403 self._conf = self._registrant.getConference() 2404 2404 self.modPay = self._conf.getModPay() 2405 2405 2406 2406 def _getModPayHTML(self): 2407 2407 forms="" 2408 2408 html=[] 2409 2409 2410 2410 regForm = self._conf.getRegistrationForm() 2411 2411 for m in self.modPay.getSortedModPay(): … … 2415 2415 <td></td> 2416 2416 <td><b>%s</b></td> 2417 %s 2417 %s 2418 2418 </tr> 2419 2419 """%(m.getTitle(),m.getFormHTML(self._registrant.getTotal(),regForm.getCurrency(),self._conf,self._registrant)) 2420 2420 #forms=forms+"</table>" 2421 2421 2422 2422 if forms: 2423 2423 html.append( _(""" … … 2432 2432 """)%"".join(forms)) 2433 2433 return "".join(html) 2434 2434 2435 2435 def getVars( self ): 2436 2436 vars = wcomponents.WTemplated.getVars( self ) … … 2455 2455 return wc.getHTML(p) 2456 2456 2457 def _defineSectionMenu( self ): 2457 def _defineSectionMenu( self ): 2458 2458 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 2459 2459 self._sectionMenu.setCurrentItem(self._newRegFormOpt) … … 2479 2479 return wc.getHTML(pars) 2480 2480 2481 def _defineSectionMenu( self ): 2481 def _defineSectionMenu( self ): 2482 2482 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 2483 2483 self._sectionMenu.setCurrentItem(self._viewRegFormOpt) … … 2498 2498 return wc.getHTML() 2499 2499 2500 def _defineSectionMenu( self ): 2500 def _defineSectionMenu( self ): 2501 2501 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 2502 2502 self._sectionMenu.setCurrentItem(self._regFormOpt) … … 2519 2519 return wc.getHTML() 2520 2520 2521 def _defineSectionMenu( self ): 2521 def _defineSectionMenu( self ): 2522 2522 conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 2523 2523 self._sectionMenu.setCurrentItem(self._regFormOpt) … … 2542 2542 vars["endDate"] = self._conf.getRegistrationForm().getEndRegistrationDate().strftime("%A %d %B %Y") 2543 2543 return vars 2544 2544 2545 2545 class WPRegistrationFormConditions(WPBase): 2546 2546
Note: See TracChangeset
for help on using the changeset viewer.
