Changeset - a4255c7e5101
[Not reviewed]
0 2 0
Paul Visscher - 11 years ago 2013-02-21 18:34:54
paulv@canonical.org
Add subscription form to the top right of the site (possibly all pages).

I was only able to get the site running on my local machine well enough to test the main page. It's possible, based on the filename, that the changes will appear on all Conservancy pages. I'm not sure if that is what is wanted or not. If not, it seems like some more invasive changes would need to be made to the base template so that the form would only appear on the index page.

The form POSTs to a mailman url. Once submitted, the user is redirected to the mailman site with no obvious way (aside from the back button) to return to the main site. This can be fixed by using AJAX to POST the form and report the subscription status back to the user, but it would likely require parsing the mailman html as there doesn't appear to be any real API to mailman.

I tested this in Firefox 11.0 and Chrome 18.0.1025.113 beta.
2 files changed with 12 insertions and 0 deletions:
0 comments (0 inline, 0 general)
www/conservancy/static/conservancy.css
Show inline comments
...
 
@@ -243,4 +243,11 @@ body.conservancy-sponsors #navbar ul li.sponsors a /* NO COMMA HERE! */
 
  text-align: center;
 
  list-style: none;
 
  margin-right: 5px;
 

	
 
#subbox {
 
   position: absolute;
 
   padding-top: 10px;
 
   right: 0px;
 
   width: 200px;
 
   font-size: 12px;
 
}
www/conservancy/templates/base_conservancy.html
Show inline comments
...
 
@@ -15,6 +15,11 @@
 
  <body class="conservancy-{% block category %}other{% endblock %}">
 
    <div id="conservancyheader">
 
      <h1><span id="logobutton"><a href="/">Software Freedom Conservancy</a></span></h1>
 
      <span id="subbox">
 
        <form method="post" action="http://lists.sfconservancy.org/mailman/subscribe/announce">
 
          Subscribe to our announcements mailing list<br/><input name="email" placeholder="joe@example.org"/><input type="submit" name="email-button" value="Subscribe"/>
 
        </form>
 
      </span>
 
    </div>
 
    <div id="navbar-outer">
 
      <div id="navbar">
0 comments (0 inline, 0 general)