aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/Page.pm8
-rwxr-xr-xweb/index.cgi24
2 files changed, 13 insertions, 19 deletions
diff --git a/perllib/Page.pm b/perllib/Page.pm
index 6ea00db5d..6d7572470 100644
--- a/perllib/Page.pm
+++ b/perllib/Page.pm
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: Page.pm,v 1.118 2008-10-10 15:44:49 matthew Exp $
+# $Id: Page.pm,v 1.119 2008-10-13 11:22:36 matthew Exp $
#
package Page;
@@ -137,12 +137,6 @@ sub header ($%) {
<html lang="en-gb">
<head>
<script type="text/javascript" src="/yui/utilities.js"></script>
-<!--
- <script type="text/javascript" src="/jslib/swfupload/swfupload.js"></script>
- <script type="text/javascript" src="/jslib/swfupload/FileProgress.js"></script>
- <script type="text/javascript" src="/jslib/swfupload/swfupload.graceful_degradation.js"></script>
- <script type="text/javascript" src="/jslib/swfupload/swfupload_handlers.js"></script>
--->
<script type="text/javascript" src="/js.js"></script>
<title>${title}FixMyStreet</title>
<style type="text/css">\@import url("/css/core.css"); \@import url("/css/main.css");</style>
diff --git a/web/index.cgi b/web/index.cgi
index 207503b41..1a1d3da1a 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -6,7 +6,7 @@
# Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved.
# Email: matthew@mysociety.org. WWW: http://www.mysociety.org
#
-# $Id: index.cgi,v 1.216 2008-10-11 12:37:13 matthew Exp $
+# $Id: index.cgi,v 1.217 2008-10-13 11:22:36 matthew Exp $
use strict;
use Standard;
@@ -471,9 +471,9 @@ sub display_form {
# Look up categories for this council or councils
my $category = '';
my %council_ok;
+ my $categories = select_all("select area_id, category from contacts
+ where deleted='f' and area_id in (" . join(',', @$all_councils) . ')');
if ($q->{site} ne 'emptyhomes') {
- my $categories = select_all("select area_id, category from contacts
- where deleted='f' and area_id in (" . join(',', @$all_councils) . ')');
@$categories = sort { $a->{category} cmp $b->{category} } @$categories;
my @categories;
foreach (@$categories) {
@@ -486,19 +486,19 @@ sub display_form {
}
if (@categories) {
@categories = ('-- Pick a category --', @categories, _('Other'));
- $category = $q->div($q->label({'for'=>'form_category'}, _('Category:')),
- $q->popup_menu(-name=>'category', -values=>\@categories,
- -attributes=>{id=>'form_category'})
- );
+ $category = _('Category:');
}
} else {
+ foreach (@$categories) {
+ $council_ok{$_->{area_id}} = 1;
+ }
my @categories = ('-- Pick a property type --', 'Empty house or bungalow', 'Empty flat or maisonette', 'Whole block of empty flats', 'Empty office or other commercial', 'Empty pub or bar', 'Empty public building - school, hospital, etc.');
- $category = $q->div($q->label({'for'=>'form_category'}, _('Property type:')),
- $q->popup_menu(-name=>'category', -values=>\@categories,
- -attributes=>{id=>'form_category'})
- );
- $council_ok{$all_councils->[0]} = 1;
+ $category = _('Property type:');
}
+ $category = $q->div($q->label({'for'=>'form_category'}, $category),
+ $q->popup_menu(-name=>'category', -values=>\@categories,
+ -attributes=>{id=>'form_category'})
+ ) if $category;
my @councils = keys %council_ok;
my $details;