|
@@ -43,7 +43,7 @@
|
|
XLFormRowDescriptor *row;
|
|
XLFormRowDescriptor *row;
|
|
|
|
|
|
NSArray *accounts = [[NCManageDatabase shared] getAllAccount];
|
|
NSArray *accounts = [[NCManageDatabase shared] getAllAccount];
|
|
- tableAccount *accountActive = [[NCManageDatabase shared] getAccountActive];
|
|
|
|
|
|
+ tableAccount *activeAccount = [[NCManageDatabase shared] getActiveAccount];
|
|
|
|
|
|
// Section : ACCOUNTS -------------------------------------------
|
|
// Section : ACCOUNTS -------------------------------------------
|
|
|
|
|
|
@@ -84,7 +84,7 @@
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"form-textbox"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"form-textbox"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textField.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textField.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textField.textColor"];
|
|
- row.value = accountActive.alias;
|
|
|
|
|
|
+ row.value = activeAccount.alias;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Section : REQUEST ACCOUNT -------------------------------------------
|
|
// Section : REQUEST ACCOUNT -------------------------------------------
|
|
@@ -139,7 +139,7 @@
|
|
#if TARGET_OS_SIMULATOR
|
|
#if TARGET_OS_SIMULATOR
|
|
// Set user status
|
|
// Set user status
|
|
if (@available(iOS 13.0, *)) {
|
|
if (@available(iOS 13.0, *)) {
|
|
- BOOL userStatus = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:accountActive.account elements:NCElementsJSON.shared.capabilitiesUserStatusEnabled exists:false];
|
|
|
|
|
|
+ BOOL userStatus = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:activeAccount.account elements:NCElementsJSON.shared.capabilitiesUserStatusEnabled exists:false];
|
|
if (userStatus) {
|
|
if (userStatus) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"setUserStatus" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_set_user_status_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"setUserStatus" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_set_user_status_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
@@ -161,107 +161,107 @@
|
|
[form addFormSection:section];
|
|
[form addFormSection:section];
|
|
|
|
|
|
// Full Name
|
|
// Full Name
|
|
- if ([accountActive.displayName length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.displayName length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userfullname" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_full_name_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userfullname" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_full_name_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"user"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"user"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.displayName;
|
|
|
|
|
|
+ row.value = activeAccount.displayName;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Address
|
|
// Address
|
|
- if ([accountActive.address length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.address length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useraddress" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_address_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useraddress" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_address_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"address"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"address"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.address;
|
|
|
|
|
|
+ row.value = activeAccount.address;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// City + zip
|
|
// City + zip
|
|
- if ([accountActive.city length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.city length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercity" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_city_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercity" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_city_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"city"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"city"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.city;
|
|
|
|
- if ([accountActive.zip length] > 0) {
|
|
|
|
- row.value = [NSString stringWithFormat:@"%@ %@", row.value, accountActive.zip];
|
|
|
|
|
|
+ row.value = activeAccount.city;
|
|
|
|
+ if ([activeAccount.zip length] > 0) {
|
|
|
|
+ row.value = [NSString stringWithFormat:@"%@ %@", row.value, activeAccount.zip];
|
|
}
|
|
}
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Country
|
|
// Country
|
|
- if ([accountActive.country length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.country length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercountry" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_country_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercountry" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_country_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"country"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"country"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = [[NSLocale systemLocale] displayNameForKey:NSLocaleCountryCode value:accountActive.country];
|
|
|
|
|
|
+ row.value = [[NSLocale systemLocale] displayNameForKey:NSLocaleCountryCode value:activeAccount.country];
|
|
//NSArray *countryCodes = [NSLocale ISOCountryCodes];
|
|
//NSArray *countryCodes = [NSLocale ISOCountryCodes];
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Phone
|
|
// Phone
|
|
- if ([accountActive.phone length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.phone length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userphone" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_phone_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userphone" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_phone_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"phone"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"phone"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.phone;
|
|
|
|
|
|
+ row.value = activeAccount.phone;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Email
|
|
// Email
|
|
- if ([accountActive.email length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.email length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useremail" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_email_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useremail" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_email_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"email"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"email"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.email;
|
|
|
|
|
|
+ row.value = activeAccount.email;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Web
|
|
// Web
|
|
- if ([accountActive.webpage length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.webpage length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userweb" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_web_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userweb" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_web_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"network"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"network"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.webpage;
|
|
|
|
|
|
+ row.value = activeAccount.webpage;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Twitter
|
|
// Twitter
|
|
- if ([accountActive.twitter length] > 0) {
|
|
|
|
|
|
+ if ([activeAccount.twitter length] > 0) {
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usertwitter" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_twitter_", nil)];
|
|
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usertwitter" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_twitter_", nil)];
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.cellSettings;
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"twitter"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"twitter"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.twitter;
|
|
|
|
|
|
+ row.value = activeAccount.twitter;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
|
|
|
|
// Section : THIRT PART -------------------------------------------
|
|
// Section : THIRT PART -------------------------------------------
|
|
- BOOL isHandwerkcloudEnabled = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:accountActive.account elements:NCElementsJSON.shared.capabilitiesHWCEnabled exists:false];
|
|
|
|
|
|
+ BOOL isHandwerkcloudEnabled = [[NCManageDatabase shared] getCapabilitiesServerBoolWithAccount:activeAccount.account elements:NCElementsJSON.shared.capabilitiesHWCEnabled exists:false];
|
|
if (isHandwerkcloudEnabled) {
|
|
if (isHandwerkcloudEnabled) {
|
|
|
|
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_user_job_", nil)];
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_user_job_", nil)];
|
|
@@ -274,7 +274,7 @@
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"businesstype"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"businesstype"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.businessType;
|
|
|
|
|
|
+ row.value = activeAccount.businessType;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Business Size
|
|
// Business Size
|
|
@@ -284,7 +284,7 @@
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.businessSize;
|
|
|
|
|
|
+ row.value = activeAccount.businessSize;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Role
|
|
// Role
|
|
@@ -294,9 +294,9 @@
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"role"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"role"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- if ([accountActive.role isEqualToString:@"owner"]) row.value = NSLocalizedString(@"_user_owner_", nil);
|
|
|
|
- else if ([accountActive.role isEqualToString:@"employee"]) row.value = NSLocalizedString(@"_user_employee_", nil);
|
|
|
|
- else if ([accountActive.role isEqualToString:@"contractor"]) row.value = NSLocalizedString(@"_user_contractor_", nil);
|
|
|
|
|
|
+ if ([activeAccount.role isEqualToString:@"owner"]) row.value = NSLocalizedString(@"_user_owner_", nil);
|
|
|
|
+ else if ([activeAccount.role isEqualToString:@"employee"]) row.value = NSLocalizedString(@"_user_employee_", nil);
|
|
|
|
+ else if ([activeAccount.role isEqualToString:@"contractor"]) row.value = NSLocalizedString(@"_user_contractor_", nil);
|
|
else row.value = @"";
|
|
else row.value = @"";
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
@@ -307,10 +307,10 @@
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"detailTextLabel.font"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"company"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"company"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- row.value = accountActive.company;
|
|
|
|
|
|
+ row.value = activeAccount.company;
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
- if (accountActive.hcIsTrial) {
|
|
|
|
|
|
+ if (activeAccount.hcIsTrial) {
|
|
|
|
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_trial_", nil)];
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_trial_", nil)];
|
|
[form addFormSection:section];
|
|
[form addFormSection:section];
|
|
@@ -322,7 +322,7 @@
|
|
[row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
|
|
[row.cellConfig setObject:[UIColor redColor] forKey:@"detailTextLabel.textColor"];
|
|
[row.cellConfig setObject:[UIColor redColor] forKey:@"detailTextLabel.textColor"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"timer"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
[row.cellConfig setObject:[[UIImage imageNamed:@"timer"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
|
|
- NSInteger numberOfDays = accountActive.hcTrialRemainingSec / (24*3600);
|
|
|
|
|
|
+ NSInteger numberOfDays = activeAccount.hcTrialRemainingSec / (24*3600);
|
|
row.value = [@(numberOfDays) stringValue];
|
|
row.value = [@(numberOfDays) stringValue];
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
}
|
|
}
|
|
@@ -400,11 +400,11 @@
|
|
[super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
|
|
[super formRowDescriptorValueHasChanged:rowDescriptor oldValue:oldValue newValue:newValue];
|
|
|
|
|
|
NSArray *accounts = [[NCManageDatabase shared] getAllAccount];
|
|
NSArray *accounts = [[NCManageDatabase shared] getAllAccount];
|
|
- tableAccount *accountActive = [[NCManageDatabase shared] getAccountActive];
|
|
|
|
|
|
+ tableAccount *activeAccount = [[NCManageDatabase shared] getActiveAccount];
|
|
|
|
|
|
for (tableAccount *account in accounts) {
|
|
for (tableAccount *account in accounts) {
|
|
if ([rowDescriptor.tag isEqualToString:account.account]) {
|
|
if ([rowDescriptor.tag isEqualToString:account.account]) {
|
|
- if (![account.account isEqualToString:accountActive.account]) {
|
|
|
|
|
|
+ if (![account.account isEqualToString:activeAccount.account]) {
|
|
[self ChangeDefaultAccount:account.account];
|
|
[self ChangeDefaultAccount:account.account];
|
|
[self initializeForm];
|
|
[self initializeForm];
|
|
}
|
|
}
|
|
@@ -448,8 +448,8 @@
|
|
|
|
|
|
[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_delete_", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
[alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_delete_", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
|
|
|
|
- tableAccount *accountActive = [[NCManageDatabase shared] getAccountActive];
|
|
|
|
- NSString *account = accountActive.account;
|
|
|
|
|
|
+ tableAccount *activeAccount = [[NCManageDatabase shared] getActiveAccount];
|
|
|
|
+ NSString *account = activeAccount.account;
|
|
|
|
|
|
if (account) {
|
|
if (account) {
|
|
[appDelegate deleteAccount:account wipe:false];
|
|
[appDelegate deleteAccount:account wipe:false];
|