• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Events and Subscribers > Step 4: Providing a View for the Mail Subs...

Step 4: Providing a View for the Mail Subscription

The last piece you have to provide is a view to manage the subscriptions via the Web. The page template (browser/subscriptions.pt) could look like this:

01 <html metal:use-macro="context/@@standard_macros/view">
02   <body>
03     <div metal:fill-slot="body" i18n:domain="messageboard">
04 
05       <form action="changeSubscriptions.html" method="post">
06 
07         <div class="row">
08             <div class="label" 
09                 i18n:translate="">Current Subscriptions</div>
10             <div class="field">
11            <div tal:repeat="email view/subscriptions">
12                 <input type="checkbox" name="remails:list" 
13                        value="" tal:attributes="value email">
14                 <div tal:replace="email">zope3@zope3.org</div>
15               </div>
16               <input type="submit" name="REMOVE" value="Remove" 
17                    i18n:attributes="value remove-button">
18             </div>
19         </div>
20 
21         <div class="row">
22             <div class="label" i18n:translate="">
23               Enter new Users (separate by 'Return')
24             </div>
25             <div class="field">
26            <textarea name="emails" cols="40" rows="10"></textarea>
27             </div>
28         </div>
29 
30              <div class="row">
31                <div class="controls">
32                  <input type="submit" value="Refresh" 
33                 i18n:attributes="value refresh-button" />
34                  <input type="submit" name="ADD" value="Add" 
35                      i18n:attributes="value add-button" />
36                </div>
37              </div>
38 
39       </form>
40 
41     </div>
42   </body>
43 </html>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint