]> git.ipfire.org Git - ipfire.org.git/commitdiff
planet: Make the publish radio button work.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 19 Dec 2013 19:49:02 +0000 (20:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 19 Dec 2013 19:50:13 +0000 (20:50 +0100)
templates/admin-planet-compose.html
webapp/handlers_admin.py

index 54c791497990d34ff19d61901827fd98b412365e..ec4f19a1598d75795894a136ae41c1a37aaa44b5 100644 (file)
                <hr>
 
                <div class="control-group">
-                       <label class="control-label" for="inputStatus">{{ _("Status") }}</label>
+                       <label class="control-label">{{ _("Status") }}</label>
                        <div class="controls">
                                <label class="radio inline">
-                                       <input type="radio" name="inputStatus" value="draft" {% if not entry or not entry.is_published() %}checked{% end %}>
+                                       <input type="radio" name="status" value="draft" {% if not entry or not entry.is_published() %}checked{% end %}>
                                        {{ _("Draft") }}
                                </label>
                                <label class="radio inline">
-                                       <input type="radio" name="inputStatus" value="published" {% if entry and entry.is_published() %}checked{% end %}>
+                                       <input type="radio" name="status" value="published" {% if entry and entry.is_published() %}checked{% end %}>
                                        {{ _("Published") }}
                                </label>
                        </div>
index 97562c766c552ee964352886e1096efa1ad37976..c8a68dd57d9cde640747e519d274059119a7aacf 100644 (file)
@@ -84,6 +84,7 @@ class AdminPlanetComposeHandler(AdminBaseHandler):
                tags = self.get_argument("tags", "")
 
                status = self.get_argument("status", "draft")
+               assert status in ("draft", "published")
 
                author = self.accounts.find(self.current_user)