 import MetabolicCompassKit
 
 class ProfileModel: UserInfoModel {
-    
+
     override func modelItems() -> [ModelItem] {
-        
         var fields = [ModelItem]()
-        
+
         fields.append(self.loadPhotoField)
         fields.append(self.firstNameField)
         fields.append(self.lastNameField)

                    item.setNewValue(profileItemInfo)
                }
            }
            
        }
    }
    
    private let uneditableFields:[UserInfoFiledType] = [.Email, .FirstName, .LastName]
    
    func isItemEditable(item: ModelItem) -> Bool {
        
        return !uneditableFields.contains(item.type)
    }
    
    override func profileItems() -> [String : String] {
        var newItems : [ModelItem] = [ModelItem]()
        
        for item in items {
            if isItemEditable(item) {
                newItems.append(item)
            }
        }
        
        return profileItems(newItems)
    }
    
    
    override func isModelValid() -> Bool {
        
        resetValidationResults()
        
        return isPhotoValid() && /* isEmailValid() && isPasswordValid() && isFirstNameValid() && isLastNameValid() && */ isAgeValid()  && isWeightValid() && isHeightValid()
    }
}

        fields.append(self.unitsSystemField)
        fields.append(self.weightField)
        fields.append(self.heightField)

        return fields
    }

    // TODO: Yanif: these should all be pulled from the UserManager.
    func setupValues() {
        let profileInfo = UserManager.sharedManager.getProfileCache()

        for item in items {
            if item.type == .FirstName {
                item.setNewValue(AccountManager.shared.userInfo?.firstName)
            }
