Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: ios/chrome/browser/ui/payments/payment_request_edit_view_controller.mm

Issue 2956433002: [Payment Request] keyboardType, autoCapitalizationType, etc for text fields (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h" 5 #import "ios/chrome/browser/ui/payments/payment_request_edit_view_controller.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "base/mac/foundation_util.h" 8 #import "base/mac/foundation_util.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "components/strings/grit/components_strings.h" 10 #include "components/strings/grit/components_strings.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 [model addSectionWithIdentifier:sectionIdentifier]; 243 [model addSectionWithIdentifier:sectionIdentifier];
244 switch (field.fieldType) { 244 switch (field.fieldType) {
245 case EditorFieldTypeTextField: { 245 case EditorFieldTypeTextField: {
246 AutofillEditItem* item = 246 AutofillEditItem* item =
247 [[AutofillEditItem alloc] initWithType:ItemTypeTextField]; 247 [[AutofillEditItem alloc] initWithType:ItemTypeTextField];
248 item.textFieldName = field.label; 248 item.textFieldName = field.label;
249 item.textFieldEnabled = field.enabled; 249 item.textFieldEnabled = field.enabled;
250 item.textFieldValue = field.value; 250 item.textFieldValue = field.value;
251 item.required = field.isRequired; 251 item.required = field.isRequired;
252 item.autofillUIType = field.autofillUIType; 252 item.autofillUIType = field.autofillUIType;
253 item.returnKeyType = field.returnKeyType;
254 item.keyboardType = field.keyboardType;
255 item.autoCapitalizationType = field.autoCapitalizationType;
253 item.identifyingIcon = [_dataSource iconIdentifyingEditorField:field]; 256 item.identifyingIcon = [_dataSource iconIdentifyingEditorField:field];
254 [model addItem:item toSectionWithIdentifier:sectionIdentifier]; 257 [model addItem:item toSectionWithIdentifier:sectionIdentifier];
255 field.item = item; 258 field.item = item;
256 259
257 break; 260 break;
258 } 261 }
259 case EditorFieldTypeSelector: { 262 case EditorFieldTypeSelector: {
260 PaymentsSelectorEditItem* item = [[PaymentsSelectorEditItem alloc] 263 PaymentsSelectorEditItem* item = [[PaymentsSelectorEditItem alloc]
261 initWithType:ItemTypeSelectorField]; 264 initWithType:ItemTypeSelectorField];
262 item.name = field.label; 265 item.name = field.label;
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 [_currentEditingCell.textField resignFirstResponder]; 772 [_currentEditingCell.textField resignFirstResponder];
770 773
771 if (![self validateForm]) 774 if (![self validateForm])
772 return; 775 return;
773 776
774 [self.delegate paymentRequestEditViewController:self 777 [self.delegate paymentRequestEditViewController:self
775 didFinishEditingFields:self.fields]; 778 didFinishEditingFields:self.fields];
776 } 779 }
777 780
778 @end 781 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698