Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring in new toolkit with new input fields #255

Merged
merged 5 commits into from
Feb 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions app/assets/javascripts/_selection-buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

if (!GOVUK.SelectionButtons) return;

new GOVUK.SelectionButtons('.selection-button input', {
'focusedClass' : 'selection-button-focused',
'selectedClass' : 'selection-button-selected'
});
new GOVUK.SelectionButtons('.selection-button input');

};

Expand Down
15 changes: 15 additions & 0 deletions app/assets/javascripts/_shim-links-with-button-role.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
(function(GOVUK, GDM) {

GDM.shimLinksWithButtonRole = function() {

if (!GOVUK.shimLinksWithButtonRole) return;

GOVUK.shimLinksWithButtonRole.init({
selector: '[class^=link-button]'
});

};

GOVUK.GDM = GDM;

}).apply(this, [GOVUK||{}, GOVUK.GDM||{}]);
7 changes: 6 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
//= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/list-entry.js
//= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/word-counter.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/selection-buttons.js
//= include _selection-buttons.js
//= include ../../../node_modules/govuk_frontend_toolkit/javascripts/govuk/shim-links-with-button-role.js

; // JavaScript in the govuk_frontend_toolkit doesn't have trailing semicolons

//= include _scroll-through-statistics.js
//= include _selection-buttons.js
//= include _shim-links-with-button-role.js
//= include _tables-to-charts.js
//= include ../../../bower_components/digitalmarketplace-frontend-toolkit/toolkit/javascripts/module-loader.js
14 changes: 10 additions & 4 deletions app/assets/scss/application.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
$path: "/admin/static/images/";

/* Blocks shared between multiple selectors */
@import "toolkit/shared_placeholders/_dm-typography.scss";
@import "toolkit/shared_placeholders/_placeholders.scss";
@import "toolkit/shared_placeholders/_temporary-messages.scss";

// Digital Marketplace front end toolkit components
@import "forms/_option-select.scss";
@import "forms/_keyword-search.scss";
Expand All @@ -23,10 +28,6 @@ $path: "/admin/static/images/";
@import "toolkit/previous-next-navigation";
@import "toolkit/secondary-action-link";

/* Blocks shared between multiple selectors */
@import "shared_placeholders/_temporary-messages.scss";
@import "shared_placeholders/_dm-typography.scss";

// Admin app styles
@import "_reset";
@import "_footer";
Expand Down Expand Up @@ -81,3 +82,8 @@ $path: "/admin/static/images/";
.break-email {
word-break: break-all;
}

.question + .secondary-action-link {
margin-top: -36px;
margin-bottom: 40px;
}
2 changes: 1 addition & 1 deletion app/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div class="validation-wrapper">
{% endif %}
<div class="question">
{{ form.email_address.label(class="question-heading-with-hint") }}
{{ form.email_address.label(class="question-heading") }}
<p class="hint">
Enter the email address you used to register with the Digital Marketplace
</p>
Expand Down
185 changes: 0 additions & 185 deletions app/templates/macros/forms.html

This file was deleted.

4 changes: 2 additions & 2 deletions app/templates/view_supplier_users.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<div class="validation-wrapper">
{% endif %}
<div class="question">
{{ invite_form.email_address.label(class="question-heading-with-hint") }}
{{ invite_form.email_address.label(class="question-heading") }}
<p class="hint">
Enter the email address of the person you wish to invite
</p>
Expand Down Expand Up @@ -189,7 +189,7 @@
<div class="validation-wrapper">
{% endif %}
<div class="question">
{{ move_user_form.user_to_move_email_address.label(class="question-heading-with-hint") }}
{{ move_user_form.user_to_move_email_address.label(class="question-heading") }}
<p class="hint">
Enter the email address of the existing user you wish to move to this supplier
</p>
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.1",
"dependencies": {
"jquery": "1.11.2",
"digitalmarketplace-frontend-toolkit": "https://github.com/alphagov/digitalmarketplace-frontend-toolkit.git#v19.2.1",
"govuk_template": "https://github.com/alphagov/govuk_template/releases/download/v0.17.3/jinja_govuk_template-0.17.3.tgz",
"digitalmarketplace-frontend-toolkit": "https://github.com/alphagov/digitalmarketplace-frontend-toolkit.git#v20.0.0",
"govuk_template": "https://github.com/alphagov/govuk_template/releases/download/v0.19.2/jinja_govuk_template-0.19.2.tgz",
"digitalmarketplace-frameworks": "https://github.com/alphagov/digitalmarketplace-frameworks.git#v5.5.0",
"hogan": "3.0.2",
"c3": "0.4.10"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dependencies": {
"bower": "1.7.1",
"del": "1.1.1",
"govuk_frontend_toolkit": "4.12.0",
"govuk_frontend_toolkit": "5.0.3",
"gulp": "3.8.7",
"gulp-filelog" : "0.4.1",
"gulp-include": "1.1.1",
Expand Down