govuk_publishing_components 16.5.0 → 16.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b452c5a3cbcce2a7da815ddb4ac37a75a86fc279c4d72d24e66d73eb6c4b6473
4
- data.tar.gz: 29293f12fea214373f4cd0f44224a799bcbe2cd5a7bc901cda498bce47295022
3
+ metadata.gz: e98d94908dcd54801ec6ff43c75673ec58dd5cdae0ff319dd327c32747eeacd8
4
+ data.tar.gz: e7ce8148f919938df450990f50185310d1a47e6b11567fc7e79381a1a5eecd27
5
5
  SHA512:
6
- metadata.gz: 5fe86e495b3f069a4571fceb2c35ea3a49e2a9f0ed479edbffaa935f0d51d60ac22ded8a9fe3ab0b73f9b238dca3bab79d25d9d7e9d54c3e9f562d3ad3ea616c
7
- data.tar.gz: e0428484878339abb006433a31b5fc8bfa523a7953b63688cc62eb639fe64daeca2ab88f818d28f0c864a814c53874f0c708a7207967e78dc242361e6162272a
6
+ metadata.gz: 9f035aeffe1544aa6ae59a8213997a13843de1b93b40aad089c6ddff12c43ac3686840f56e92bfc977f9c85c39377e6fafbb3fe5fa6ec541b9bb93ed4df7c798
7
+ data.tar.gz: af2a2d3c6865e23482b3ea4518ce383aee0c9a39d7e6cc5db3e35ef3136122b732f84462510dd03ce3c93a08eb0c9afa56b14dbfcb54c4d9c6455f1a38b743ff
@@ -152,6 +152,10 @@ $large-input-size: 50px;
152
152
  border-right: 0;
153
153
  }
154
154
 
155
+ .gem-c-search__input[type="search"].gem-c-search__suppressed-button {
156
+ border-right: solid 1px $grey-2;
157
+ }
158
+
155
159
  .js-enabled & {
156
160
  .gem-c-search__label {
157
161
  color: $secondary-text-colour;
@@ -30,7 +30,7 @@
30
30
  </a>
31
31
  </li>
32
32
  <li>
33
- <a class="<%= 'active' if active == 'consultations' %>" href="/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations">
33
+ <a class="<%= 'active' if active == 'consultations' %>" href="<%= CGI::escapeHTML('/search/policy-papers-and-consultations?content_store_document_type[]=open_consultations&content_store_document_type[]=closed_consultations') %>">
34
34
  <%= t("govuk_component.government_navigation.consultations", default: "Consultations") %>
35
35
  </a>
36
36
  </li>
@@ -8,6 +8,8 @@
8
8
  value ||= ""
9
9
  id ||= "search-main-" + SecureRandom.hex(4)
10
10
  label_text ||= "Search GOV.UK"
11
+ name ||= 'q'
12
+ hide_search_button ||= false
11
13
  %>
12
14
 
13
15
  <div class="gem-c-search <%= class_name %>" data-module="gem-toggle-input-class-on-focus">
@@ -15,9 +17,13 @@
15
17
  <%= label_text %>
16
18
  </label>
17
19
  <div class="gem-c-search__item-wrapper">
18
- <input type="search" value="<%= value %>" id="<%= id %>" name="q" title="Search" class="gem-c-search__item gem-c-search__input js-class-toggle">
19
- <div class="gem-c-search__item gem-c-search__submit-wrapper">
20
- <button type="submit" class="gem-c-search__submit">Search</button>
21
- </div>
20
+ <input type="search" value="<%= value %>"
21
+ id="<%= id %>" name="<%= name %>" title="Search"
22
+ class="gem-c-search__item gem-c-search__input js-class-toggle<%= ' gem-c-search__suppressed-button' if hide_search_button %>">
23
+ <% unless hide_search_button %>
24
+ <div class="gem-c-search__item gem-c-search__submit-wrapper">
25
+ <button type="submit" class="gem-c-search__submit">Search</button>
26
+ </div>
27
+ <% end %>
22
28
  </div>
23
29
  </div>
@@ -2,7 +2,7 @@ name: "Search"
2
2
  description: "Search box"
3
3
  body: |
4
4
  A search box with label and attached submit button. The component must be used within an HTML form.
5
- The search input has a name="q" attribute and a customisable ID.
5
+ The search input has a name="q" attribute and a customisable ID and NAME.
6
6
 
7
7
  It can be used on white or on govuk-blue using the on_govuk_blue option.
8
8
 
@@ -38,3 +38,11 @@ examples:
38
38
  large_version:
39
39
  data:
40
40
  size: "large"
41
+ change_field_name:
42
+ description: To be used if you need to change the default name 'q'
43
+ data:
44
+ name: "my_own_fieldname"
45
+ remove_search_submit_button:
46
+ description: Sometimes this component may be used inside an existing form which has another submit button. A form should only have one submit button. The search button will be displayed by default.
47
+ data:
48
+ show_search_button: false
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '16.5.0'.freeze
2
+ VERSION = '16.6.0'.freeze
3
3
  end
@@ -49,7 +49,7 @@
49
49
  "/"
50
50
  ],
51
51
  "_resolved": "git://github.com/alphagov/accessible-autocomplete.git#0c518b4fa79b9a95b544410858486ed9e6403c84",
52
- "_shasum": "e73449246df650127f0ed726db26be352e1359d0",
52
+ "_shasum": "92bf9d29a48fa9f71564002a23d43f600ffb1d90",
53
53
  "_shrinkwrap": null,
54
54
  "_spec": "accessible-autocomplete@git://github.com/alphagov/accessible-autocomplete.git#add-multiselect-support",
55
55
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.5.0
4
+ version: 16.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-14 00:00:00.000000000 Z
11
+ date: 2019-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govspeak