Skip to content

Commit

Permalink
Made users name editable
Browse files Browse the repository at this point in the history
  • Loading branch information
dephillipsmichael committed Jun 15, 2016
1 parent 7e8c7f0 commit 495f5e6
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 495f5e6

Please sign in to comment.