summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-17 22:22:21 -0600
committerDan McGee <dan@archlinux.org>2010-02-17 22:22:21 -0600
commit548ed9dc75ea7c05f7be355a7efd1398d4cfe422 (patch)
tree47473b544e03cba3ea7f8a9a331bf6df8ae8ec19
parentae5374a7dfa79d27cbcca0046c336a75a86d1341 (diff)
News: make add/edit page form larger
Make both the title entry and the text area a lot larger so it is easier to add and edit news items from the developer side. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--media/arch.css11
-rw-r--r--news/views.py8
-rw-r--r--templates/news/add.html2
3 files changed, 15 insertions, 6 deletions
diff --git a/media/arch.css b/media/arch.css
index 07d2638c..9b4759d3 100644
--- a/media/arch.css
+++ b/media/arch.css
@@ -410,4 +410,13 @@ textarea.vLargeTextField {
.pkgr2 {
background-color: #eee4cb;
}
-
+form#newsform table {
+ width: 100%;
+ max-width: 1024px;
+}
+form#newsform input[type=text] {
+ width: 100%;
+}
+form#newsform textarea {
+ width: 100%;
+}
diff --git a/news/views.py b/news/views.py
index 7aa78c46..d876f0be 100644
--- a/news/views.py
+++ b/news/views.py
@@ -1,9 +1,9 @@
from django import forms
from django.contrib.auth.decorators import permission_required
-from main.models import News
-
from django.views.generic import list_detail, create_update
+from main.models import News
+
def view(request, newsid):
return list_detail.object_detail(request, News.objects.all(), newsid,
template_name="news/view.html",
@@ -37,9 +37,9 @@ def delete(request, newsid):
@permission_required('main.change_news')
def edit(request, newsid):
- return create_update.update_object(request, object_id=newsid,
+ return create_update.update_object(request,
+ object_id=newsid,
form_class=NewsForm,
template_name="news/add.html")
# vim: set ts=4 sw=4 et:
-
diff --git a/templates/news/add.html b/templates/news/add.html
index 80fccc3d..daa75871 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -7,7 +7,7 @@
{% else %}
<h2 class="title">Add News</h2>
{% endif %}
- <form method="post" action=".">
+ <form method="post" id="newsform" action=".">
<table>
{{form}}
<tr>