Changeset d9fa47 in indico


Ignore:
Timestamp:
06/07/10 16:44:15 (3 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
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
Message:

[FIX] Problem with dates in reg form

Location:
indico/MaKaC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/common/utils.py

    r30b4d4 rd9fa47  
    9696    [ day, month, year ] = str.split("-") 
    9797 
    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)) 
    99103 
    100104def getTextColorFromBackgroundColor(bgcolor): 
  • indico/MaKaC/registration.py

    rf91f1d rd9fa47  
    32393239                raise FormValuesError( _("Departure date cannot be empty.")) 
    32403240            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]) 
    32433245                if ad > dd: 
    32443246                    raise FormValuesError( _("Arrival date has to be earlier than departure date")) 
  • indico/MaKaC/webinterface/pages/registrants.py

    r8174c0 rd9fa47  
    15571557            html.append(""" 
    15581558                        <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"))) 
    15601560        html.append("</select>") 
    15611561        return "".join(html) 
  • indico/MaKaC/webinterface/pages/registrationForm.py

    rbdd862 rd9fa47  
    4242    def _createTabCtrl(self): 
    4343        self._tabCtrl = wcomponents.TabControl() 
    44          
     44 
    4545        self._tabRegFormSetup = self._tabCtrl.newTab( "regformsetup", _("Setup"), \ 
    4646                urlHandlers.UHConfModifRegForm.getURL( self._conf ) ) 
     
    5151        self._tabEPay = self._tabCtrl.newTab( "epay", _("e-payment"), \ 
    5252                urlHandlers.UHConfModifEPayment.getURL( self._conf ) ) 
    53          
     53 
    5454        self._setActiveTab() 
    55          
     55 
    5656        if not self._conf.hasEnabledSection("regForm"): 
    5757            self._tabRegFormSetup.disable() 
     
    6161        if not self._conf.hasEnabledSection("epay"): 
    6262            self._tabEPay.disable() 
    63              
     63 
    6464    def _getPageContent(self, params): 
    6565        self._createTabCtrl() 
    6666        return wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) 
    67      
     67 
    6868    def _getTabContent(self, params): 
    6969        return "nothing" 
    70          
     70 
    7171    def _setActiveSideMenuItem(self): 
    7272        self._regFormMenuItem.setActive() 
    73      
     73 
    7474    def _setActiveTab(self): 
    7575        pass 
    76          
     76 
    7777class WPConfModifRegFormPreview( WPConfModifRegFormBase ): 
    7878    def _setActiveTab( self ): 
    79         self._tabRegistrationPreview.setActive()    
     79        self._tabRegistrationPreview.setActive() 
    8080 
    8181    def _getTabContent( self, params ): 
     
    9292 
    9393class WConfModifRegForm( wcomponents.WTemplated ): 
    94      
     94 
    9595    def __init__( self, conference ): 
    9696        self._conf = conference 
     
    143143                        </tr> 
    144144                        """%(pdfield.getName(), switch) ) 
    145                  
     145 
    146146        html.insert(0, """<table>""") 
    147147        html.append("</table>") 
     
    191191    def _getStatusesHTML(self): 
    192192        regForm=self._conf.getRegistrationForm() 
    193         html=[]         
     193        html=[] 
    194194        for st in regForm.getStatusesList(): 
    195195            urlStatus = urlHandlers.UHConfModifRegFormStatusModif.getURL(self._conf) 
     
    277277 
    278278class WPConfModifRegFormDataModification( WPConfModifRegFormBase ): 
    279      
     279 
    280280    def _getTabContent( self, params ): 
    281281        wc = WConfModifRegFormDataModification(self._conf) 
     
    283283 
    284284class WConfModifRegFormDataModification( wcomponents.WTemplated ): 
    285      
     285 
    286286    def __init__( self, conference ): 
    287287        self._conf = conference 
     
    330330 
    331331class WPConfModifRegFormSectionsBase(WPConfModifRegFormBase): 
    332      
     332 
    333333    def _setActiveSideMenuItem(self): 
    334334        self._regFormMenuItem.setActive(True) 
     
    339339        html = wcomponents.WTabControl( self._tabCtrl, self._getAW() ).getHTML( self._getTabContent( params ) ) 
    340340        return banner+html 
    341      
     341 
    342342class WPConfModifRegFormSessionsBase(WPConfModifRegFormSectionsBase): 
    343      
     343 
    344344    def __init__( self, rh, conference ): 
    345345        WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 
    346         self._targetSection = self._conf.getRegistrationForm().getSessionsForm()  
     346        self._targetSection = self._conf.getRegistrationForm().getSessionsForm() 
    347347 
    348348    def _createTabCtrl( self ): 
     
    354354#            wf.customiseTabCtrl( self._tabCtrl ) 
    355355        self._setActiveTab() 
    356          
     356 
    357357#    def _applyFrame( self, body ): 
    358358#        frame = WRegFormSessionsModifFrame( self._conf, self._getAW() ) 
     
    369369 
    370370#class WRegFormSessionsModifFrame(wcomponents.WTemplated): 
    371 #     
     371# 
    372372#    def __init__(self, conf, aw): 
    373373#        self._conf = conf 
    374374#        self._aw = aw 
    375375#        self._sessions = self._conf.getRegistrationForm().getSessionsForm() 
    376 #     
     376# 
    377377#    def getHTML( self, body, **params ): 
    378378#        params["body"] = body 
    379379#        return wcomponents.WTemplated.getHTML( self, params ) 
    380 #     
     380# 
    381381#    def getVars( self ): 
    382382#        vars = wcomponents.WTemplated.getVars( self ) 
     
    391391#        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    392392#        return wc 
    393 #         
     393# 
    394394#    def getIntermediateVTabPixels( self ): 
    395395#        wc = self.getOwnerComponent() 
    396396#        return 7 + wc.getIntermediateVTabPixels() 
    397 #         
     397# 
    398398#    def getTitleTabPixels( self ): 
    399399#        wc = self.getOwnerComponent() 
    400400#        return wc.getTitleTabPixels() - 7 
    401 #     
     401# 
    402402#    def getCloseHeaderTags( self ): 
    403403#        wc = self.getOwnerComponent() 
     
    405405 
    406406class WPConfModifRegFormSessions( WPConfModifRegFormSessionsBase ): 
    407      
     407 
    408408    def _getTabContent( self, params ): 
    409409        wc = WConfModifRegFormSessions(self._conf) 
     
    415415 
    416416class WConfModifRegFormSessions( wcomponents.WTemplated ): 
    417      
     417 
    418418    def __init__( self, conference ): 
    419419        self._conf = conference 
     
    450450 
    451451class WPConfModifRegFormSessionsDataModif( WPConfModifRegFormSessionsBase ): 
    452      
     452 
    453453    def _getTabContent( self, params ): 
    454454        wc = WConfModifRegFormSessionsDataModif(self._conf) 
     
    458458 
    459459class WConfModifRegFormSessionsDataModif( wcomponents.WTemplated ): 
    460      
     460 
    461461    def __init__( self, conference ): 
    462462        self._conf = conference 
     
    485485 
    486486class WPConfModifRegFormSessionsAdd( WPConfModifRegFormSessionsBase ): 
    487      
     487 
    488488    def _getTabContent( self, params ): 
    489489        wc = WConfModifRegFormSessionsAdd(self._conf) 
     
    496496    def __init__( self, conference ): 
    497497        self._conf = conference 
    498      
     498 
    499499    def _getSessionsHTML(self, sessions): 
    500500        html = [] 
     
    519519 
    520520class WPConfModifRegFormAccommodationBase(WPConfModifRegFormSectionsBase): 
    521      
     521 
    522522    def __init__( self, rh, conference ): 
    523523        WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 
     
    540540 
    541541#class WRegFormAccommodationModifFrame(wcomponents.WTemplated): 
    542 #     
     542# 
    543543#    def __init__(self, conf, aw): 
    544544#        self._conf = conf 
    545545#        self._aw = aw 
    546546#        self._accommodation = self._conf.getRegistrationForm().getAccommodationForm() 
    547 #     
     547# 
    548548#    def getHTML( self, body, **params ): 
    549549#        params["body"] = body 
    550550#        return wcomponents.WTemplated.getHTML( self, params ) 
    551 #     
     551# 
    552552#    def getVars( self ): 
    553553#        vars = wcomponents.WTemplated.getVars( self ) 
     
    562562#        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    563563#        return wc 
    564 #         
     564# 
    565565#    def getIntermediateVTabPixels( self ): 
    566566#        wc = self.getOwnerComponent() 
    567567#        return 7 + wc.getIntermediateVTabPixels() 
    568 #         
     568# 
    569569#    def getTitleTabPixels( self ): 
    570570#        wc = self.getOwnerComponent() 
    571571#        return wc.getTitleTabPixels() - 7 
    572 #     
     572# 
    573573#    def getCloseHeaderTags( self ): 
    574574#        wc = self.getOwnerComponent() 
     
    576576 
    577577class WPConfModifRegFormAccommodation( WPConfModifRegFormAccommodationBase ): 
    578      
     578 
    579579    def _getTabContent( self, params ): 
    580580        wc = WConfModifRegFormAccommodation(self._conf) 
     
    587587 
    588588class WConfModifRegFormAccommodation( wcomponents.WTemplated ): 
    589      
     589 
    590590    def __init__( self, conference ): 
    591591        self._conf = conference 
     
    621621 
    622622class WPConfModifRegFormAccommodationDataModif( WPConfModifRegFormAccommodationBase ): 
    623      
     623 
    624624    def _getTabContent( self, params ): 
    625625        wc = WConfModifRegFormAccommodationDataModif(self._conf) 
     
    629629 
    630630class WConfModifRegFormAccommodationDataModif( wcomponents.WTemplated ): 
    631      
     631 
    632632    def __init__( self, conference ): 
    633633        self._conf = conference 
     
    646646 
    647647class WPConfModifRegFormAccommodationTypeAdd( WPConfModifRegFormAccommodationBase ): 
    648      
     648 
    649649    def _getTabContent( self, params ): 
    650650        wc = WConfModifRegFormAccommodationTypeAdd() 
     
    661661        WPConfModifRegFormAccommodationBase.__init__(self, rh, conf) 
    662662        self._accoType = accoType 
    663      
     663 
    664664    def _getTabContent( self, params ): 
    665665        wc = WConfModifRegFormAccommodationTypeModify(self._accoType) 
     
    672672    def __init__(self, accoType): 
    673673        self._accoType = accoType 
    674      
     674 
    675675    def getVars( self ): 
    676676        vars = wcomponents.WTemplated.getVars(self) 
     
    683683 
    684684class WPConfRemoveAccommodationType(WPConfModifRegFormAccommodationBase): 
    685      
     685 
    686686    def __init__(self, rh, conf, accoTypeIds, accommodationTypes): 
    687687        WPConfModifRegFormAccommodationBase.__init__(self, rh, conf) 
     
    689689        if self._rh.getWebFactory() is not None: 
    690690            self._eventType=self._rh.getWebFactory().getId() 
    691          
     691 
    692692        self._accoTypeIds = accoTypeIds 
    693693        self._accommodationTypes = [] 
     
    695695        for at in accommodationTypes : 
    696696            self._accommodationTypes.append("<li>%s</li>"%at) 
    697      
     697 
    698698    def _setActiveTab( self ): 
    699699        self._tabMain.setActive() 
    700      
     700 
    701701    def _getTabContent( self, params ): 
    702702        msg =  _(""" 
    703703        <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 
    705705        will lose their accomodation info") ) 
    706706              """)%("".join(self._accommodationTypes)) 
     
    712712 
    713713class WPConfModifRegFormFurtherInformationBase(WPConfModifRegFormSectionsBase): 
    714      
     714 
    715715    def __init__( self, rh, conference ): 
    716716        WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 
     
    733733 
    734734#class WRegFormFurtherInformationModifFrame(wcomponents.WTemplated): 
    735 #     
     735# 
    736736#    def __init__(self, conf, aw): 
    737737#        self._conf = conf 
    738738#        self._aw = aw 
    739739#        self._furtherInformation = self._conf.getRegistrationForm().getFurtherInformationForm() 
    740 #     
     740# 
    741741#    def getHTML( self, body, **params ): 
    742742#        params["body"] = body 
    743743#        return wcomponents.WTemplated.getHTML( self, params ) 
    744 #     
     744# 
    745745#    def getVars( self ): 
    746746#        vars = wcomponents.WTemplated.getVars( self ) 
     
    755755#        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    756756#        return wc 
    757 #         
     757# 
    758758#    def getIntermediateVTabPixels( self ): 
    759759#        wc = self.getOwnerComponent() 
    760760#        return 7 + wc.getIntermediateVTabPixels() 
    761 #         
     761# 
    762762#    def getTitleTabPixels( self ): 
    763763#        wc = self.getOwnerComponent() 
    764764#        return wc.getTitleTabPixels() - 7 
    765 #     
     765# 
    766766#    def getCloseHeaderTags( self ): 
    767767#        wc = self.getOwnerComponent() 
     
    769769 
    770770class WPConfModifRegFormFurtherInformation( WPConfModifRegFormFurtherInformationBase ): 
    771      
     771 
    772772    def _getTabContent( self, params ): 
    773773        wc = WConfModifRegFormFurtherInformation(self._conf) 
     
    778778 
    779779class WConfModifRegFormFurtherInformation( wcomponents.WTemplated ): 
    780      
     780 
    781781    def __init__( self, conference ): 
    782782        self._conf = conference 
     
    791791 
    792792class WPConfModifRegFormFurtherInformationDataModif( WPConfModifRegFormFurtherInformationBase ): 
    793      
     793 
    794794    def _getTabContent( self, params ): 
    795795        wc = WConfModifRegFormFurtherInformationDataModif(self._conf) 
     
    799799 
    800800class WConfModifRegFormFurtherInformationDataModif( wcomponents.WTemplated ): 
    801      
     801 
    802802    def __init__( self, conference ): 
    803803        self._conf = conference 
     
    812812 
    813813class WPConfModifRegFormReasonParticipationBase(WPConfModifRegFormSectionsBase): 
    814      
     814 
    815815    def __init__( self, rh, conference ): 
    816816        WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 
     
    833833 
    834834#class WRegFormReasonParticipationModifFrame(wcomponents.WTemplated): 
    835 #     
     835# 
    836836#    def __init__(self, conf, aw): 
    837837#        self._conf = conf 
    838838#        self._aw = aw 
    839839#        self._reasonParticipation = self._conf.getRegistrationForm().getReasonParticipationForm() 
    840 #     
     840# 
    841841#    def getHTML( self, body, **params ): 
    842842#        params["body"] = body 
    843843#        return wcomponents.WTemplated.getHTML( self, params ) 
    844 #     
     844# 
    845845#    def getVars( self ): 
    846846#        vars = wcomponents.WTemplated.getVars( self ) 
     
    855855#        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    856856#        return wc 
    857 #         
     857# 
    858858#    def getIntermediateVTabPixels( self ): 
    859859#        wc = self.getOwnerComponent() 
    860860#        return 7 + wc.getIntermediateVTabPixels() 
    861 #         
     861# 
    862862#    def getTitleTabPixels( self ): 
    863863#        wc = self.getOwnerComponent() 
    864864#        return wc.getTitleTabPixels() - 7 
    865 #     
     865# 
    866866#    def getCloseHeaderTags( self ): 
    867867#        wc = self.getOwnerComponent() 
     
    869869 
    870870class WPConfModifRegFormReasonParticipation( WPConfModifRegFormReasonParticipationBase ): 
    871      
     871 
    872872    def _getTabContent( self, params ): 
    873873        wc = WConfModifRegFormReasonParticipation(self._conf) 
     
    878878 
    879879class WConfModifRegFormReasonParticipation( wcomponents.WTemplated ): 
    880      
     880 
    881881    def __init__( self, conference ): 
    882882        self._conf = conference 
     
    891891 
    892892class WPConfModifRegFormReasonParticipationDataModif( WPConfModifRegFormReasonParticipationBase ): 
    893      
     893 
    894894    def _getTabContent( self, params ): 
    895895        wc = WConfModifRegFormReasonParticipationDataModif(self._conf) 
     
    899899 
    900900class WConfModifRegFormReasonParticipationDataModif( wcomponents.WTemplated ): 
    901      
     901 
    902902    def __init__( self, conference ): 
    903903        self._conf = conference 
     
    912912 
    913913class WPConfModifRegFormSocialEventBase(WPConfModifRegFormSectionsBase): 
    914      
     914 
    915915    def __init__( self, rh, conference ): 
    916916        WPConfModifRegFormSectionsBase.__init__(self, rh, conference) 
     
    933933 
    934934#class WRegFormSocialEventModifFrame(wcomponents.WTemplated): 
    935 #     
     935# 
    936936#    def __init__(self, conf, aw): 
    937937#        self._conf = conf 
    938938#        self._aw = aw 
    939939#        self._socialEvent = self._conf.getRegistrationForm().getSocialEventForm() 
    940 #     
     940# 
    941941#    def getHTML( self, body, **params ): 
    942942#        params["body"] = body 
    943943#        return wcomponents.WTemplated.getHTML( self, params ) 
    944 #     
     944# 
    945945#    def getVars( self ): 
    946946#        vars = wcomponents.WTemplated.getVars( self ) 
     
    955955#        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    956956#        return wc 
    957 #         
     957# 
    958958#    def getIntermediateVTabPixels( self ): 
    959959#        wc = self.getOwnerComponent() 
    960960#        return 7 + wc.getIntermediateVTabPixels() 
    961 #         
     961# 
    962962#    def getTitleTabPixels( self ): 
    963963#        wc = self.getOwnerComponent() 
    964964#        return wc.getTitleTabPixels() - 7 
    965 #     
     965# 
    966966#    def getCloseHeaderTags( self ): 
    967967#        wc = self.getOwnerComponent() 
     
    969969 
    970970class WPConfModifRegFormSocialEvent( WPConfModifRegFormSocialEventBase ): 
    971      
     971 
    972972    def _getTabContent( self, params ): 
    973973        wc = WConfModifRegFormSocialEvent(self._conf) 
     
    980980 
    981981class WConfModifRegFormSocialEvent( wcomponents.WTemplated ): 
    982      
     982 
    983983    def __init__( self, conference ): 
    984984        self._conf = conference 
     
    10141014 
    10151015class WPConfModifRegFormSocialEventDataModif( WPConfModifRegFormSocialEventBase ): 
    1016      
     1016 
    10171017    def _getTabContent( self, params ): 
    10181018        wc = WConfModifRegFormSocialEventDataModif(self._conf) 
     
    10221022 
    10231023class WConfModifRegFormSocialEventDataModif( wcomponents.WTemplated ): 
    1024      
     1024 
    10251025    def __init__( self, conference ): 
    10261026        self._conf = conference 
     
    10371037 
    10381038class WPConfModifRegFormSocialEventAdd( WPConfModifRegFormSocialEventBase ): 
    1039      
     1039 
    10401040    def _getTabContent( self, params ): 
    10411041        wc = WConfModifRegFormSocialEventAdd() 
     
    10521052        WPConfModifRegFormSocialEventBase.__init__(self, rh, conf) 
    10531053        self._socialEventItem = socialEventItem 
    1054      
     1054 
    10551055    def _getTabContent( self, params ): 
    10561056        wc = WConfModifRegFormSocialEventItemModify(self._socialEventItem) 
     
    10631063    def __init__(self, socialEventItem): 
    10641064        self._socialEventItem = socialEventItem 
    1065      
     1065 
    10661066    def getVars( self ): 
    10671067        vars = wcomponents.WTemplated.getVars(self) 
     
    10781078 
    10791079class WPConfRemoveSocialEvent(WPConfModifRegFormSocialEventBase): 
    1080      
     1080 
    10811081    def __init__(self, rh, conf, socialEventIds, eventNames): 
    10821082        WPConfModifRegFormSocialEventBase.__init__(self, rh, conf) 
     
    10881088        if self._rh.getWebFactory() is not None: 
    10891089            self._eventType=self._rh.getWebFactory().getId() 
    1090      
     1090 
    10911091    def _setActiveTab( self ): 
    10921092        self._tabMain.setActive() 
    1093      
     1093 
    10941094    def _getTabContent( self, params ): 
    10951095        msg =  _(""" 
    10961096        <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 
    10981098        will lose their social event info") ) 
    10991099              """)%("".join(self._eventNames)) 
     
    11051105 
    11061106class WPConfModifRegFormStatusesRemConfirm(WPConfModifRegFormBase): 
    1107      
     1107 
    11081108    def __init__(self,rh,target, stids): 
    11091109        WPConfModifRegFormBase.__init__(self, rh, target) 
    11101110        self._statusesIds=stids 
    1111      
     1111 
    11121112    def _getTabContent(self,params): 
    11131113        wc=wcomponents.WConfirmation() 
     
    11271127 
    11281128class WPConfModifRegFormGeneralSectionRemConfirm(WPConfModifRegFormBase): 
    1129      
     1129 
    11301130    def __init__(self,rh,target, gss): 
    11311131        WPConfModifRegFormBase.__init__(self, rh, target) 
    11321132        self._generalSections=gss 
    1133      
     1133 
    11341134    def _getTabContent(self,params): 
    11351135        wc=wcomponents.WConfirmation() 
     
    11701170 
    11711171class WRegFormGeneralSectionModifFrame(wcomponents.WTemplated): 
    1172      
     1172 
    11731173    def __init__(self, gs, aw): 
    11741174        self._conf = gs.getConference() 
    11751175        self._aw = aw 
    11761176        self._generalSection = gs 
    1177      
     1177 
    11781178    def getHTML( self, body, **params ): 
    11791179        params["body"] = body 
    11801180        return wcomponents.WTemplated.getHTML( self, params ) 
    1181      
     1181 
    11821182    def getVars( self ): 
    11831183        vars = wcomponents.WTemplated.getVars( self ) 
     
    11921192        wc = wcomponents.WConferenceModifFrame(self._conf, self._aw) 
    11931193        return wc 
    1194          
     1194 
    11951195    def getIntermediateVTabPixels( self ): 
    11961196        wc = self.getOwnerComponent() 
    11971197        return 7 + wc.getIntermediateVTabPixels() 
    1198          
     1198 
    11991199    def getTitleTabPixels( self ): 
    12001200        wc = self.getOwnerComponent() 
    12011201        return wc.getTitleTabPixels() - 7 
    1202      
     1202 
    12031203    def getCloseHeaderTags( self ): 
    12041204        wc = self.getOwnerComponent() 
     
    12061206 
    12071207class WPConfModifRegFormGeneralSection( WPConfModifRegFormGeneralSectionBase ): 
    1208      
     1208 
    12091209    def _getTabContent( self, params ): 
    12101210        wc = WConfModifRegFormGeneralSection(self._generalSectionForm) 
     
    12171217 
    12181218class WConfModifRegFormGeneralSection( wcomponents.WTemplated ): 
    1219      
     1219 
    12201220    def __init__( self, gs ): 
    12211221        self._conf = gs.getConference() 
     
    12351235                spec =  _(""" %s, _("mandatory") """)%spec 
    12361236            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 
    12391239            spec = " %s)</b>"%spec 
    1240           
     1240 
    12411241            # 
    12421242            # add the selection box here for sorting... 
     
    12511251            selbox += """ 
    12521252                </select>""" 
    1253               
     1253 
    12541254            html.append("""<tr> 
    12551255                                <td align="left" style="padding-left:10px">%s<input type="checkbox" name="fieldsIds" value="%s"><a href=%s>%s</a>%s</td> 
     
    12691269 
    12701270class WPConfModifRegFormGeneralSectionDataModif( WPConfModifRegFormGeneralSectionBase ): 
    1271      
     1271 
    12721272    def _getTabContent( self, params ): 
    12731273        wc = WConfModifRegFormGeneralSectionDataModif(self._generalSectionForm) 
     
    12771277 
    12781278class WConfModifRegFormGeneralSectionDataModif( wcomponents.WTemplated ): 
    1279      
     1279 
    12801280    def __init__( self, generalSectionForm ): 
    12811281        self._generalSectionForm = generalSectionForm 
     
    12881288 
    12891289class WPConfModifRegFormGeneralSectionFieldAdd( WPConfModifRegFormGeneralSectionBase ): 
    1290      
     1290 
    12911291    def __init__(self, rh, section, tmpField): 
    12921292        WPConfModifRegFormGeneralSectionBase.__init__(self, rh, section) 
    12931293        self._tmpField=tmpField 
    1294      
     1294 
    12951295    def _getTabContent( self, params ): 
    12961296        wc = WConfModifRegFormGeneralSectionFieldEdit(self._tmpField) 
     
    13001300 
    13011301class WConfModifRegFormGeneralSectionFieldEdit( wcomponents.WTemplated ): 
    1302      
     1302 
    13031303    def __init__( self, generalField=None): 
    13041304        self._generalField = generalField 
     
    13241324        vars["mandatory"] =  """ checked="checked" """ 
    13251325        #vars["billable"]= """ checked="checked" """ 
    1326         #vars["price"]=""                 
     1326        #vars["price"]="" 
    13271327        if self._generalField is not None: 
    13281328            vars["caption"] = quoteattr(self._generalField.getCaption()) 
     
    13311331                vars["mandatory"] =  "" 
    13321332            #if not self._generalField.isBillable(): 
    1333             #    vars["billable"] =  ""                        
     1333            #    vars["billable"] =  "" 
    13341334        vars["inputtypes"]=self._getFieldTypesHTML() 
    13351335        vars["specialOptions"]="" 
     
    13441344        self._sectionField=field 
    13451345        self._tmpField=tmpField 
    1346      
     1346 
    13471347    def _getTabContent( self, params ): 
    13481348        wc = WConfModifRegFormGeneralSectionFieldEdit(self._tmpField) 
     
    13521352 
    13531353class WPConfModifRegFormGeneralSectionFieldRemConfirm(WPConfModifRegFormGeneralSectionBase): 
    1354      
     1354 
    13551355    def __init__(self,rh,gs, fields): 
    13561356        WPConfModifRegFormGeneralSectionBase.__init__(self, rh, gs) 
    13571357        self._fields=fields 
    1358      
     1358 
    13591359    def _getTabContent(self,params): 
    13601360        wc=wcomponents.WConfirmation() 
     
    13801380        self._status=st 
    13811381        self._tempStatus=tmpst 
    1382      
     1382 
    13831383    def _getTabContent( self, params ): 
    13841384        wc = WConfModifRegFormStatusModif(self._status, self._tempStatus) 
    13851385        p = { 
    1386               
     1386 
    13871387             'postURL': quoteattr(str(urlHandlers.UHConfModifRegFormStatusPerformModif.getURL( self._status ))) 
    13881388            } 
     
    13901390 
    13911391class WConfModifRegFormStatusModif( wcomponents.WTemplated ): 
    1392      
     1392 
    13931393    def __init__( self, st, tmpst ): 
    13941394        self._conf = st.getConference() 
     
    14271427        return wc.getHTML(pars) 
    14281428 
    1429     def _defineSectionMenu( self ):  
     1429    def _defineSectionMenu( self ): 
    14301430        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    14311431        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     
    14681468        vars["announcement"] = regForm.getAnnouncement() 
    14691469        vars["title"] = regForm.getTitle() 
    1470         vars["usersLimit"] = ""  
     1470        vars["usersLimit"] = "" 
    14711471        if regForm.getUsersLimit() > 0: 
    14721472            vars["usersLimit"] =  _(""" 
     
    14851485                                """ )%regForm.getContactInfo() 
    14861486        return vars 
    1487      
     1487 
    14881488class WPRegistrationFormDisplay( conferences.WPConferenceDefaultDisplayBase ): 
    14891489    navigationEntry = navigation.NERegistrationFormDisplay 
     
    14941494        return wc.getHTML(pars) 
    14951495 
    1496     def _defineSectionMenu( self ):  
     1496    def _defineSectionMenu( self ): 
    14971497        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    14981498        self._sectionMenu.setCurrentItem(self._newRegFormOpt) 
     
    15031503        self._currentUser = user 
    15041504        self._conf = conf 
    1505      
     1505 
    15061506    def _getWComp(self, sect): 
    15071507        if sect == self._conf.getRegistrationForm().getReasonParticipationForm(): 
     
    15191519            return WConfRegFormSocialEventDisplay(self._conf, self._currentUser) 
    15201520        return WConfRegFormGeneralSectionDisplay(sect, self._currentUser) 
    1521      
     1521 
    15221522    def _getOtherSectionsHTML(self): 
    15231523        regForm=self._conf.getRegistrationForm() 
     
    15571557 
    15581558class WConfRegFormGeneralSectionDisplay(wcomponents.WTemplated): 
    1559      
     1559 
    15601560    def __init__(self, gs, currentUser): 
    15611561        self._generalSection = gs 
     
    15911591        vars["fields"]=self._getFieldsHTML(miscGroup) 
    15921592        return vars 
    1593          
     1593 
    15941594class WConfRegFormPersonalDataDisplay(wcomponents.WTemplated): 
    15951595 
     
    16231623                    inputHTML += """<option value="%s" %s>%s</option>"""%(ck, selected, CountryHolder().getCountryById(ck)) 
    16241624                inputHTML = """<select name="%s">%s</select>"""%(item.getId(), inputHTML) 
    1625                  
     1625 
    16261626        else: 
    16271627            inputHTML = """<input type="%s" name="%s" size="40" value="%s">"""%(item.getInput(), item.getId(), value) 
     
    16541654 
    16551655class WConfRegFormReasonParticipationDisplay(wcomponents.WTemplated): 
    1656      
     1656 
    16571657    def __init__(self, conf, currentUser): 
    16581658        self._conf = conf 
     
    17641764 
    17651765class WConfRegFormAccommodationDisplay(wcomponents.WTemplated): 
    1766      
     1766 
    17671767    def __init__(self, conf, currentUser): 
    17681768        self._conf = conf 
     
    17951795            html.append(""" 
    17961796                        <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"))) 
    17981798        html.append("</select>") 
    17991799        return "".join(html) 
     
    18131813                                        <td align="left" style="padding-left:10px"><input type="radio" name="accommodationType" value="%s" %s>%s%s</td> 
    18141814                                    </tr> 
    1815                                 """%(atype.getId(), selected, atype.getCaption(), placesLeft ) )   
     1815                                """%(atype.getId(), selected, atype.getCaption(), placesLeft ) ) 
    18161816                else: 
    18171817                    html.append("""<tr> 
     
    18311831                        """)%(currentAccoType.getCaption() ) ) 
    18321832        return "".join(html) 
    1833          
     1833 
    18341834 
    18351835    def getVars(self): 
     
    18561856 
    18571857class WConfRegFormSocialEventDisplay(wcomponents.WTemplated): 
    1858      
     1858 
    18591859    def __init__(self, conf, currentUser): 
    18601860        self._conf = conf 
     
    18861886                placesLeft = "" 
    18871887                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() 
    18891889                inputType="checkbox" 
    18901890                if self._socialEvent.getSelectionTypeId() == "unique": 
    18911891                    inputType="radio" 
    18921892                html.append("""<tr> 
    1893                                     <td align="left" nowrap style="padding-left:10px"><input type="%s" name="socialEvents" value="%s" %s>%s&nbsp;&nbsp;  
     1893                                    <td align="left" nowrap style="padding-left:10px"><input type="%s" name="socialEvents" value="%s" %s>%s&nbsp;&nbsp; 
    18941894                                    </td> 
    18951895                                    <td width="100%%" align="left"> 
     
    19161916                            """%(se.getCaption(), cancelledReason ) ) 
    19171917        return "".join(html) 
    1918          
     1918 
    19191919 
    19201920    def getVars(self): 
     
    19311931 
    19321932class WConfRegFormFurtherInformationDisplay(wcomponents.WTemplated): 
    1933      
     1933 
    19341934    def __init__(self, conf): 
    19351935        self._conf = conf 
     
    19481948        return wc.getHTML() 
    19491949 
    1950     def _defineSectionMenu( self ):  
     1950    def _defineSectionMenu( self ): 
    19511951        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    19521952        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     
    19621962        return wc.getHTML() 
    19631963 
    1964     def _defineSectionMenu( self ):  
     1964    def _defineSectionMenu( self ): 
    19651965        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    19661966        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     
    19821982        return wc.getHTML() 
    19831983 
    1984     def _defineSectionMenu( self ):  
     1984    def _defineSectionMenu( self ): 
    19851985        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    19861986        self._sectionMenu.setCurrentItem(self._regFormOpt) 
    19871987 
    1988          
    1989          
     1988 
     1989 
    19901990class WConfRegistrationFormCreationDone(wcomponents.WTemplated): 
    19911991 
     
    21352135                    <tr> 
    21362136                      <td style="color:black"><b>%s</b></td> 
    2137                       <td bgcolor="white" class="blacktext">%s</td>  
     2137                      <td bgcolor="white" class="blacktext">%s</td> 
    21382138                    </tr> 
    21392139                    <tr> 
     
    22012201        html.append("</table>") 
    22022202        return "".join(html) 
    2203          
    2204     def _getMiscInfoItemsHTMLBilllable(self, gsf,total):   
     2203 
     2204    def _getMiscInfoItemsHTMLBilllable(self, gsf,total): 
    22052205        regForm = self._conf.getRegistrationForm() 
    22062206        miscGroup=self._registrant.getMiscellaneousGroupById(gsf.getId()) 
     
    22202220                        #caption=miscItem.getValue() 
    22212221                        value=miscItem.getValue() 
    2222                         price=string.atof(miscItem.getPrice())    
     2222                        price=string.atof(miscItem.getPrice()) 
    22232223                        quantity=miscItem.getQuantity() 
    2224                         total["value"]+=price*quantity             
     2224                        total["value"]+=price*quantity 
    22252225                if value != "": 
    22262226                    value=":%s"%value 
    2227                 if(quantity>0):     
     2227                if(quantity>0): 
    22282228                    html.append(""" 
    22292229                            <tr> 
     
    22342234                            </tr> 
    22352235                            """%(quantity,gsf.getTitle(),caption,value,price,price*quantity,currency) ) 
    2236         return "".join(html)                 
    2237          
     2236        return "".join(html) 
     2237 
    22382238 
    22392239    def _getMiscellaneousInfoHTML(self, gsf): 
     
    22662266                                <td style="color:black;padding-right:10px" nowrap ><b>_("Unit Price")</b></td> 
    22672267                                <td style="color:black"><b> _("Cost")</b></td> 
    2268                             </tr>                         
     2268                            </tr> 
    22692269                        """)) 
    22702270            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 
    22732273            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 
    22772277            condChecking="" 
    22782278            if modPay.hasPaymentConditions(): 
     
    22852285                                    <td><br></td> 
    22862286                                </tr>"""%str(urlHandlers.UHConfRegistrationFormConditions.getURL(self._conf)) 
    2287      
     2287 
    22882288            html.append( _(""" 
    22892289                            <tr>&nbsp;</tr> 
     
    22972297                            <tr> 
    22982298                              <table width="100%%"> 
    2299                                  
     2299 
    23002300                                <tr><td>&nbsp;</td></tr> 
    23012301                                %s 
     
    23092309                            """)%(total["value"],regForm.getCurrency(),url,condChecking)) 
    23102310        return "".join(html) 
    2311              
     2311 
    23122312    def _getPDInfoHTML(self): 
    23132313        personalData = self._conf.getRegistrationForm().getPersonalData() 
     
    23492349                            </tr>""" % (fieldTitle,fieldValue) 
    23502350        return html 
    2351      
     2351 
    23522352    def _getFormSections(self): 
    23532353        sects = [] 
     
    23792379        vars["paymentInfo"]  = self._getPaymentInfo() 
    23802380        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(): 
    23822382            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>""" 
    23832383        return vars 
     
    23942394        return wc.getHTML() 
    23952395 
    2396     def _defineSectionMenu( self ):  
     2396    def _defineSectionMenu( self ): 
    23972397        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    2398         self._sectionMenu.setCurrentItem(self._regFormOpt)         
    2399          
     2398        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     2399 
    24002400class WRegistrationFormconfirmBooking(wcomponents.WTemplated): 
    24012401    def __init__( self, registrant ): 
    24022402        self._registrant = registrant 
    2403         self._conf = self._registrant.getConference()   
     2403        self._conf = self._registrant.getConference() 
    24042404        self.modPay = self._conf.getModPay() 
    2405      
     2405 
    24062406    def _getModPayHTML(self): 
    24072407        forms="" 
    24082408        html=[] 
    2409          
     2409 
    24102410        regForm = self._conf.getRegistrationForm() 
    24112411        for m in self.modPay.getSortedModPay(): 
     
    24152415                <td></td> 
    24162416                <td><b>%s</b></td> 
    2417                 %s                    
     2417                %s 
    24182418                </tr> 
    24192419                """%(m.getTitle(),m.getFormHTML(self._registrant.getTotal(),regForm.getCurrency(),self._conf,self._registrant)) 
    24202420        #forms=forms+"</table>" 
    2421              
     2421 
    24222422        if forms: 
    24232423            html.append( _(""" 
     
    24322432                """)%"".join(forms)) 
    24332433        return "".join(html) 
    2434                  
     2434 
    24352435    def getVars( self ): 
    24362436        vars = wcomponents.WTemplated.getVars( self ) 
     
    24552455        return wc.getHTML(p) 
    24562456 
    2457     def _defineSectionMenu( self ):  
     2457    def _defineSectionMenu( self ): 
    24582458        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    24592459        self._sectionMenu.setCurrentItem(self._newRegFormOpt) 
     
    24792479        return wc.getHTML(pars) 
    24802480 
    2481     def _defineSectionMenu( self ):  
     2481    def _defineSectionMenu( self ): 
    24822482        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    24832483        self._sectionMenu.setCurrentItem(self._viewRegFormOpt) 
     
    24982498        return wc.getHTML() 
    24992499 
    2500     def _defineSectionMenu( self ):  
     2500    def _defineSectionMenu( self ): 
    25012501        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    25022502        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     
    25192519        return wc.getHTML() 
    25202520 
    2521     def _defineSectionMenu( self ):  
     2521    def _defineSectionMenu( self ): 
    25222522        conferences.WPConferenceDefaultDisplayBase._defineSectionMenu(self) 
    25232523        self._sectionMenu.setCurrentItem(self._regFormOpt) 
     
    25422542        vars["endDate"] = self._conf.getRegistrationForm().getEndRegistrationDate().strftime("%A %d %B %Y") 
    25432543        return vars 
    2544      
     2544 
    25452545class WPRegistrationFormConditions(WPBase): 
    25462546 
Note: See TracChangeset for help on using the changeset viewer.