public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Slava Bacherikov" <slava@bacherikov.org.ua>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/, gpackages/templates/
Date: Thu, 12 Jul 2012 22:16:27 +0000 (UTC)	[thread overview]
Message-ID: <1342126551.504d0c5a41992ec4018d55b01167af17a8bfee21.bacher09@gentoo> (raw)

commit:     504d0c5a41992ec4018d55b01167af17a8bfee21
Author:     Slava Bacherikov <slava <AT> bacher09 <DOT> org>
AuthorDate: Thu Jul 12 19:38:55 2012 +0000
Commit:     Slava Bacherikov <slava <AT> bacherikov <DOT> org <DOT> ua>
CommitDate: Thu Jul 12 20:55:51 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-packages.git;a=commit;h=504d0c5a

Extend arhc choice view

---
 gpackages/apps/packages/widgets.py   |   11 ++++++++---
 gpackages/templates/arch_choice.html |    9 +++++++--
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/gpackages/apps/packages/widgets.py b/gpackages/apps/packages/widgets.py
index 5059601..9bc303d 100644
--- a/gpackages/apps/packages/widgets.py
+++ b/gpackages/apps/packages/widgets.py
@@ -1,3 +1,4 @@
+from __future__ import absolute_import, unicode_literals
 from django import forms
 from django.utils.safestring import mark_safe
 from django.utils.encoding import smart_unicode, force_unicode
@@ -39,9 +40,13 @@ class DivCheckboxSelectMultiple(forms.CheckboxSelectMultiple):
         row2.append('</div>')
         output.extend(row1 + row2)
         output.append('</div>')
-        output.append('<input type="button" id="reset" value="Reset" />')
-        output.append('<input type="button" id="set" value="Set" />')
-        output.append('<input type="button" id="default" value="Default" />')
+        button_group = []
+        button_group.append('<div class="btn-group">')
+        button_group.append('<button type="button" class="btn" id="reset">Reset</button>')
+        button_group.append('<button type="button" class="btn" id="set">Set</button>')
+        button_group.append('<button type="button" class="btn" id="default">Default</button>')
+        button_group.append('</div>')
+        output.extend(button_group)
         return mark_safe('\n'.join(output))
 
     class Media:

diff --git a/gpackages/templates/arch_choice.html b/gpackages/templates/arch_choice.html
index 7af213f..0ebad07 100644
--- a/gpackages/templates/arch_choice.html
+++ b/gpackages/templates/arch_choice.html
@@ -7,8 +7,13 @@
 </script>
 <div class="arches">
 <form action="./" method="post" enctype="multipart/form-data">{% csrf_token %}
-   {{ form.as_ul }} <br />
-    <input type="submit" value="Submit" />
+    {% if form.arches.errors %}
+        <div class="alert alert-error">
+            {{ form.arches.errors }}
+        </div>
+    {% endif %}
+    {{ form.arches }} <br />
+    <input type="submit" class="btn btn-primary" value="Submit" />
 </form>
 </div>
 {% endblock content %}



             reply	other threads:[~2012-07-12 22:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 22:16 Slava Bacherikov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-20 13:03 [gentoo-commits] proj/gentoo-packages:master commit in: gpackages/apps/packages/, gpackages/templates/ Slava Bacherikov
2012-07-19 23:50 Slava Bacherikov
2012-07-19 23:50 Slava Bacherikov
2012-07-12 22:16 Slava Bacherikov
2012-07-10 23:13 Slava Bacherikov
2012-07-08 19:54 Slava Bacherikov
2012-07-08 19:54 Slava Bacherikov
2012-07-08 19:54 Slava Bacherikov
2012-07-06 23:09 Slava Bacherikov
2012-07-06 23:09 Slava Bacherikov
2012-07-04 22:13 Slava Bacherikov
2012-07-02 22:25 Slava Bacherikov
2012-06-30 21:02 Slava Bacherikov
2012-06-30 21:02 Slava Bacherikov
2012-06-30  0:22 Slava Bacherikov
2012-06-29 19:25 Slava Bacherikov
2012-06-28 23:59 Slava Bacherikov
2012-06-27 22:52 Slava Bacherikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342126551.504d0c5a41992ec4018d55b01167af17a8bfee21.bacher09@gentoo \
    --to=slava@bacherikov.org.ua \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox