Skip to content

Commit

Permalink
Merge pull request ResearchKit#132 from dephillipsmichael/feature/edi…
Browse files Browse the repository at this point in the history
…t_users_name

feature/edit_users_name
  • Loading branch information
Erin-Mounts authored Jun 24, 2016
2 parents c94fddf + 495f5e6 commit 0cb366f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
*/
@property (nonatomic) BOOL canEditBiologicalSex;

/*
* If set to YES, name text field can be edited by the user when isEditing
* If set to NO, name will not be enabled
*/
@property (nonatomic) BOOL canEditUsersName;


- (IBAction)leaveStudy:(id)sender;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ - (void)refreshView
self.nameTextField.delegate = self;

self.nameTextField.text = (self.user.name != nil) ? self.user.name : @"";
self.nameTextField.enabled = NO;
self.nameTextField.enabled = self.canEditUsersName;

self.emailTextField.text = self.user.email;
self.emailTextField.enabled = NO;
Expand Down

0 comments on commit 0cb366f

Please sign in to comment.