allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [09/10] allura git commit: [#8024] ticket:884 fix checkbox, add placeholder for page_tool_type
Date Fri, 08 Jan 2016 18:02:39 GMT
[#8024] ticket:884 fix checkbox, add placeholder for page_tool_type


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/fffcb88d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/fffcb88d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/fffcb88d

Branch: refs/heads/master
Commit: fffcb88d374cd965e7a85c60ccf70de0057b3e42
Parents: b14217d
Author: Denis Kotov <deniskkotov@gmail.com>
Authored: Wed Jan 6 15:19:59 2016 +0200
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Fri Jan 8 12:18:12 2016 -0500

----------------------------------------------------------------------
 Allura/allura/controllers/site_admin.py                |  2 +-
 .../site_admin_site_notifications_create_update.html   | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/fffcb88d/Allura/allura/controllers/site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py
index d18248a..b543f3e 100644
--- a/Allura/allura/controllers/site_admin.py
+++ b/Allura/allura/controllers/site_admin.py
@@ -464,7 +464,7 @@ class SiteNotificationController(object):
     @expose()
     @require_post()
     @validate(v.CreateSiteNotificationSchema(), error_handler=new)
-    def create(self, active, impressions, content, user_role, page_regex, page_tool_type):
+    def create(self, impressions, content, user_role, page_regex, page_tool_type, active=False):
         """Post a new note"""
         M.notification.SiteNotification(
             active=active, impressions=impressions, content=content,

http://git-wip-us.apache.org/repos/asf/allura/blob/fffcb88d/Allura/allura/templates/site_admin_site_notifications_create_update.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/site_admin_site_notifications_create_update.html b/Allura/allura/templates/site_admin_site_notifications_create_update.html
index 3acf0bb..e02284e 100644
--- a/Allura/allura/templates/site_admin_site_notifications_create_update.html
+++ b/Allura/allura/templates/site_admin_site_notifications_create_update.html
@@ -34,14 +34,17 @@
   }
   form > div input,
   form > div textarea,
-  form > div select,
   form > .input {
     display: block;
-    width: 300px;
     -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
     box-sizing: border-box;
   }
+  form > div  input:not([type="checkbox"]),
+  form > div textarea,
+  form > .input {
+    width: 300px;
+  }
   form > div label {
     width: 100px;
   }
@@ -68,7 +71,7 @@
   <div>
     <label>Active</label>
     <div class="input">
-      <input type="checkbox" name="active" value="yes" {%- if not form_values -%} checked
{%- elif form_values|length and form_values.get('active') -%} checked {% endif %}>
+      <input type="checkbox" name="active" value="yes" {%- if not form_values|length -%}
checked {%- elif form_values.get('active') == 'True' -%} checked {% endif %}>
     </div>
     {{error('active')}}
   </div>
@@ -96,14 +99,14 @@
   <div>
     <label>Page Regex</label>
     <div class="input">
-      <input name="page_regex" value="{{form_values.get('page_regex', '')}}" />
+      <input name="page_regex" value="{{form_values.get('page_regex', '')}}" placeholder="e.g.
(Home|browse_pages)"/>
     </div>
     {{error('page_regex')}}
   </div>
   <div>
     <label>Page Type</label>
     <div class="input">
-      <input name="page_tool_type" value="{{form_values.get('page_tool_type', '')}}" />
+      <input name="page_tool_type" value="{{form_values.get('page_tool_type', '')}}" placeholder="e.g.
Wiki, Tickets"/>
     </div>
     {{error('page_tool_type')}}
   </div>


Mime
View raw message