Эх сурвалжийг харах

add disable_request_account

marinofaggiana 4 жил өмнө
parent
commit
86ad9471da

+ 2 - 1
iOSClient/Brand/NCBrand.swift

@@ -85,7 +85,8 @@ import UIKit
     @objc public var disable_more_external_site:        Bool = false
     @objc public var disable_openin_file:               Bool = false                                                // Don't touch me !!
     @objc public var disable_crash_service:             Bool = false
-    
+    @objc public var disable_request_account:           Bool = false
+
     override init() {
         
         if folderBrandAutoUpload != "" {

+ 13 - 10
iOSClient/Settings/CCManageAccount.m

@@ -87,17 +87,20 @@
 
     // Section : REQUEST ACCOUNT -------------------------------------------
     
-    section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_account_request_", nil)];
-    [form addFormSection:section];
+    if (NCBrandOptions.shared.disable_request_account == NO) {
     
-    row = [XLFormRowDescriptor formRowDescriptorWithTag:@"accountRequest" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_settings_account_request_", nil)];
-    row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundForm;
-    [row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
-    [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
-    [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
-    if ([CCUtility getAccountRequest]) row.value = @1;
-    else row.value = @0;
-    [section addFormRow:row];
+        section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_account_request_", nil)];
+        [form addFormSection:section];
+        
+        row = [XLFormRowDescriptor formRowDescriptorWithTag:@"accountRequest" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_settings_account_request_", nil)];
+        row.cellConfigAtConfigure[@"backgroundColor"] = NCBrandColor.shared.backgroundForm;
+        [row.cellConfig setObject:[[UIImage imageNamed:@"users"] imageWithColor:NCBrandColor.shared.icon size:25] forKey:@"imageView.image"];
+        [row.cellConfig setObject:[UIFont systemFontOfSize:15.0] forKey:@"textLabel.font"];
+        [row.cellConfig setObject:NCBrandColor.shared.textView forKey:@"textLabel.textColor"];
+        if ([CCUtility getAccountRequest]) row.value = @1;
+        else row.value = @0;
+        [section addFormRow:row];
+    }
     
     // Section : MANAGE ACCOUNT -------------------------------------------