diff --git a/app/assets/javascripts/report-a-problem.js b/app/assets/javascripts/report-a-problem.js index 1805efa0b..fc8d611a6 100644 --- a/app/assets/javascripts/report-a-problem.js +++ b/app/assets/javascripts/report-a-problem.js @@ -54,20 +54,24 @@ var ReportAProblem = { $(document).ready(function() { // Add in the toggle link for reporting a problem at the bottom of the page - var $toggleLink = $('
'; + var $container = $('.report-a-problem-container') + $container.before(toggleBlock); // Add a click handler for the toggle - $toggleLink.on('click', function() { - $('.report-a-problem-container').toggle(); + $('.report-a-problem-toggle a').on('click', function() { + $container.toggle(); return false; }); // form submission for reporting a problem - var $forms = $('.report-a-problem-container form, .report-a-problem form'); - $forms.append(''); - $forms.append($('').val(document.referrer || "unknown")); - - $('.report-a-problem-container form').submit(ReportAProblem.submit); + var $form = $container.find('form'); + $form.append(''); + $form.append($('').val(document.referrer || "unknown")); + $form.submit(ReportAProblem.submit); }); diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 30d972f1f..e3a9e4bfe 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -3,6 +3,7 @@ @import "conditionals"; @import "css3"; @import "device-pixels"; +@import "grid_layout"; @import "measurements"; @import "typography"; @import "shims"; @@ -28,4 +29,3 @@ @import "govuk-component/component"; @import "static-pages/error-pages"; - diff --git a/app/assets/stylesheets/header-footer-only.scss b/app/assets/stylesheets/header-footer-only.scss index ed1524e18..d626d0e07 100644 --- a/app/assets/stylesheets/header-footer-only.scss +++ b/app/assets/stylesheets/header-footer-only.scss @@ -3,6 +3,7 @@ @import "conditionals"; @import "css3"; @import "device-pixels"; +@import "grid_layout"; @import "measurements"; @import "typography"; @import "design-patterns/buttons"; diff --git a/app/assets/stylesheets/helpers/_core.scss b/app/assets/stylesheets/helpers/_core.scss index 2c15fff3b..583df6c52 100644 --- a/app/assets/stylesheets/helpers/_core.scss +++ b/app/assets/stylesheets/helpers/_core.scss @@ -93,7 +93,7 @@ h4 { top: 9.5em; width: 100%; z-index: 0; - + @include ie-lte(8) { z-index: 0; } @@ -237,7 +237,7 @@ h4 { content: "\A0\A0\A0\A0\A0\A0"; background-position: 5px 0px; } - + a[rel="external"]:hover:after { background-position: 5px -388px; } @@ -1010,30 +1010,6 @@ article { overflow: hidden; } -/* report a problem */ - -.report-a-problem-toggle{ - @include core-16; - margin:1em 2em 1em 2em; - a{ - color: $secondary-text-colour; - } - - @include ie-lte(7) { - zoom: 1; - } - - @include media-down(mobile) { - margin:0em 1em 1em 1em; - } -} - -.js-tab-content .report-a-problem-toggle { - @include media-down(mobile) { - margin-top:2em; - } -} - /* bunting lol */ .epic-bunting { width: 100%; diff --git a/app/assets/stylesheets/helpers/_report-a-problem.scss b/app/assets/stylesheets/helpers/_report-a-problem.scss index 51ad2890b..8d5a2e68a 100644 --- a/app/assets/stylesheets/helpers/_report-a-problem.scss +++ b/app/assets/stylesheets/helpers/_report-a-problem.scss @@ -4,8 +4,16 @@ .report-a-problem-container{ clear: both; - margin: 3em 0 2em 2em; - max-width: 38em; + @include outer-block; + margin-bottom: 60px; + + .report-a-problem-inner { + @include inner-block; + + .report-a-problem-content { + max-width: 35em; + } + } h2 { @include core-24; @@ -13,7 +21,7 @@ margin: 1em 0; } - div { + .button-wrapper { padding-top: 0.5em; .button { @@ -31,15 +39,10 @@ @include core-19; padding: 0; margin: 0 0 0.22em 0; - display: block; + display: block; font-weight: bold; } - @include media-down(mobile) { - margin: 0 1em 2em 1em; - } - - input { &[type="text"] { display: block; @@ -56,3 +59,30 @@ } } } + +.report-a-problem-toggle{ + @include core-16; + + a{ + color: $secondary-text-colour; + } + + @include ie-lte(7) { + zoom: 1; + } +} + +.js-tab-content .report-a-problem-toggle { + @include media-down(mobile) { + margin-top:2em; + } +} + +.report-a-problem-toggle-wrapper { + @include outer-block; + margin-bottom: 30px; + + .report-a-problem-toggle { + @include inner-block; + } +} diff --git a/app/views/root/report_a_problem.raw.html.erb b/app/views/root/report_a_problem.raw.html.erb index 78480bce6..dd61ac09f 100644 --- a/app/views/root/report_a_problem.raw.html.erb +++ b/app/views/root/report_a_problem.raw.html.erb @@ -1,28 +1,34 @@