Index: chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm |
diff --git a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm |
index 6a1aa5695463f5c4922ef6db1d42854cddcd7c4a..365c888998652561f421558e71384ed3d1b9f42d 100644 |
--- a/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm |
+++ b/chrome/browser/ui/cocoa/autofill/card_unmask_prompt_view_bridge.mm |
@@ -199,6 +199,13 @@ void CardUnmaskPromptViewBridge::PerformClose() { |
[self updateVerifyButtonEnabled]; |
} |
+- (void)setInputsEnabled:(BOOL)enabled { |
bondd
2015/03/26 19:50:06
Only ever called with enabled == NO. I could renam
groby-ooo-7-16
2015/03/26 20:17:45
No, I'd leave it, for API symmetry. If you leave t
bondd
2015/03/26 20:33:12
We want to leave the Cancel button enabled.
bondd
2015/03/26 20:46:52
Also, unless I'm missing something this will give
|
+ [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] && |
bondd
2015/03/26 19:50:06
Alternatively, this line could be "[cvcInput_ isEn
groby-ooo-7-16
2015/03/26 20:17:45
I like the current one better, because it's more g
bondd
2015/03/26 20:33:12
Acknowledged.
|
bridge_->GetController()->InputCvcIsValid( |
base::SysNSStringToUTF16([cvcInput_ stringValue])) && |
[self expirationDateIsValid]; |