Use POST for data-changing forms, GET otherwise
authorW. Trevor King <wking@drexel.edu>
Wed, 21 Jul 2010 18:20:16 +0000 (14:20 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 21 Jul 2010 18:20:20 +0000 (14:20 -0400)
Also float the recipe list tag-selection form to the right.

cookbook/template/recipe.html
cookbook/template/recipes.html

index e65a15e5aff84d3d6c92a5630d334ef043391e25..b335014c490928b6e75dc920b41a392436f432e7 100644 (file)
        </span><br />
     {% endif %}
     </p>
-    <form action="add_tag" method="get">
+    <form action="add_tag" method="post">
       <input type="hidden" name="name" value="{{ recipe.name }}"/>
       <input type="text" name="tag" value=""/>
       <input type="submit" value="Add tag" />
     </form>
-    <form action="remove_tag" method="get">
+    <form action="remove_tag" method="post">
       <input type="hidden" name="name" value="{{ recipe.name }}"/>
       <input type="text" name="tag" value=""/>
       <input type="submit" value="Remove tag" />
index 52e2fedd5a2c8f3a6657737b27b33f38b23dc935..a9bfc073453871265711af16b5931b58fc243b65 100644 (file)
@@ -5,12 +5,12 @@
 {% endblock %}
 
 {% block content %}
-    <form action="">
+    <form action="" method="get" style="float:right;">
       <select name="tag" size="5" multiple="multiple">
        {% for tag in cookbook.tags() %}
        <option value="{{ tag }}">{{ tag }}</option>
        {% endfor %}
-      </select>
+      </select><br />
       <input type="submit" value="Show only selected tags" />
     </form>
     <ul id="recipe-list">