aboutsummaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/cobrands/fixmystreet.com/base.scss29
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js8
-rw-r--r--web/cobrands/fixmystreet/images/padlock.pngbin0 -> 148 bytes
-rw-r--r--web/cobrands/fixmystreet/images/padlock.svg1
-rw-r--r--web/cobrands/fixmystreet/images/padlock@2.pngbin0 -> 243 bytes
-rw-r--r--web/cobrands/hart/hart.scss12
-rw-r--r--web/cobrands/oxfordshire/layout.scss11
-rw-r--r--web/cobrands/sass/_base.scss190
-rw-r--r--web/cobrands/sass/_dropzone.scss11
-rw-r--r--web/cobrands/sass/_h5bp.scss4
10 files changed, 143 insertions, 123 deletions
diff --git a/web/cobrands/fixmystreet.com/base.scss b/web/cobrands/fixmystreet.com/base.scss
index 366ebc451..869654b87 100644
--- a/web/cobrands/fixmystreet.com/base.scss
+++ b/web/cobrands/fixmystreet.com/base.scss
@@ -106,35 +106,6 @@
}
}
-.unresponsive-council-warning {
- margin: 1em -1em;
- padding: 2em 2em;
- background-color: mix(#fff, $primary, 70%);
-
- h1 {
- font-size: 1.4em;
- }
-
- p {
- margin-bottom: 0.5em;
- }
-
- a {
- display: inline-block;
- margin-top: 0.5em;
- padding: 0.5em 1em;
- background-color: #000;
- color: #fff;
- border-radius: 0.3em;
-
- &:hover,
- &:focus {
- text-decoration: none;
- background-color: mix(#000, $primary, 70%);
- }
- }
-}
-
.unresponsive-council__header {
padding-bottom: 1em;
border-bottom: 1px solid #ccc;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index d6e967bc3..8d45e4017 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -382,9 +382,11 @@ $.extend(fixmystreet.set_up, {
$.getJSON('/report/new/category_extras', args, function(data) {
var $category_meta = $('#category_meta');
+ $('#js-councils_text').html(data.councils_text);
+ $('#js-councils_text_private').html(data.councils_text_private);
if ( data.category_extra ) {
if ( $category_meta.length ) {
- $category_meta.html( data.category_extra );
+ $category_meta.replaceWith( data.category_extra );
} else {
$('#form_category_row').after( data.category_extra );
}
@@ -875,7 +877,9 @@ fixmystreet.update_pin = function(lonlat, savePushState) {
}
$('#side-form, #site-logo').show();
var old_category = $("select#form_category").val();
- $('#councils_text').html(data.councils_text);
+ $('#js-councils_text').html(data.councils_text);
+ $('#js-councils_text_private').html(data.councils_text_private);
+ $('#js-top-message').html(data.top_message || '');
$('#form_category_row').html(data.category);
if ($("select#form_category option[value=\""+old_category+"\"]").length) {
$("select#form_category").val(old_category);
diff --git a/web/cobrands/fixmystreet/images/padlock.png b/web/cobrands/fixmystreet/images/padlock.png
new file mode 100644
index 000000000..d5cb6d8ef
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock.png
Binary files differ
diff --git a/web/cobrands/fixmystreet/images/padlock.svg b/web/cobrands/fixmystreet/images/padlock.svg
new file mode 100644
index 000000000..78fbcdc06
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock.svg
@@ -0,0 +1 @@
+<svg width="16" height="18" viewBox="0 0 16 18" xmlns="http://www.w3.org/2000/svg"><title>Artboard</title><path d="M2.667 5.143V8H0v10h16V8h-2.667V5.143C13.333 2.3 10.947 0 8 0S2.667 2.3 2.667 5.143zm8 0V8H5.333V5.143c0-1.53 1.08-2.572 2.667-2.572 1.587 0 2.667 1.043 2.667 2.573z" fill="#000" fill-rule="evenodd" fill-opacity=".6"/></svg> \ No newline at end of file
diff --git a/web/cobrands/fixmystreet/images/padlock@2.png b/web/cobrands/fixmystreet/images/padlock@2.png
new file mode 100644
index 000000000..368d344e3
--- /dev/null
+++ b/web/cobrands/fixmystreet/images/padlock@2.png
Binary files differ
diff --git a/web/cobrands/hart/hart.scss b/web/cobrands/hart/hart.scss
index 737dab4e9..37a48badf 100644
--- a/web/cobrands/hart/hart.scss
+++ b/web/cobrands/hart/hart.scss
@@ -7,15 +7,6 @@
@import "../sass/mixins";
@import "_colours";
-// Taken from Bromley's form css
-input[type=text],
-input[type=password],
-input[type=email],
-input[type=file],
-textarea,
-select { background: #fff; border: 1px solid #768b9a; border-color: #768b9a #d1dee8 #d1dee8 #768b9a; color: #333; font-family: "Gill Sans MT", "Gill Sans", Arial, 'Helvetica Neue', Helvetica, sans-serif; padding: 8px;
-@include border-radius(0); }
-
.green-btn, button.green-btn, input.green-btn {
background: #5b7189;
border: 1px solid #8e9eb0;
@@ -30,9 +21,6 @@ select { background: #fff; border: 1px solid #768b9a; border-color: #768b9a #d1d
.green-btn:hover, button.green-btn:hover, input.green-btn:hover {
background: #5b7189; border: 1px solid #8e9eb0;
}
-.form-txt-submit-box input[type=submit] {
- padding-top: 0; padding-bottom: 0; width: auto;
-}
h1, h2, h3, h4, h5, h6, legend { font-family: 'Gill Sans MT', 'Gill Sans', 'Trebuchet MS', Calibri, sans-serif; }
diff --git a/web/cobrands/oxfordshire/layout.scss b/web/cobrands/oxfordshire/layout.scss
index 7417b7081..c44e91586 100644
--- a/web/cobrands/oxfordshire/layout.scss
+++ b/web/cobrands/oxfordshire/layout.scss
@@ -171,7 +171,6 @@ body.mappage {
.full-width {
width: auto;
- margin: 0 -1em;
}
input[type="file"] {
@@ -267,7 +266,15 @@ h4.static-with-rule {
}
.form-box {
- background-color: darken($oxfordshire_very_light_green, 5%);
+ background-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+}
+
+.extra-category-questions {
+ background-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+
+ &:before {
+ border-bottom-color: #e3f1d5; // darker version of $oxfordshire_very_light_green
+ }
}
.shadow-wrap {
diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss
index 8760eba97..7462682ee 100644
--- a/web/cobrands/sass/_base.scss
+++ b/web/cobrands/sass/_base.scss
@@ -10,6 +10,8 @@ $itemlist_item_background: #f6f6f6 !default;
$itemlist_item_background_hover: #e6e6e6 !default;
$col_big_numbers: #ccc !default;
+$form-control-border-color: #aaaaaa;
+
@import "_mixins";
@import "_report_list";
@@ -222,38 +224,6 @@ h4.static-with-rule{
/* FORMS */
-// input placeholders, these need to be on separate lines as if the browser
-// can't understand a selector it will invalidate the whole line.
-::-webkit-input-placeholder {
- color: #666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-:-moz-placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-:-ms-placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-//this only gets used when the browser doesn't support @placeholder
-.placeholder {
- color:#666666;
- font: {
- style:italic;
- size:0.9375em;
- }
-}
-
input[type=file] {
width: 100%;
}
@@ -263,60 +233,92 @@ input[type=password],
input[type=email],
textarea {
@include box-sizing(border-box);
+ display: block;
width: 100%;
- // adjust so the sides line up
padding: 0.5em;
-}
-.ie7 {
- input[type=text],
- input[type=password],
- input[type=email],
- textarea {
- max-width: 95%;
- }
-}
-
-textarea {
- border: 0.125em solid #888888;
- @include border-radius(0.25em);
- display: block;
- font-size: 1em;
- line-height: 1.5em;
- font-family: $meta-font;
- min-height:8em;
-}
-
-input[type=text],
-input[type=password],
-input[type=email] {
- border: 0.125em solid #888888;
- @include border-radius(0.25em);
- display: block;
font-size: 1em;
line-height: 1em;
+
+ .ie7 & {
+ max-width: 95%;
+ }
}
-input[readonly] {
- border-color: #cccccc;
- color: #888888;
+textarea {
+ line-height: 1.5em;
+ min-height: 8em;
}
label{
display: block;
margin-top: 1.25em;
- margin-bottom: 0.25em;
+ margin-bottom: 0.5em;
font-weight: bold;
+
&.inline {
display: inline;
padding: flip(0 2em 0 1em, 0 1em 0 2em);
font-weight: normal;
}
+
&.inline-text {
display: inline;
font-weight: normal;
}
}
+.form-control {
+ display: block;
+ background-color: #fff;
+ border: 1px solid $form-control-border-color;
+ @include border-radius(4px);
+ box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
+ font-family: inherit; // eg: stop Firefox and IE10-11 using Courier in textareas
+ margin-bottom: 0.5em;
+
+ &[readonly] {
+ box-shadow: none;
+ color: #888888;
+ }
+}
+
+select.form-control {
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
+ height: 2.2em; // roughly equal to default input height
+}
+
+.form-section-heading {
+ font-family: inherit;
+ color: inherit;
+ font-weight: bold;
+ margin-bottom: 0.25em;
+}
+
+.form-section-heading--private {
+ &:before {
+ content: "";
+ display: inline-block;
+ width: 16px;
+ height: 18px;
+ background: transparent url(/cobrands/fixmystreet/images/padlock.png) 0 0 no-repeat;
+ background-size: 16px 18px;
+ margin-#{$right}: 0.5em;
+
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
+ background-image: url(/cobrands/fixmystreet/images/padlock@2.png);
+ }
+
+ @media all {
+ background-image: url(/cobrands/fixmystreet/images/padlock.svg), none;
+ }
+ }
+}
+
+.form-section-description {
+ color: #666;
+ line-height: 1em * (22/16);
+}
+
// grey background, full width box
.form-box {
margin: 0 -1em 0.25em;
@@ -387,8 +389,8 @@ label{
float: $right;
width:28%;
margin-#{$right}: 0.25em;
- padding-top:0.7em;
- padding-bottom:0.6em;
+ padding-top:0.6em;
+ padding-bottom:0.5em;
}
}
@@ -1396,10 +1398,6 @@ label .muted {
.description_tips {
@include clearfix;
- h4 {
- margin: 0.5em 0;
- }
-
ul {
width: 49%;
margin: 0;
@@ -1440,6 +1438,31 @@ label .muted {
margin-top: 0;
}
+.extra-category-questions {
+ background-color: #eee;
+ padding: 1em;
+ margin-top: 1.5em; // make room for the triangle
+ position: relative;
+
+ // An upwards pointing triangle
+ &:before {
+ content: "";
+ display: block;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 0 1em 1em 1em;
+ border-color: transparent transparent #eee transparent;
+ position: absolute;
+ top: -0.9em; // avoid hairline gap between triangle and parent
+ #{$left}: 1.5em;
+ }
+
+ & > :first-child {
+ margin-top: 0;
+ }
+}
+
table.nicetable {
width:100%;
@@ -1916,6 +1939,35 @@ table.nicetable {
}
}
+.box-warning {
+ margin: 1em -1em;
+ padding: 2em 2em;
+ background-color: mix(#fff, $primary, 70%);
+
+ h1 {
+ font-size: 1.4em;
+ }
+
+ p {
+ margin-bottom: 0.5em;
+ }
+
+ a {
+ display: inline-block;
+ margin-top: 0.5em;
+ padding: 0.5em 1em;
+ background-color: #000;
+ color: #fff;
+ border-radius: 0.3em;
+
+ &:hover,
+ &:focus {
+ text-decoration: none;
+ background-color: mix(#000, $primary, 70%);
+ }
+ }
+}
+
@import "_admin";
@import "_fixedthead";
@import "_dropzone";
diff --git a/web/cobrands/sass/_dropzone.scss b/web/cobrands/sass/_dropzone.scss
index 3e5fc8058..432f7f6b4 100644
--- a/web/cobrands/sass/_dropzone.scss
+++ b/web/cobrands/sass/_dropzone.scss
@@ -1,18 +1,15 @@
$dropzone-link-color: #0BA7D1; // match default `a` styling
$dropzone-link-color--awakened: #0D7CCE; // match default `a:hover` styling
-$dropzone-border-color: #888; // match default form inputs
$dropzone-border-color--awakened: $dropzone-link-color--awakened;
$dropzone-border-color--full: #bf002a;
-$dropzone-border-radius: 0.25em; // match default form inputs
$dropzone-background-color: #fff;
$dropzone-background-color--awakened: mix($dropzone-link-color, $dropzone-background-color, 10%);
$dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-background-color, 10%);
.dropzone {
+ @extend .form-control;
@include clearfix;
- border: 0.125em solid $dropzone-border-color;
background-color: $dropzone-background-color;
- border-radius: $dropzone-border-radius;
padding: 1.5em;
text-align: center;
}
@@ -55,7 +52,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
cursor: auto;
&:hover {
- border-color: $dropzone-border-color;
+ border-color: $form-control-border-color;
background-color: $dropzone-background-color;
.dz-remove,
@@ -111,7 +108,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
right: 0;
bottom: 0;
- border-radius: $dropzone-border-radius;
+ border-radius: 4px;
overflow: hidden; // crop child image to border radius, even before img src has loaded
img {
@@ -144,7 +141,7 @@ $dropzone-background-color--full: mix($dropzone-border-color--full, $dropzone-ba
.dz-upload {
background: rgba(0,0,0,0.2);
- border-radius: $dropzone-border-radius;
+ border-radius: 4px;
height: 100%;
width: 0;
display: block;
diff --git a/web/cobrands/sass/_h5bp.scss b/web/cobrands/sass/_h5bp.scss
index b41effa1b..9b1c56ab5 100644
--- a/web/cobrands/sass/_h5bp.scss
+++ b/web/cobrands/sass/_h5bp.scss
@@ -37,8 +37,8 @@ html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 10
body { margin: 0; font-size: 1em; line-height: 1.5; }
/* mySociety addition: background colour */
-body, button, input, select, textarea {
- font-family: sans-serif;
+body, button {
+ font-family: sans-serif;
color: #222;
background-color: #fff
}