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

Bug/uar 1282 confirmation dialog logs name in logs #1194

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/validation/confirm.to.remove.validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { body } from "express-validator";
import { DoYouWantToRemoveKey } from "../model/data.types.model";

export const confirmToRemove = [
body(DoYouWantToRemoveKey).custom((value, { req }) => {
body(DoYouWantToRemoveKey).custom((value) => {
if (value === undefined) {
throw new Error("Are you sure you want to remove " + req.body['boMoName'] + "?");
throw new Error("Are you sure you want to remove beneficial owner or managing officer?");
}

return true;
Expand Down
6 changes: 3 additions & 3 deletions views/update/confirm-to-remove.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "update-layout.html" %}

{% set title = "Are you sure you want to remove " + boMoName + "?" %}

{% set title = "Are you sure you want to remove beneficial owner or managing officer?" %}
AndreKramer7654 marked this conversation as resolved.
Show resolved Hide resolved
{% set dynamicTitle = "Are you sure you want to remove " + boMoName + "?" %}
{% block pageTitle %}
{% include "includes/update-page-title.html" %}
{% endblock %}
Expand All @@ -19,7 +19,7 @@
name: "do_you_want_to_remove",
fieldset: {
legend: {
text: title,
text: dynamicTitle,
isPageHeading: true,
classes: "govuk-fieldset__legend--xl"
}
Expand Down