Commit d15c28fd authored by bondd's avatar bondd Committed by Commit bot

Autofill OSX: Disable inputs and Verify button after permanent error.

Disable expiration date popups, CVC text input field, and storage
checkbox once a permanent error message is shown.

BUG=448572

Review URL: https://codereview.chromium.org/1038043003

Cr-Commit-Position: refs/heads/master@{#322490}
parent a04a4b3f
......@@ -199,6 +199,13 @@ void CardUnmaskPromptViewBridge::PerformClose() {
[self updateVerifyButtonEnabled];
}
- (void)setInputsEnabled:(BOOL)enabled {
[cvcInput_ setEnabled:enabled];
[monthPopup_ setEnabled:enabled];
[yearPopup_ setEnabled:enabled];
[storageCheckbox_ setEnabled:enabled];
}
- (void)setRetriableErrorMessage:(const base::string16&)text {
NSAttributedString* attributedString =
constrained_window::GetAttributedLabelString(
......@@ -235,11 +242,14 @@ void CardUnmaskPromptViewBridge::PerformClose() {
}
[permanentErrorBox_ setHidden:text.empty()];
[self setInputsEnabled:NO];
[self updateVerifyButtonEnabled];
[self setRetriableErrorMessage:base::string16()];
}
- (void)updateVerifyButtonEnabled {
BOOL enable = ![inputRowView_ isHidden] &&
![[permanentErrorLabel_ stringValue] length] &&
bridge_->GetController()->InputCvcIsValid(
base::SysNSStringToUTF16([cvcInput_ stringValue])) &&
[self expirationDateIsValid];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment