allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [10/37] git commit: [#5749] ticket:504 Fix radio buttons selection
Date Mon, 16 Dec 2013 22:16:10 GMT
[#5749] ticket:504 Fix radio buttons selection


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

Branch: refs/heads/db/5424
Commit: c09bb8ff891678e560156694f12504b9196f0723
Parents: 2f4e88e
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Mon Dec 16 13:32:38 2013 +0200
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Dec 16 17:28:01 2013 +0000

----------------------------------------------------------------------
 Allura/allura/lib/widgets/form_fields.py                | 12 ++++++++++--
 .../forgetracker/templates/tracker/admin_fields.html    |  1 -
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c09bb8ff/Allura/allura/lib/widgets/form_fields.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/form_fields.py b/Allura/allura/lib/widgets/form_fields.py
index 58e3cc9..c53e342 100644
--- a/Allura/allura/lib/widgets/form_fields.py
+++ b/Allura/allura/lib/widgets/form_fields.py
@@ -218,9 +218,17 @@ class SubmitButton(ew.SubmitButton):
     attrs={'class':'ui-state-default ui-button ui-button-text'}
 
 
-class Radio(ew.InputField):
+class Radio(ew.Checkbox):
+    template=ew_core.render.Snippet('''<input {% if value %} checked{% endif %} {{widget.j2_attrs({
+        'id':id,
+        'type':field_type,
+        'name':rendered_name,
+        'class':css_class,
+        'readonly':readonly,
+        'value':value},
+        attrs)}}>''', 'jinja2')
     defaults=dict(
-        ew.InputField.defaults,
+        ew.Checkbox.defaults,
         field_type='radio')
 
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c09bb8ff/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/admin_fields.html b/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
index 899c8ee..88bffb8 100644
--- a/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
+++ b/ForgeTracker/forgetracker/templates/tracker/admin_fields.html
@@ -62,7 +62,6 @@
 {% block extra_js %}
 <script type="text/javascript">
     $(document).ready(function () {
-        $(":radio.default-milestone[value='on']").attr("checked", true);
         $(":radio.default-milestone").click(function(){
             $(":radio.default-milestone").attr("checked", false);
             $(this).attr("checked", true);


Mime
View raw message