-
Notifications
You must be signed in to change notification settings - Fork 166
LG-11458 Redirect users who choose Opt-in IPP to the beginning of the IPP flow #9598
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 all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
9e63aad
Add prototype routing for opt-in IPP experiment
c594043
Add phone_with_camera placeholder value
ed10d41
Remove console.log
5fd7eb8
Modifying opt-in IPP to use doc capture page
607233d
Delete unused opt_in_ipp page
9673b99
Couple little cleanups
ccabc6b
add variable to hybrid mobile view
gina-yamada e9cc671
pulled in main, resolved conflicts
gina-yamada 5c7fa64
set skip_doc_auth to false
gina-yamada d7bb67c
Updated for params are handled
gina-yamada f4ab8ff
Add const, require idv_how_to_verify_form for params
gina-yamada fd5a861
delete opt-in-ipp component and use existing flow to skip doc auth wh…
gina-yamada 4c864e8
fix linter errors
gina-yamada 2c2da02
fix failing test
gina-yamada 7de7b41
add var to specs
gina-yamada fef5a5b
changelog: Upcoming Features, In-person proofing, Redirect users who …
gina-yamada 16a5306
Add inPersonURL to prop list
gina-yamada 21881c7
fix linter error
gina-yamada 87c8eb4
pulled in main, resolved conflicts
gina-yamada 258b179
add props to in-person context
gina-yamada 82de75c
fix linter errors
gina-yamada 7150d78
reset idv_session.skip_doc_auth, add before action
gina-yamada b6d5a87
make first step dynamic
gina-yamada 636673b
remove comment
gina-yamada 20acbf2
set const only if inside if block
gina-yamada f917339
Del logic in form-steps change skipDocAuth to bool
gina-yamada 13506a3
utilize initialStep in form-steps to del doc logic
gina-yamada 406e1fe
add specs
gina-yamada 1672de5
move code to one line
gina-yamada fc6308d
Use constant to eval/assign
gina-yamada 158cb19
moved attr in alpha order
gina-yamada dc71edf
removing additional check
gina-yamada 94ffba2
pulled in main, resolved conflict
gina-yamada 54cc97a
update comment
gina-yamada 0dbcf3d
Merge branch 'main' of github.com:18F/identity-idp into yamada/LG-114…
gina-yamada 20d1410
Pass in selection if going back, del before actio
gina-yamada 4854b8e
added before action to allow back button
gina-yamada 655af88
Made dry
gina-yamada ba889ef
Refactor to make code dry
gina-yamada a4a4932
fix linter error
gina-yamada 949d99f
Merge branch 'main' of github.com:18F/identity-idp into yamada/LG-114…
gina-yamada 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
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,42 +1,23 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Idv | ||
| class HowToVerifyForm | ||
| include ActiveModel::Model | ||
| ATTRIBUTES = [:selection].freeze | ||
| REMOTE = 'remote' | ||
| IPP = 'ipp' | ||
|
|
||
| attr_accessor :selection | ||
| REMOTE = 'remote'.freeze | ||
| IPP = 'ipp'.freeze | ||
|
|
||
| attr_reader :selection | ||
|
|
||
| validates :selection, inclusion: { | ||
| in: [REMOTE, IPP], | ||
| } | ||
| validates :selection, presence: { | ||
| message: proc { I18n.t('errors.doc_auth.how_to_verify_form') }, | ||
| } | ||
| validates :selection, | ||
| presence: { message: proc { I18n.t('errors.doc_auth.how_to_verify_form') } } | ||
gina-yamada marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| def initialize(selection: nil) | ||
| @selection = selection | ||
| end | ||
|
|
||
| def submit(params) | ||
| consume_params(params) | ||
| @selection = params[:selection] | ||
|
|
||
| FormResponse.new(success: valid?, errors: errors) | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def consume_params(params) | ||
| params.each do |key, value| | ||
| raise_invalid_how_to_verify_parameter_error(key) unless ATTRIBUTES.include?(key.to_sym) | ||
| send("#{key}=", value) | ||
| end | ||
| end | ||
|
|
||
| def raise_invalid_how_to_verify_parameter_error(key) | ||
| raise ArgumentError, "#{key} is an invalid how_to_verify attribute" | ||
| end | ||
| end | ||
| end | ||
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
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.