Changeset 8ca1b0 in indico


Ignore:
Timestamp:
02/17/11 17:20:11 (2 years ago)
Author:
Pedro Ferreira <jose.pedro.ferreira@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
e6d9f55
Parents:
e92836
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (01/18/11 16:30:15)
git-committer:
Pedro Ferreira <jose.pedro.ferreira@…> (02/17/11 17:20:11)
Message:

[IMP] Add option for notification sender address

  • defaults to support or noreply address
Location:
indico/MaKaC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/registration.py

    re92836 r8ca1b0  
    126126        form.setActivated(self.isActivated()) 
    127127        form.setMandatoryAccount(self.isMandatoryAccount()) 
     128        form.setNotificationSender(self.getNotificationSender()) 
    128129        form.setSendRegEmail(self.isSendRegEmail()) 
    129130        form.setSendReceiptEmail(self.isSendReceiptEmail()) 
     
    206207    def setMandatoryAccount(self, v=True): 
    207208        self._mandatoryAccount = v 
     209 
     210    def setNotificationSender(self, sender): 
     211        self._notificationSender = sender 
     212 
     213    def getNotificationSender(self): 
     214        sender = None 
     215        try: 
     216            if self._notificationSender: 
     217                sender = self._notificationSender 
     218        except AttributeError, e: 
     219            pass 
     220        if not sender: 
     221            self._notificationSender = self._conf.getSupportEmail(returnNoReply=True).split(',', 1)[0] 
     222        return self._notificationSender 
    208223 
    209224    def isSendRegEmail(self): 
     
    728743            Creates an email to be sent to the user after registration 
    729744        """ 
    730         fromAddr=regForm.getConference().getSupportEmail(returnNoReply=True) 
     745        fromAddr = regForm.getNotificationSender() 
    731746        url = urlHandlers.UHConferenceDisplay.getURL(regForm.getConference()) 
    732747 
     
    789804        if not registrant.getConference().getModPay().isEnableSendEmailPaymentDetails(): 
    790805            return 
    791         fromAddr=registrant.getConference().getSupportEmail(returnNoReply=True) 
     806        fromAddr = regForm.getNotificationSender() 
    792807        date=registrant.getConference().getStartDate() 
    793808        getTitle=strip_ml_tags(registrant.getConference().getTitle()) 
     
    862877 
    863878    def sendEmailNewRegistrantConfirmPay(self, regForm,registrant): 
    864         fromAddr=registrant.getConference().getSupportEmail(returnNoReply=True) 
     879        fromAddr = regForm.getNotificationSender() 
    865880        date=registrant.getConference().getStartDate() 
    866881        getTitle=strip_ml_tags(registrant.getConference().getTitle()) 
     
    929944 
    930945    def sendEmailModificationRegistrant(self, regForm, rp): 
    931         fromAddr=regForm.getConference().getSupportEmail(returnNoReply=True) 
     946        fromAddr = regForm.getNotificationSender() 
    932947        subject= _("""Registration modified for '%s': %s""")%(strip_ml_tags(regForm.getConference().getTitle()), rp.getFullName()) 
    933948        body= _(""" 
  • indico/MaKaC/webinterface/pages/registrationForm.py

    rab85b3 r8ca1b0  
    214214        vars["disablePic"]=quoteattr(str(Configuration.Config.getInstance().getSystemIconURL( "disabledSection" ))) 
    215215        if regForm.isActivated(): 
     216            vars["activated"] = True 
    216217            vars["changeTo"] = "False" 
    217218            vars["status"] =  _("ENABLED") 
     
    253254            if not regForm.isMandatoryAccount(): 
    254255                vars["mandatoryAccount"] =  _("No") 
     256            vars["notificationSender"] = regForm.getNotificationSender() 
    255257            vars["sendRegEmail"] = _("Yes") 
    256258            if not regForm.isSendRegEmail(): 
     
    264266            vars["Currency"]=regForm.getCurrency() 
    265267        else: 
     268            vars["activated"] = False 
    266269            vars["changeTo"] = "True" 
    267270            vars["status"] =_("DISABLED") 
     
    279282            vars["notification"] = "" 
    280283            vars["mandatoryAccount"] = "" 
     284            vars["notificationSender"] = "" 
    281285            vars["sendRegEmail"] = "" 
    282286            vars["sendReceiptEmail"] = "" 
     
    340344        if regForm.isMandatoryAccount(): 
    341345            vars["mandatoryAccount"]= "CHECKED" 
     346        vars["notificationSender"] = regForm.getNotificationSender() 
    342347        vars["sendRegEmail"] = "" 
    343348        vars["sendReceiptEmail"] = "" 
  • indico/MaKaC/webinterface/rh/registrationFormModif.py

    rab85b3 r8ca1b0  
    127127            regForm.getNotification().setCCList( utils.getEmailList(params.get("ccList", "")) ) 
    128128            regForm.setMandatoryAccount(params.has_key("mandatoryAccount")) 
     129            regForm.setNotificationSender(params["notificationSender"]) 
    129130            regForm.setSendRegEmail(params.has_key("sendRegEmail")) 
    130131            regForm.setSendReceiptEmail(params.has_key("sendReceiptEmail")) 
  • indico/MaKaC/webinterface/tpls/ConfModifRegForm.tpl

    rab85b3 r8ca1b0  
    6666  </tr> 
    6767  <tr> 
     68    <td class="dataCaptionTD"><span class="dataCaptionFormat"> <%= _("Email notification sender address")%></span></td> 
     69    <td class="blacktext"> 
     70      %(notificationSender)s 
     71    </td> 
     72  </tr> 
     73  <tr> 
    6874    <td class="dataCaptionTD"><span class="dataCaptionFormat"> <%= _("Email notification (on new registrations)")%></span></td> 
    6975    <td class="blacktext"> 
     
    7278  </tr> 
    7379  <tr> 
    74     <td class="dataCaptionTD"><span class="dataCaptionFormat"> <%= _("Email registrant:")%></span></td> 
     80    <td class="dataCaptionTD"><span class="dataCaptionFormat"> <%= _("Email registrant")%></span></td> 
    7581    <td bgcolor="white" width="100%%"> 
     82      <% if activated: %> 
    7683      <table> 
    7784        <tr> 
     
    8895        </tr> 
    8996      </table> 
     97      <% end %> 
    9098    </td> 
    9199  </tr> 
  • indico/MaKaC/webinterface/tpls/ConfModifRegFormDataModification.tpl

    rab85b3 r8ca1b0  
    8686    </tr> 
    8787    <tr> 
     88      <td nowrap class="titleCellTD"><span class="titleCellFormat"> <%= _("Email notification sender address")%></span></td> 
     89      <td bgcolor="white" width="100%%"><input type="text" size="50" name="notificationSender" value="%(notificationSender)s"></td> 
     90    </tr> 
     91    <tr> 
    8892      <td nowrap class="titleCellTD"> 
    8993        <span class="titleCellFormat"> <%= _("Email organisators")%></span><br> 
Note: See TracChangeset for help on using the changeset viewer.