-
Notifications
You must be signed in to change notification settings - Fork 166
Lg 7353 personal key context #7103
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
Merged
Merged
Changes from 37 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
d981422
LG-7353 First changes
jmax-gsa 9ef0c53
More UI tweaks.
jmax-gsa 59f3263
Moved strings out to new locale file entries.
jmax-gsa 206b2dd
Use ValidatedFieldComponent for acknowledgement checkbox.
jmax-gsa dbfa7a4
French and Spanish strings
jmax-gsa 97b5868
Spec and implementation for tracking personal key acknowledgments
jmax-gsa 9a0b129
Lint nits
jmax-gsa 47f7a50
Lint/Yaml complaints
jmax-gsa 164928b
Removed unused log controller map entries
jmax-gsa 5ee50d1
Fixed incorrect element id
jmax-gsa 2f545fc
Typo.
jmax-gsa aa96f39
Test fix.
jmax-gsa 2ab80a5
Removed unused strings
jmax-gsa fc4b574
Checkin to push
jmax-gsa 0f3b0c6
Pass update_path through to simple_form_for
jmax-gsa 481be99
Forcibly prevent personal key confirmation dialog.
jmax-gsa 24e59bd
Typo
jmax-gsa 3d45c3c
Removed shared examples for personal keys
jmax-gsa e0264bb
Personal key confirmation tests
jmax-gsa fffb7ca
Actually check the checkbox
jmax-gsa fc8e1ef
Removed unused string
jmax-gsa ec9a9a6
Fixed broken specs
jmax-gsa 611bb17
Lint nits
jmax-gsa c44efd3
Absolutely trivial lint nit
jmax-gsa 360b1b4
Spec fixes.
jmax-gsa ef4c8b2
Removed dead code
jmax-gsa 872eb24
More dead code removal
jmax-gsa d5597e0
Still more dead code
jmax-gsa 2b9f1c1
Fix spec broken by rebase onto current master
jmax-gsa b1db85f
Update app/javascript/packs/personal-key-page-controller.js
jmax-gsa 0cb10c4
Update app/views/shared/_personal_key.html.erb
jmax-gsa 72b0a3a
Update app/views/shared/_personal_key.html.erb
jmax-gsa 8acd636
Update app/views/partials/personal_key/_key.html.erb
jmax-gsa b558b21
Update app/views/shared/_personal_key.html.erb
jmax-gsa 82ea487
Update app/views/shared/_personal_key.html.erb
jmax-gsa 05bca60
Update app/views/shared/_personal_key.html.erb
jmax-gsa 756e2f4
Review comment
jmax-gsa 64adfdd
Review comment
jmax-gsa 914cdfe
Review comment
jmax-gsa 27e2024
Lint nit and spec helper fix
jmax-gsa b4d906c
Lint uglifying.
jmax-gsa 32e16f7
Removed test for dead code.
jmax-gsa 18155ef
Removed unused string
jmax-gsa 85235ca
Update app/javascript/packs/personal-key-page-controller.js
jmax-gsa f79fa64
Review comments
jmax-gsa 9badbce
Removed dead code.
jmax-gsa a48b000
Added event table entry for checkbox click
jmax-gsa b618cc0
Fixed event logging cleanup
jmax-gsa 7ad022a
More event logging
jmax-gsa b58a667
Lint nit
jmax-gsa 814e8b2
Event logging
jmax-gsa a83b2dc
Updated logging spec
jmax-gsa 4369308
Typo
jmax-gsa bab446f
Text tweak.
jmax-gsa 20936b8
Tweaked method name
jmax-gsa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,42 @@ | ||
| <div class="border-y border-primary-light bg-primary-lightest padding-y-3 text-center"> | ||
| <h2 class="margin-y-0"> | ||
| <%= t('users.personal_key.header') %> | ||
| </h2> | ||
| <div class="bg-personal-key padding-top-4 margin-y-2"> | ||
| <div class="personal-key-block"> | ||
| <% code.split('-').each do |word| %> | ||
| <% concat(content_tag(:strong, word, class: 'personal-key-block__code', data: { personal_key: '' })) %> | ||
| <% end %> | ||
| </div> | ||
| </div> | ||
| <p class="margin-y-0"> | ||
| <p class="margin-bottom-105"> | ||
| <%= t( | ||
| 'users.personal_key.generated_on_html', | ||
| date: content_tag(:strong, I18n.l(Time.zone.today, format: '%B %d, %Y')), | ||
| ) %> | ||
| </p> | ||
|
|
||
| <%= render ClipboardButtonComponent.new( | ||
| clipboard_text: code, | ||
| unstyled: true, | ||
| ) %> | ||
|
|
||
| <%= render ButtonComponent.new( | ||
| action: ->(**tag_options, &block) do | ||
| link_to( | ||
| "data:text/plain;charset=utf-8,#{CGI.escape(code)}", | ||
| download: 'personal_key.txt', | ||
| **tag_options, | ||
| &block | ||
| ) | ||
| end, | ||
| icon: :file_download, | ||
| unstyled: true, | ||
| class: 'margin-x-2 display-inline-block', | ||
| ).with_content(t('forms.backup_code.download')) %> | ||
|
|
||
| <%= render PrintButtonComponent.new( | ||
| icon: :print, | ||
| unstyled: true, | ||
| type: :button, | ||
| class: 'margin-right-2 margin-bottom-2 tablet:margin-bottom-0', | ||
| ) %> | ||
|
|
||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,46 @@ | ||
| <%= render PageHeadingComponent.new.with_content(t('headings.personal_key')) %> | ||
| <p> | ||
| <%= t('instructions.personal_key.info') %> | ||
| </p> | ||
| <%= render PageHeadingComponent.new.with_content(t('forms.personal_key_partial.header')) %> | ||
| <div class="full-width-box margin-y-5"> | ||
| <%= render 'partials/personal_key/key', code: code %> | ||
| </div> | ||
| <%= render ButtonComponent.new( | ||
| action: ->(**tag_options, &block) do | ||
| link_to( | ||
| "data:text/plain;charset=utf-8,#{CGI.escape(code)}", | ||
| download: 'personal_key.txt', | ||
| **tag_options, | ||
| &block | ||
| ) | ||
| end, | ||
| icon: :file_download, | ||
| outline: true, | ||
| class: 'margin-right-2 margin-bottom-2 tablet:margin-bottom-0', | ||
| ).with_content(t('forms.backup_code.download')) %> | ||
| <%= render PrintButtonComponent.new( | ||
| icon: :print, | ||
| outline: true, | ||
| type: :button, | ||
| class: 'margin-right-2 margin-bottom-2 tablet:margin-bottom-0', | ||
| ) %> | ||
| <%= render ClipboardButtonComponent.new( | ||
| clipboard_text: code, | ||
| outline: true, | ||
| class: 'margin-bottom-2 tablet:margin-bottom-0', | ||
| ) %> | ||
| <div class="margin-y-5 clearfix"> | ||
| <%= image_tag( | ||
| asset_url('alert/icon-lock-alert-important.svg'), | ||
| alt: '', | ||
| size: '80', | ||
| class: 'float-left margin-right-2', | ||
|
|
||
| <%= render AccordionComponent.new do |c| %> | ||
| <% c.header { t('forms.personal_key_partial.explanation.header') } %> | ||
| <% t('forms.personal_key_partial.explanation.text').each do |paragraph| %> | ||
| <p><%= paragraph %></p> | ||
| <% end %> | ||
| <% end %> | ||
|
|
||
| <%= simple_form_for('', url: update_path) do |f| %> | ||
| <% @acceptance_prompt = capture do %> | ||
| <p> | ||
| <strong> | ||
| <%= t('forms.personal_key_partial.acknowledgement.header') %> | ||
| </strong> | ||
| </p> | ||
| <p class="margin-bottom-0"> | ||
| <%= t('forms.personal_key_partial.acknowledgement.text') %> | ||
| </p> | ||
| <ul> | ||
| <% t('forms.personal_key_partial.acknowledgement.bullets').each do |bullet| %> | ||
| <li><%= bullet %></li> | ||
| <% end %> | ||
| </ul> | ||
| <p> | ||
| <%= t('forms.personal_key_partial.acknowledgement.instructions') %> | ||
| </p> | ||
| <% end %> | ||
|
|
||
| <%= render ValidatedFieldComponent.new( | ||
| form: f, | ||
| name: :acknowledgment, | ||
| as: :boolean, | ||
| label: @acceptance_prompt, | ||
| label_html: { class: 'margin-y-0' }, | ||
| required: true, | ||
| ) %> | ||
| <p class="margin-bottom-0"> | ||
| <strong><%= t('instructions.personal_key.email_title') %></strong> | ||
| </p> | ||
| <p><%= t('instructions.personal_key.email_body') %></p> | ||
| </div> | ||
| <%= button_to( | ||
| t('forms.buttons.continue'), | ||
| update_path, | ||
| class: 'display-block usa-button usa-button--big usa-button--wide personal-key-continue margin-top-5', | ||
| 'data-toggle': FeatureManagement.idv_personal_key_confirmation_enabled? ? 'modal' : 'skip', | ||
|
jmax-gsa marked this conversation as resolved.
|
||
| ) %> | ||
|
|
||
| <%= f.submit(t('forms.buttons.continue'), full_width: true, class: 'margin-top-3') %> | ||
| <% end %> | ||
|
|
||
| <%= render 'shared/personal_key_confirmation_modal', code: code, update_path: update_path %> | ||
|
jmax-gsa marked this conversation as resolved.
|
||
| <%== javascript_packs_tag_once 'personal-key-page-controller' %> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.