Changeset 3908a4 in indico


Ignore:
Timestamp:
06/17/10 16:21:52 (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, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 4c7d4152dff271ba5df5a8606605969cab454080
Children:
336d4e
Parents:
cd05ca
git-author:
Ian Rolewicz <ian.rolewicz@…> (04/29/10 14:15:07)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (06/17/10 16:21:52)
Message:

[IMP] Multiple emails for booking contact email

  • fixes #270
  • Now more than one email address can be specified in the "Booked for" Email input field, as long as they are valid and are separated by commas, semicolons or whitespaces
  • All notification emails are now sent to the contact email in addition of the creator.
  • Additional email templates were added for notifying the addresses of the 'notification email' custom attribute field
  • Now the users can specify more than one email address for the room custom attribute 'notification email'
Location:
indico/MaKaC
Files:
2 added
12 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/rb_reservation.py

    rcd05ca r3908a4  
    6767 
    6868# Room booking module notifications will be send to this e-mail when debug is on 
    69 EMAIL_FOR_DEBUG_NOTIFICATIONS = "jose.benito.gonzalez@cern.ch" 
     69EMAIL_FOR_DEBUG_NOTIFICATIONS = "" 
    7070EMAIL_FROM_PREFIX = "noreply-" 
    7171 
     
    142142        emails = [] 
    143143        # ---- Email creator and contact ---- 
     144 
    144145        if self.createdByUser(): # Imported bookings does not have creator 
    145146            to = self.createdByUser().getEmail() 
    146             to2 = "" 
    147             if self.contactEmail != None and self.contactEmail != "": 
    148                 to2 = self.contactEmail 
     147            firstName = self.createdByUser().getFirstName() 
     148 
     149            to2 = self._getContactEmailList() 
     150 
    149151            if self.isConfirmed: 
    150152                subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] You have made a New Booking on " + formatDateTime(self.startDT) 
     
    153155                subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Your PRE-Booking waits for Acceptance" 
    154156                wc = WTemplated( 'RoomBookingEmail_2UserAfterPreBookingInsertion' ) 
    155             text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self } ) 
     157            text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'firstName':firstName } ) 
    156158            fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
    157159            addrs = [] 
     
    159161                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    160162            else: 
    161                 addrs.append( to ) 
    162                 if to2 != "" and to != to2: 
    163                     addrs.append( to2 ) 
     163                if to : 
     164                    addrs.append( to ) 
     165                    if to in to2: 
     166                        to2.remove(to) 
     167                addrs.extend(to2) 
    164168                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    165169                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     
    170174 
    171175        toMain = self.room.getResponsible().getEmail() 
     176        toCustom = self._getNotificationEmailList() 
    172177 
    173178        if self.isConfirmed: 
     
    188193            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    189194                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    190             if self.room.customAtts.get( 'notification email', None ): 
    191                 addrs.append(self.room.customAtts.get( 'notification email' ).strip()) 
     195            if toMain in toCustom : 
     196                toCustom.remove( toMain ) 
     197            addrs.extend( toCustom ) 
    192198        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    193199        emails.append(maildata) 
     
    238244        if self.createdByUser(): # Imported bookings does not have creator 
    239245            to = self.createdByUser().getEmail() 
     246            firstName = self.createdByUser().getFirstName() 
     247 
     248            to2 = self._getContactEmailList() 
     249 
    240250            subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Cancellation Confirmation on " + startDate + " %s" % occurrenceText 
    241251            wc = WTemplated( 'RoomBookingEmail_2UserAfterBookingCancellation' ) 
    242             text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'date':date } ) 
     252            text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'date':date, 'firstName':firstName } ) 
    243253            fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
    244254            addrs = [] 
     
    246256                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    247257            else: 
    248                 addrs.append( to ) 
     258                if to : 
     259                    addrs.append( to ) 
     260                    if to in to2: 
     261                        to2.remove(to) 
     262                addrs.extend(to2) 
    249263                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    250264                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     
    255269 
    256270        toMain = self.room.getResponsible().getEmail() 
     271        toCustom = self._getNotificationEmailList() 
    257272 
    258273        subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Cancelled Booking on " + startDate + " %s" % occurrenceText 
     
    267282            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    268283                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    269             if self.room.customAtts.get( 'notification email', None ): 
    270                 addrs.append(self.room.customAtts.get( 'notification email' ).strip()) 
     284            if toMain in toCustom : 
     285                toCustom.remove( toMain ) 
     286            addrs.extend( toCustom ) 
    271287        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    272288        emails.append(maildata) 
     
    303319        reason = self.rejectionReason or reason 
    304320 
    305         # Fix by David: include date in this mails too. I have put a try...except in case the date is not accessible in this method 
    306         try: 
    307             startDate = formatDateTime(self.startDT) 
    308         except: 
    309             startDate = "" 
     321        if date: 
     322            occurrenceText = " (SINGLE OCCURRENCE)" 
     323            startDate = formatDate(date) 
     324        else: 
     325            occurrenceText = "" 
     326            # Fix by David: include date in this mails too. I have put a try...except in case the date is not accessible in this method 
     327            try: 
     328                startDate = formatDateTime(self.startDT) 
     329            except: 
     330                startDate = "" 
    310331 
    311332        # ---- Email user ---- 
    312333 
    313         to = firstName = None 
    314334        if self.createdByUser(): # Imported bookings does not have creator 
    315335            to = self.createdByUser().getEmail() 
    316336            firstName = self.createdByUser().getFirstName() 
    317         else: 
    318             to = self.contactEmail 
    319             firstName = "User" 
    320  
    321         if to: 
    322             subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] REJECTED Booking on " + startDate 
     337 
     338            to2 = self._getContactEmailList() 
     339 
     340            subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] REJECTED Booking on " + startDate + " %s" % occurrenceText 
    323341            wc = WTemplated( 'RoomBookingEmail_2UserAfterBookingRejection' ) 
    324342            text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'firstName':firstName, 'reason':reason, 'date':date } ) 
     
    328346                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    329347            else: 
    330                 addrs.append( to ) 
     348                if to : 
     349                    addrs.append(to) 
     350                    if to in to2: 
     351                        to2.remove(to) 
     352                addrs.extend(to2) 
    331353                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    332354                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    333355            maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    334356            emails.append(maildata) 
     357 
     358        # ---- Email responsible ---- 
     359 
     360        toCustom = self._getNotificationEmailList() 
     361 
     362        subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Rejected Booking on " + startDate + " %s" % occurrenceText 
     363        wc = WTemplated( 'RoomBookingEmail_2ResponsibleAfterBookingRejection' ) 
     364        text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'date':date, 'reason':reason } ) 
     365        fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
     366        addrs = [] 
     367        if debug: 
     368            addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
     369        else: 
     370            addrs.extend( toCustom ) 
     371            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
     372                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     373        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
     374        emails.append(maildata) 
     375 
    335376        return emails 
    336377 
     
    353394        # ---- Email user ---- 
    354395 
    355         to = firstName = None 
    356396        if self.createdByUser(): # Imported bookings does not have creator 
    357397            to = self.createdByUser().getEmail() 
    358398            firstName = self.createdByUser().getFirstName() 
    359         else: 
    360             to = self.contactEmail 
    361             firstName = "User" 
    362  
    363         if to: 
     399 
     400            to2 = self._getContactEmailList() 
     401 
    364402            subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Confirmed Booking on " + startDate 
    365403            wc = WTemplated( 'RoomBookingEmail_2UserAfterBookingConfirmation' ) 
     
    370408                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    371409            else: 
    372                 addrs.append( to ) 
     410                if to : 
     411                    addrs.append(to) 
     412                    if to in to2: 
     413                        to2.remove(to) 
     414                addrs.extend(to2) 
    373415                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    374416                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    375417            maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    376418            emails.append(maildata) 
     419 
     420        # ---- Email responsible ---- 
     421 
     422        toCustom = self._getNotificationEmailList() 
     423 
     424        subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Confirmed Booking on " + startDate 
     425        wc = WTemplated( 'RoomBookingEmail_2ResponsibleAfterBookingConfirmation' ) 
     426        text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self } ) 
     427        fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
     428        addrs = [] 
     429        if debug: 
     430            addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
     431        else: 
     432            addrs.extend( toCustom ) 
     433            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
     434                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     435        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
     436        emails.append(maildata) 
    377437 
    378438        # ---- Email AVC Support ---- 
     
    416476        if self.createdByUser(): # Imported bookings does not have creator 
    417477            to = self.createdByUser().getEmail() 
     478            firstName = self.createdByUser().getFirstName() 
     479 
     480            to2 = self._getContactEmailList() 
     481 
    418482            subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Booking Modified on " + startDate 
    419483            wc = WTemplated( 'RoomBookingEmail_2UserAfterBookingModification' ) 
    420             text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self } ) 
     484            text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'firstName':firstName } ) 
    421485            fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
    422486            addrs = [] 
     
    424488                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    425489            else: 
    426                 addrs.append( to ) 
     490                if to : 
     491                    addrs.append(to) 
     492                    if to in to2: 
     493                        to2.remove(to) 
     494                addrs.extend(to2) 
    427495                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    428496                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     
    433501 
    434502        toMain = self.room.getResponsible().getEmail() 
     503        toCustom = self._getNotificationEmailList() 
    435504 
    436505        subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Booking Modified on " + startDate 
     
    445514            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    446515                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    447             if self.room.customAtts.get( 'notification email', None ): 
    448                 addrs.append(self.room.customAtts.get( 'notification email' ).strip()) 
     516            if toMain in toCustom : 
     517                toCustom.remove( toMain ) 
     518            addrs.extend( toCustom ) 
    449519        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    450520        emails.append(maildata) 
     
    489559 
    490560        # ---- Email user ---- 
     561 
    491562        if self.createdByUser(): # Imported bookings does not have creator 
    492563            to = self.createdByUser().getEmail() 
     564            firstName = self.createdByUser().getFirstName() 
     565 
     566            to2 = self._getContactEmailList() 
     567 
    493568            subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Request for Booking Prolongation on " + startDate 
    494569            wc = WTemplated( 'RoomBookingEmail_2UserRequestProlongation' ) 
    495             text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self } ) 
     570            text = TEST_VERSION_WARNING + wc.getHTML( { 'reservation':self, 'firstName':firstName } ) 
    496571            fromAddr = EMAIL_FROM_PREFIX+HelperMaKaCInfo.getMaKaCInfoInstance().getSupportEmail() 
    497572            addrs = [] 
     
    499574                addrs.append( EMAIL_FOR_DEBUG_NOTIFICATIONS ) 
    500575            else: 
    501                 addrs.append( to ) 
     576                if to : 
     577                    addrs.append(to) 
     578                    if to in to2: 
     579                        to2.remove(to) 
     580                addrs.extend(to2) 
    502581                if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    503582                    addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
     
    519598 
    520599        toMain = self.room.getResponsible().getEmail() 
     600        toCustom = self._getNotificationEmailList() 
    521601 
    522602        subject = NOTIFICATION_SUBJECT_PREFIX + " [" + self.room.getFullName() + "] Consider Rejecting This Booking" 
     
    531611            if EMAIL_FOR_CATCH_ALL_NOTIFICATIONS: 
    532612                addrs.append( EMAIL_FOR_CATCH_ALL_NOTIFICATIONS ) 
    533             if self.room.customAtts.get( 'notification email', None ): 
    534                 addrs.append(self.room.customAtts.get( 'notification email' ).strip()) 
     613            if toMain in toCustom : 
     614                toCustom.remove( toMain ) 
     615            addrs.extend( toCustom ) 
    535616        maildata = { "fromAddr": fromAddr, "toList": addrs, "subject": subject, "body": text } 
    536617        emails.append(maildata) 
     
    13331414        return ReservationGUID( Location.parse( self.locationName ), self.id ) 
    13341415 
     1416    def _getContactEmailList( self ): 
     1417        """ 
     1418        Util method used for returning the contact emails in a list in case 
     1419        the contact email string contains more than one address 
     1420        """ 
     1421        if self.contactEmail != None and self.contactEmail != "": 
     1422            return self.contactEmail.split(",") 
     1423        else : 
     1424            return [] 
     1425 
     1426    def _getNotificationEmailList( self ): 
     1427        """ 
     1428        Util method used for returning the notification emails in a list in case 
     1429        the notification email custom attribute string contains more than one address 
     1430        """ 
     1431        addrs = [] 
     1432        addr = self.room.customAtts.get( 'notification email', "" ).strip() 
     1433        if addr: 
     1434                addrs = addr.split(',') 
     1435 
     1436        return addrs 
     1437 
    13351438    def _eval_str( self, s ): 
    13361439        ixPrv = 0 
  • indico/MaKaC/webinterface/rh/roomBooking.py

    rcd05ca r3908a4  
    2929from MaKaC.webinterface.rh.base import RHProtected, RoomBookingDBMixin 
    3030from datetime import datetime, timedelta 
    31 from MaKaC.common.utils import HolidaysHolder 
     31from MaKaC.common.utils import HolidaysHolder, validMail, setValidEmailSeparators 
    3232from MaKaC.common.datetimeParser import parse_date 
    3333 
     
    240240        manager = CrossLocationQueries.getCustomAttributesManager( c.locationName ) 
    241241        for ca in manager.getAttributes( location = c.locationName ): 
     242            if ca['name'] == 'notification email' : 
     243                if c.customAtts[ 'notification email' ] and not validMail(c.customAtts['notification email']) : 
     244                    errors.append( "Invalid format for the notification email" ) 
    242245            if ca['required']: 
    243246                if not c.customAtts.has_key( ca['name'] ): # not exists 
     
    297300            value = session.getVar( "cattr_" + ca['name'] ) 
    298301            if value != None: 
    299                 candRoom.customAtts[ ca['name'] ] = value 
     302                if ca['name'] == 'notification email' : 
     303                    candRoom.customAtts[ 'notification email' ] = setValidEmailSeparators(value) 
     304                else : 
     305                    candRoom.customAtts[ ca['name'] ] = value 
    300306 
    301307 
     
    340346            if k.startswith( "cattr_" ): 
    341347                attrName = k[6:len(k)] 
    342                 candRoom.customAtts[attrName] = v 
     348                if attrName == 'notification email' : 
     349                    candRoom.customAtts['notification email'] = setValidEmailSeparators(v) 
     350                else : 
     351                    candRoom.customAtts[attrName] = v 
    343352 
    344353    # Resv 
     
    415424        candResv.bookedForName = session.getVar( "bookedForName" ) 
    416425        candResv.contactPhone = session.getVar( "contactPhone" ) 
    417         candResv.contactEmail = session.getVar( "contactEmail" ) 
     426        candResv.contactEmail = setValidEmailSeparators(session.getVar( "contactEmail" )) 
    418427        candResv.reason = session.getVar( "reason" ) 
    419428        candResv.usesAVC = session.getVar( "usesAVC" ) 
     
    446455        candResv.repeatability = self._repeatability 
    447456        candResv.bookedForName = params["bookedForName"] 
    448         candResv.contactEmail = params["contactEmail"] 
     457        candResv.contactEmail = setValidEmailSeparators(params["contactEmail"]) 
    449458        candResv.contactPhone = params["contactPhone"] 
    450459        candResv.reason = params["reason"] 
  • indico/MaKaC/webinterface/tpls/RoomBookingBookingForm.tpl

    rf25ab4 r3908a4  
    5555        isValid = required_fields( ['bookedForName', 'contactEmail', 'reason'] ) && isValid 
    5656 
    57         if ( !valid_email( $F( 'contactEmail' ) ) ) 
     57        if ( !Util.Validation.isEmailList( $F( 'contactEmail' ) ) ) 
    5858        { 
    5959            isValid = false 
     
    185185                                            <td align="left" class="blacktext"> 
    186186                                                <input type="text" id="contactEmail" name="contactEmail" style="width: 240px;" value="<%= verbose( candResv.contactEmail )%>" /> 
    187                                                 <% inlineContextHelp( '<b>Required.</b> Contact email.' ) %> 
     187                                                <% inlineContextHelp( '<b>Required.</b> Contact email. You can specify more than one email address by separating them with commas, semicolons or whitespaces.' ) %> 
    188188                                            </td> 
    189189                                        </tr> 
  • indico/MaKaC/webinterface/tpls/RoomBookingDetails.tpl

    rcd05ca r3908a4  
    184184                                        <tr> 
    185185                                            <td align="right" valign="top"><small> <%= _("E-mail")%>&nbsp;&nbsp;</small></td> 
    186                                             <td align="left" class="blacktext"><a style="font-weight: normal" href="mailto:<%= verbose( reservation.contactEmail ) %>"><%= reservation.contactEmail %></a></td> 
     186                                            <td align="left" class="blacktext"><a style="font-weight: normal" href="mailto:<%= verbose( reservation.contactEmail ) %>"><%= reservation.contactEmail.replace(',',', ') %></a></td> 
    187187                                        </tr> 
    188188                                        <tr> 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserAfterBookingCancellation.tpl

    r9033fd r3908a4  
    1 Dear <%= reservation.createdByUser().getFirstName() %>, 
     1Dear <%= firstName %>, 
    22 
    33 
     
    1010 
    1111<%= urlHandlers.UHRoomBookingBookingDetails.getURL( reservation ) %> 
    12 Room: <%= reservation.room.getFullName() %>  
     12Room: <%= reservation.room.getFullName() %> 
    1313For:  <%= reservation.bookedForName %> 
    1414Reason: <%= reservation.reason %> 
    15 Dates:  
     15Dates: 
    1616<% if date: %> 
    17 <%= formatDate(date) %>  
     17<%= formatDate(date) %> 
    1818<% end %> 
    1919<% else: %> 
    20 <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %>  
     20<%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %> 
    2121<% end %> 
    2222Hours: <%= reservation.startDT.strftime("%H:%M") %> -- <%= reservation.endDT.strftime("%H:%M") %> 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserAfterBookingInsertion.tpl

    r747504 r3908a4  
    66<%end%> 
    77 
    8 Dear <%= reservation.createdByUser().getFirstName() %>, 
     8Dear <%= firstName %>, 
    99 
    1010 
    11 The conference room <%= reservation.room.getFullName() %>  
     11The conference room <%= reservation.room.getFullName() %> 
    1212has been booked for <%= reservation.bookedForName %> 
    1313reason: <%= reservation.reason %> 
     
    1717This is the final confirmation. 
    1818 
    19 NOTE: please be aware that in special (rare) cases the person  
    20 responsible for this room may reject your booking. In that case,  
     19NOTE: please be aware that in special (rare) cases the person 
     20responsible for this room may reject your booking. In that case, 
    2121you will be instantly notified by e-mail. 
    2222 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserAfterBookingModification.tpl

    r9033fd r3908a4  
    1 Dear <%= reservation.createdByUser().getFirstName() %>, 
     1Dear <%= firstName %>, 
    22 
    33 
    44Your booking has been MODIFIED. 
    55 
    6 Room: <%= reservation.room.getFullName() %>  
     6Room: <%= reservation.room.getFullName() %> 
    77For:  <%= reservation.bookedForName %> 
    88Reason: <%= reservation.reason %> 
    9 Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %>  
     9Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %> 
    1010Hours: <%= reservation.startDT.strftime("%H:%M") %> -- <%= reservation.endDT.strftime("%H:%M") %> 
    1111 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserAfterBookingRejection.tpl

    r9033fd r3908a4  
    1  Dear <%= firstName %>, 
     1Dear User, 
    22 
    33 
    4  Your booking has been REJECTED by the person responsible for a room. 
     4Your booking has been REJECTED by the person responsible for a room. 
    55 
    6 Room: <%= reservation.room.getFullName() %>  
     6Room: <%= reservation.room.getFullName() %> 
    77For:  <%= reservation.bookedForName %> 
    88<% if date: %> 
    9  Date: <%= date %> ( ONLY THIS DAY IS REJECTED) 
     9Date: <%= date %> ( ONLY THIS DAY IS REJECTED) 
    1010<% end %> 
    1111<% if not date: %> 
    12 Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %>  
     12Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %> 
    1313<% end %> 
    1414Hours: <%= reservation.startDT.strftime("%H:%M") %> -- <%= reservation.endDT.strftime("%H:%M") %> 
    1515 
    16  Rejection reason: 
     16Rejection reason: 
    1717<%= reason %> 
    1818 
    1919 
    20  BTW, you can always check your bookings here: 
     20BTW, you can always check your bookings here: 
    2121<%= urlHandlers.UHRoomBookingBookingList.getURL( onlyMy = True ) %> 
    2222<% includeTpl( 'RoomBookingEmail_Footer' ) %> 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserAfterPreBookingInsertion.tpl

    r747504 r3908a4  
    1  Dear <%= reservation.createdByUser().getFirstName() %>, 
     1 Dear <%= firstName %>, 
    22 
    33 
    4  NOTE:  
     4 NOTE: 
    55Your pre-booking is NOT YET ACCEPTED by person responsible. 
    66Please be aware that pre-bookings are subject to acceptance 
    7 or rejection. Expect an e-mail with acceptance/rejection  
     7or rejection. Expect an e-mail with acceptance/rejection 
    88information. 
    99 
    1010INFO: 
    11 The conference room <%= reservation.room.getFullName() %>  
     11The conference room <%= reservation.room.getFullName() %> 
    1212has been pre-booked for <%= reservation.bookedForName %> 
    1313reason: <%= reservation.reason %> 
  • indico/MaKaC/webinterface/tpls/RoomBookingEmail_2UserRequestProlongation.tpl

    r9033fd r3908a4  
    1 Dear <%= reservation.createdByUser().getFirstName() %>, 
     1Dear <%= firstName %>, 
    22 
    33 
     
    77 
    88<%= urlHandlers.UHRoomBookingBookingDetails.getURL( reservation ) %> 
    9 Room: <%= reservation.room.getFullName() %>  
     9Room: <%= reservation.room.getFullName() %> 
    1010For:  <%= reservation.bookedForName %> 
    1111Reason: <%= reservation.reason %> 
    12 Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %>  
     12Dates: <%= formatDate(reservation.startDT.date()) %> -- <%= formatDate(reservation.endDT.date()) %> 
    1313Hours: <%= reservation.startDT.strftime("%H:%M") %> -- <%= reservation.endDT.strftime("%H:%M") %> 
    1414 
  • indico/MaKaC/webinterface/tpls/RoomBookingRoomForm.tpl

    rf0c866 r3908a4  
    237237                                            <td class="subFieldWidth" align="right" valign="top"><small><%=ca['name']%>&nbsp;&nbsp;</small></td> 
    238238                                            <td align="left" class="blacktext"><input type="text" name="cattr_<%=ca['name']%>" value=<%= quoteattr(verbose( room.customAtts.get( ca['name'] ) )) %> /> 
    239                                             <% if ca['required']: %> 
     239                                            <% if ca['name'] == 'notification email' : %> 
     240                                                <% if ca['required'] : %> 
     241                                                    <% inlineContextHelp( '<b>Required.</b> You can specify more than one email address separated by commas, semicolons or whitespaces.' ) %> 
     242                                                <% end %> 
     243                                                <% else : %> 
     244                                                    <% inlineContextHelp( 'You can specify more than one email address separated by commas, semicolons or whitespaces.' ) %> 
     245                                                <% end %> 
     246                                            <% end %> 
     247                                            <% elif ca['required'] : %> 
    240248                                                <% inlineContextHelp( '<b>Required.</b>' ) %> 
    241249                                            <% end %> 
  • indico/MaKaC/webinterface/wcomponents.py

    r96485d r3908a4  
    64946494            if not attribute.get("hidden",False) or self._rh._getUser().isAdmin(): 
    64956495                vars["attrs"][attribute['name']] = self._rh._room.customAtts.get(attribute['name'],"") 
     6496                if attribute['name'] == 'notification email' : 
     6497                    vars["attrs"][attribute['name']] = vars["attrs"][attribute['name']].replace(',', ', ') 
    64966498        vars["config"] = Config.getInstance() 
    64976499        #vars["roomPhoto"] = urlHandlers.UHSendRoomPhoto.getURL( self._rh._room.photoId, small = False ) 
Note: See TracChangeset for help on using the changeset viewer.