diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/make_css | 9 | ||||
-rwxr-xr-x | bin/send-reports | 15 |
2 files changed, 20 insertions, 4 deletions
diff --git a/bin/make_css b/bin/make_css index 27cbec1b5..c362fda97 100755 --- a/bin/make_css +++ b/bin/make_css @@ -14,11 +14,14 @@ DIRECTORY=$(cd `dirname $0`/../web && pwd) # FixMyStreet uses compass -compass compile --output-style compressed $DIRECTORY/cobrands/fixmystreet -compass compile --output-style compressed $DIRECTORY/cobrands/bromley +NEWSTYLE="fixmystreet bromley fixmybarangay" +NEWSTYLE_REGEX=${NEWSTYLE// /\\|} +for site in $NEWSTYLE; do + compass compile --output-style compressed $DIRECTORY/cobrands/$site +done # The rest are plain sass -for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\(fixmystreet\|bromley\)"` +for scss in `find $DIRECTORY -name "*.scss" -exec dirname {} \; | uniq | grep -v "cobrands/\($NEWSTYLE_REGEX\)"` do sass --scss --update --style compressed $scss done diff --git a/bin/send-reports b/bin/send-reports index eb881d169..17fe225a4 100755 --- a/bin/send-reports +++ b/bin/send-reports @@ -38,6 +38,10 @@ use constant SEND_FAIL_RETRIES_CUTOFF => 3; use constant COUNCIL_ID_BARNET => 2489; use constant COUNCIL_ID_EAST_HANTS => 2330; +# FMB aka FixMyBarangay numbers +use constant FMB_ID_LUZ => 1; # barangay Luz +use constant FMB_ID_BSN => 2; # barangay Basak San Nicolas + use constant MAX_LINE_LENGTH => 132; # send_method config values found in by-area config data, for selecting to appropriate method @@ -250,7 +254,7 @@ while (my $row = $unsent->next) { if (mySociety::Config::get('STAGING_SITE')) { # on a staging server send emails to ourselves rather than the councils # ...webservice calls will only go through if explictly allowed here: - my @testing_councils = (COUNCIL_ID_BARNET); + my @testing_councils = (COUNCIL_ID_BARNET, FMB_ID_LUZ, FMB_ID_BSN); unless (grep {$row->council eq $_} @testing_councils) { @recips = ( mySociety::Config::get('CONTACT_EMAIL') ); $send_method = 0; @@ -338,6 +342,11 @@ while (my $row = $unsent->next) { $row->user->name( $row->user->id . ' ' . $row->user->name ); } + if ($cobrand eq 'fixmybarangay') { + # FixMyBarangay endpoints expect external_id as an attribute + $row->extra( [ { 'name' => 'external_id', 'value' => $row->id } ] ); + } + my $resp = $open311->send_service_request( $row, \%h, $contact->email ); # make sure we don't save user changes from above @@ -345,6 +354,10 @@ while (my $row = $unsent->next) { $row->discard_changes(); } + if ($cobrand eq 'fixmybarangay') { + $row->discard_changes(); + } + if ( $resp ) { $row->external_id( $resp ); $result *= 0; |