You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2016/01/08 11:43:14 UTC
[4/9] allura git commit: [#8024] ticket:884 fix checkbox,
add placeholder for page_tool_type
[#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/f0603f56
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f0603f56
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f0603f56
Branch: refs/heads/ib/8024a
Commit: f0603f56c404a4cba45237834e8d997ba98916fe
Parents: 11e74e1
Author: Denis Kotov <de...@gmail.com>
Authored: Wed Jan 6 15:19:59 2016 +0200
Committer: Denis Kotov <de...@gmail.com>
Committed: Thu Jan 7 21:41:21 2016 +0200
----------------------------------------------------------------------
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/f0603f56/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/f0603f56/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>