Skip to content

Commit

Permalink
Disable the save button if name is empty
Browse files Browse the repository at this point in the history
During the name fix flow, the cardholder name is empty at times (reason unknown,
but mostly because of sync)
In such a scenario, we should have the save card button on the dialog
disabled by default

Bug: 929421
Change-Id: I195422134a263bc201caec2059f4834f7476eb43
Reviewed-on: https://chromium-review.googlesource.com/c/1487144
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Jared Saul <jsaul@google.com>
Commit-Queue: Siddharth Shah <siashah@chromium.org>
Cr-Commit-Position: refs/heads/master@{#635617}
  • Loading branch information
siashah authored and Commit Bot committed Feb 26, 2019
1 parent 5e8bbef commit 1dc71be
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public AutofillNameFixFlowPrompt(Context context, AutofillNameFixFlowPromptDeleg
.with(ModalDialogProperties.NEGATIVE_BUTTON_TEXT,
context.getResources(), R.string.cancel)
.with(ModalDialogProperties.CANCEL_ON_TOUCH_OUTSIDE, true)
.with(ModalDialogProperties.POSITIVE_BUTTON_DISABLED,
inferredName.isEmpty())
.build();

// Hitting the "submit" button on the software keyboard should submit.
Expand Down

0 comments on commit 1dc71be

Please sign in to comment.