Removed unused code that is not fully implemented

This commit is contained in:
alexjanousekGSA
2025-07-02 15:25:57 -04:00
parent ac226f5ad8
commit 7447a0080c
5 changed files with 0 additions and 296 deletions

View File

@@ -1,73 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 425.2 428" style="enable-background:new 0 0 425.2 428;" xml:space="preserve">
<style type="text/css">
.st0{fill:#1D70B8;}
.st1{fill:#0B0C0C;}
.st2{fill:#FFDD00;}
.st3{opacity:0.2;fill:#1D2F3A;}
.st4{opacity:0.5;fill:#F4F4F4;}
.st5{clip-path:url(#SVGID_2_);fill:#FFDD00;}
.st6{opacity:0.2;clip-path:url(#SVGID_2_);fill:#1D2F3A;}
.st7{opacity:0.5;clip-path:url(#SVGID_2_);}
.st8{fill:#F4F4F4;}
.st9{fill:#206FAB;}
</style>
<g id="Layer_1">
<circle class="st0" cx="212.6" cy="212.6" r="212.6"/>
</g>
<g id="Layer_2">
<rect x="91.9" y="248.6" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -164.6926 181.3616)" class="st1" width="89.3" height="81.7"/>
<rect x="76.9" y="258.5" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -150.6822 163.09)" class="st2" width="89.3" height="9.9"/>
<rect x="90.6" y="272.2" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -156.3567 176.7894)" class="st2" width="89.3" height="9.9"/>
<rect x="104.3" y="285.9" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -162.0312 190.4889)" class="st2" width="89.3" height="9.9"/>
<rect x="118" y="299.6" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -167.7057 204.1884)" class="st2" width="89.3" height="9.9"/>
<rect x="131.9" y="227.1" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -143.1309 190.2927)" class="st3" width="52.5" height="81.7"/>
</g>
<g id="Layer_5">
<polygon class="st4" points="116.8,275.2 108.5,283.4 103,274.9 111.3,266.7 "/>
<polygon class="st4" points="127.6,291.8 119.3,300 113.8,291.5 122.1,283.3 "/>
<polygon class="st4" points="138.3,308.4 130.1,316.7 124.6,308.2 132.8,299.9 "/>
<polygon class="st4" points="149.1,325 140.9,333.3 135.4,324.8 143.6,316.6 "/>
</g>
<g id="Layer_6">
</g>
<g id="Layer_4">
<defs>
<ellipse id="SVGID_1_" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -22.5211 240.2509)" cx="278.7" cy="147.3" rx="23.7" ry="23.7"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -22.5211 240.2509)" class="st5" cx="278.7" cy="147.3" rx="23.7" ry="23.7"/>
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -22.5211 240.2509)" class="st6" cx="278.7" cy="147.3" rx="23.7" ry="23.7"/>
<path class="st5" d="M264.8,127.7c15.8,2.7,30.8,17.7,33.5,33.5s-7.9,26.4-23.7,23.7s-30.8-17.7-33.5-33.5
C238.4,135.6,249,125,264.8,127.7z"/>
<g class="st7">
<rect x="260.6" y="117.2" transform="matrix(0.842 -0.5395 0.5395 0.842 -44.6945 168.5803)" class="st8" width="9.8" height="86.7"/>
</g>
</g>
<g id="Layer_9">
<ellipse transform="matrix(0.7071 -0.7071 0.7071 0.7071 -22.5211 240.2509)" class="st9" cx="278.7" cy="147.3" rx="15.8" ry="15.8"/>
</g>
<g id="Layer_3">
<path class="st1" d="M278,74.5l-168,168l73.6,73.6l168-168L278,74.5z M262,164c-9.2-9.2-9.2-24.2,0-33.5s24.2-9.2,33.5,0
s9.2,24.2,0,33.5S271.3,173.3,262,164z"/>
</g>
<g id="Layer_8">
</g>
<g id="Layer_10">
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1890,14 +1890,3 @@ class AdminClearCacheForm(StripWhitespaceForm):
def validate_model_type(self, field):
if not field.data:
raise ValidationError("Select at least one option")
class ChangeSecurityKeyNameForm(StripWhitespaceForm):
security_key_name = GovukTextInputField(
"Name of key",
validators=[
DataRequired(message="Cannot be empty"),
MustContainAlphanumericCharacters(),
Length(max=255, message="Name of key must be 255 characters or fewer"),
],
)

View File

@@ -1,71 +0,0 @@
{% extends "base.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/button/macro.njk" import usaButton %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% from "components/webauthn-api-check.html" import webauthn_api_check %}
{% from "components/components/error-message/macro.njk" import usaErrorMessage %}
{% set page_title = 'Get your security key' %}
{% block extra_javascripts_before_body %}
{{ webauthn_api_check() }}
{% endblock %}
{% block per_page_title %}
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.user_profile') }) }}
{% endblock %}
{% block maincolumn_content %}
{{ usaErrorMessage({
"classes": "banner-dangerous display-none",
"html": (
'Theres a problem with your security key' +
'<p>Check you have the right key and try again. ' +
'If this does not work, ' +
'<a class="usa-link" href=' + url_for('main.support') + ">contact us</a>." +
'</p>'
),
"attributes": {
"aria-live": "polite",
"tabindex": '-1'
}
}) }}
<div class="grid-row">
<div class="grid-col-6">
{{ page_header(page_title) }}
<p>
You need to have your security key to sign in.
</p>
{{ usaButton({
"element": "button",
"text": "Check security key",
"classes": "govuk-button--secondary webauthn__api-required",
"attributes": {
"data-module": "authenticate-security-key",
"data-csrf-token": csrf_token(),
}
}) }}
{{ usaErrorMessage({
"classes": "webauthn__api-missing",
"text": "Your browser does not support security keys. Try signing in to Notify using a different browser."
}) }}
{{ usaErrorMessage({
"classes": "webauthn__no-js",
"text": "JavaScript is not available for this page. Security keys need JavaScript to work."
}) }}
</div>
<div class="grid-col-3">
<img src="{{ asset_url('images/security-key.svg') }}" alt="" class="webauthn-illustration" width="149" height="150">
</div>
</div>
{% endblock %}

View File

@@ -1,34 +0,0 @@
{% extends "base.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% set page_title = 'Manage ' + '' + security_key.name + '' %}
{% block per_page_title %}
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.user_profile_security_keys') }) }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header(page_title) }}
<div class="grid-row">
<div class="grid-col-9">
{% call form_wrapper(autocomplete=True) %}
{{ form.security_key_name }}
{{ page_footer(
'Save',
delete_link=url_for(
'.user_profile_confirm_delete_security_key', key_id=security_key.id),
delete_link_text='Delete'
) }}
{% endcall %}
</div>
</div>
{% endblock %}

View File

@@ -1,107 +0,0 @@
{% extends "base.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/button/macro.njk" import usaButton %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% from "components/table.html" import edit_field, mapping_table, row, field, row_heading %}
{% from "components/webauthn-api-check.html" import webauthn_api_check %}
{% from "components/components/error-message/macro.njk" import usaErrorMessage %}
{% set page_title = 'Security keys' %}
{% set credentials = current_user.webauthn_credentials %}
{% block extra_javascripts_before_body %}
{{ webauthn_api_check() }}
{% endblock %}
{% block per_page_title %}
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.user_profile') }) }}
{% endblock %}
{% block maincolumn_content %}
{% set webauthn_button %}
{{ usaButton({
"element": "button",
"text": "Register a key",
"classes": "govuk-button--secondary webauthn__api-required",
"attributes": {
"data-module": "register-security-key",
"data-csrf-token": csrf_token(),
}
}) }}
{{ usaErrorMessage({
"classes": "webauthn__api-missing",
"text": "Your browser does not support security keys. Try signing in to Notify using a different browser."
}) }}
{{ usaErrorMessage({
"classes": "webauthn__no-js",
"text": "JavaScript is not available for this page. Security keys need JavaScript to work."
}) }}
{% endset %}
<div class="grid-row">
{{ usaErrorMessage({
"classes": "banner-dangerous display-none",
"html": (
'Theres a problem with your security key' +
'<p>Check you have the right key and try again. ' +
'If this does not work, ' +
'<a class="usa-link" href=' + url_for('main.support') + ">contact us</a>." +
'</p>'
),
"attributes": {
"aria-live": "polite",
"tabindex": '-1'
}
}) }}
{% if credentials %}
<div class="grid-col-10">
{{ page_header(page_title) }}
<div class="body-copy-table">
{% call mapping_table(
caption=page_title,
field_headings=['Security key details', 'Action'],
field_headings_visible=False,
caption_visible=False,
) %}
{% for credential in credentials %}
{% call row() %}
{% call field() %}
<div class="usa-body">{{ credential.name }}</div>
<div class="usa-body hint">Registered {{ credential.created_at|format_delta }}</div>
{% endcall %}
{{ edit_field('Manage', url_for('.user_profile_manage_security_key', key_id=credential.id)) }}
{% endcall %}
{% endfor %}
{% endcall %}
</div>
{{ webauthn_button }}
</div>
{% else %}
<div class="grid-col-6">
{{ page_header(page_title) }}
<p>
Security keys are an alternative way of signing in to Notify,
instead of getting a code in a text message
</p>
<p>
You can buy any key thats compatible with the WebAuthn
standard.
</p>
{{ webauthn_button }}
</div>
<div class="grid-col-3">
<img src="{{ asset_url('images/security-key.svg') }}" alt="" class="webauthn-illustration" width="149" height="150">
</div>
{% endif %}
</div>
</div>
{% endblock %}