Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm

Issue 2744823003: [Payment Request] Generic edit form (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm
diff --git a/ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm b/ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm
index 1db80550919c677c68e962d8a09dd2baf38fcb82..0fc58b149a7ff684937f0f332f0c074b30909c73 100644
--- a/ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm
+++ b/ios/chrome/browser/ui/settings/cells/autofill_edit_item.mm
@@ -31,6 +31,7 @@ const CGFloat kLabelAndFieldGap = 5;
@synthesize cardTypeIcon = _cardTypeIcon;
@synthesize textFieldEnabled = _textFieldEnabled;
@synthesize autofillType = _autofillType;
+@synthesize required = _required;
- (instancetype)initWithType:(NSInteger)type {
self = [super initWithType:type];
@@ -44,7 +45,9 @@ const CGFloat kLabelAndFieldGap = 5;
- (void)configureCell:(AutofillEditCell*)cell {
[super configureCell:cell];
- cell.textLabel.text = self.textFieldName;
+ NSString* textLabelFormat = self.required ? @"%@*" : @"%@";
+ cell.textLabel.text =
+ [NSString stringWithFormat:textLabelFormat, self.textFieldName];
cell.textField.text = self.textFieldValue;
if (self.textFieldName.length) {
cell.textField.accessibilityIdentifier =

Powered by Google App Engine
This is Rietveld 408576698