Skip to content

Commit 7f4c70c

Browse files
Replace password field input with text field input
Password input (with show/hide behaviour) ise only used for internal test environments and on deactivated feature.
1 parent 8ccdb99 commit 7f4c70c

6 files changed

Lines changed: 21 additions & 94 deletions

File tree

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
@forward "file-upload";
22
@forward "notification-banner";
33
@forward "pagination";
4-
@forward "password-input";

app/assets/stylesheets/vendor/govuk-frontend/components/password-input/_index.scss

Lines changed: 0 additions & 47 deletions
This file was deleted.

app/javascript/controllers/index.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ application.register(
3434
NhsukNotificationBannerController,
3535
);
3636

37-
import NhsukPasswordInputController from "./nhsuk_password_input_controller";
38-
application.register("nhsuk-password-input", NhsukPasswordInputController);
39-
4037
import NhsukRadiosController from "./nhsuk_radios_controller";
4138
application.register("nhsuk-radios", NhsukRadiosController);
4239

app/javascript/controllers/nhsuk_password_input_controller.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

app/views/offline_passwords/new.html.erb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,26 @@
2424
<%= f.hidden_field :assets_css, value: asset_path("application.css") %>
2525
<%= f.hidden_field :assets_js, value: asset_path("application.js") %>
2626

27-
<%= f.govuk_password_field :password,
28-
label: {
29-
text: "Offline password",
30-
size: "s",
31-
},
32-
hint: {
33-
text: "Your password must be at least 12 characters long",
34-
},
35-
width: 20,
36-
autocomplete: "new-password",
37-
data: { testid: "password" } %>
38-
39-
<%= f.govuk_password_field :password_confirmation,
40-
label: {
41-
text: "Confirm offline password",
42-
size: "s",
43-
},
44-
width: 20,
45-
autocomplete: "new-password",
46-
data: { testid: "password-confirmation" } %>
27+
<%= f.govuk_text_field :password,
28+
label: {
29+
text: "Offline password",
30+
size: "s",
31+
},
32+
hint: {
33+
text: "Your password must be at least 12 characters long",
34+
},
35+
width: 20,
36+
autocomplete: "new-password",
37+
data: { testid: "password" } %>
38+
39+
<%= f.govuk_text_field :password_confirmation,
40+
label: {
41+
text: "Confirm offline password",
42+
size: "s",
43+
},
44+
width: 20,
45+
autocomplete: "new-password",
46+
data: { testid: "password-confirmation" } %>
4747

4848
<%= f.govuk_submit "Save password", data: { testid: "submit" } %>
4949
<% end %>

app/views/users/sessions/new.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<%= h1 "Log in", size: "xl" %>
55

66
<%= f.govuk_email_field :email, autocomplete: "email", label: { text: "Email address" } %>
7-
<%= f.govuk_password_field :password, autocomplete: "current-password", label: { text: "Password" } %>
7+
<%= f.govuk_text_field :password, autocomplete: "current-password", label: { text: "Password" }, type: "password" %>
88

99
<% if devise_mapping.rememberable? %>
1010
<%= f.govuk_check_boxes_fieldset :remember_me, multiple: false, legend: nil do %>

0 commit comments

Comments
 (0)