|
@@ -36,7 +36,7 @@
|
|
|
|
|
|
@implementation CCContoCorrente
|
|
@implementation CCContoCorrente
|
|
|
|
|
|
-- (id)initWithDelegate:(id <CCContoCorrenteDelegate>)delegate fileName:(NSString *)fileName uuid:(NSString *)uuid rev:(NSString *)rev fileID:(NSString *)fileID modelReadOnly:(BOOL)modelReadOnly isLocal:(BOOL)isLocal serverUrl:(NSString *)serverUrl
|
|
|
|
|
|
+- (id)initWithDelegate:(id <CCContoCorrenteDelegate>)delegate fileName:(NSString *)fileName uuid:(NSString *)uuid fileID:(NSString *)fileID isLocal:(BOOL)isLocal serverUrl:(NSString *)serverUrl
|
|
{
|
|
{
|
|
self = [super init];
|
|
self = [super init];
|
|
|
|
|
|
@@ -45,7 +45,6 @@
|
|
self.delegate = delegate;
|
|
self.delegate = delegate;
|
|
self.fileName = fileName;
|
|
self.fileName = fileName;
|
|
self.isLocal = isLocal;
|
|
self.isLocal = isLocal;
|
|
- self.rev = rev;
|
|
|
|
self.fileID = fileID;
|
|
self.fileID = fileID;
|
|
self.uuid = uuid;
|
|
self.uuid = uuid;
|
|
self.serverUrl = serverUrl;
|
|
self.serverUrl = serverUrl;
|
|
@@ -72,7 +71,6 @@
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"titolo"];
|
|
row.value = [field objectForKey:@"titolo"];
|
|
row.required = YES;
|
|
row.required = YES;
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_bank_account_data_", nil)];
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_bank_account_data_", nil)];
|
|
@@ -84,7 +82,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"nomebanca"];
|
|
row.value = [field objectForKey:@"nomebanca"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Nome Conognome
|
|
// Nome Conognome
|
|
@@ -93,7 +90,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"nomecognome"];
|
|
row.value = [field objectForKey:@"nomecognome"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Numero Conto
|
|
// Numero Conto
|
|
@@ -102,7 +98,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"numeroconto"];
|
|
row.value = [field objectForKey:@"numeroconto"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// IBAN
|
|
// IBAN
|
|
@@ -111,7 +106,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"iban"];
|
|
row.value = [field objectForKey:@"iban"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// SWIFT
|
|
// SWIFT
|
|
@@ -120,7 +114,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"swift"];
|
|
row.value = [field objectForKey:@"swift"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
// Filiale
|
|
// Filiale
|
|
@@ -129,7 +122,6 @@
|
|
[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:@"textField.font"];
|
|
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textField.font"];
|
|
row.value = [field objectForKey:@"filiale"];
|
|
row.value = [field objectForKey:@"filiale"];
|
|
- if (modelReadOnly) row.disabled = @YES;
|
|
|
|
[section addFormRow:row];
|
|
[section addFormRow:row];
|
|
|
|
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_notes_", nil)];
|
|
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_notes_", nil)];
|
|
@@ -145,10 +137,7 @@
|
|
|
|
|
|
self.form = form;
|
|
self.form = form;
|
|
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelPressed:)];
|
|
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelPressed:)];
|
|
-
|
|
|
|
- if (modelReadOnly) self.navigationItem.rightBarButtonItem = nil;
|
|
|
|
- else self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(savePressed:)];
|
|
|
|
-
|
|
|
|
|
|
+ self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(savePressed:)];
|
|
}
|
|
}
|
|
|
|
|
|
return self;
|
|
return self;
|
|
@@ -196,7 +185,6 @@
|
|
|
|
|
|
NSArray *validationErrors = [self formValidationErrors];
|
|
NSArray *validationErrors = [self formValidationErrors];
|
|
if (validationErrors.count > 0){
|
|
if (validationErrors.count > 0){
|
|
- //NSError *error = [validationErrors firstObject];
|
|
|
|
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"_error_", nil) message:NSLocalizedString(@"_enter_title_", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"_ok_", nil) otherButtonTitles:nil];
|
|
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"_error_", nil) message:NSLocalizedString(@"_enter_title_", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"_ok_", nil) otherButtonTitles:nil];
|
|
[alertView show];
|
|
[alertView show];
|
|
return;
|
|
return;
|
|
@@ -216,14 +204,21 @@
|
|
metadataNet.fileName = [CCUtility trasformedFileNamePlistInCrypto:fileNameModel];
|
|
metadataNet.fileName = [CCUtility trasformedFileNamePlistInCrypto:fileNameModel];
|
|
metadataNet.fileNamePrint = titolo.value;
|
|
metadataNet.fileNamePrint = titolo.value;
|
|
metadataNet.pathFolder = NSTemporaryDirectory();
|
|
metadataNet.pathFolder = NSTemporaryDirectory();
|
|
- metadataNet.rev = self.rev;
|
|
|
|
metadataNet.session = k_upload_session_foreground;
|
|
metadataNet.session = k_upload_session_foreground;
|
|
metadataNet.taskStatus = k_taskStatusResume;
|
|
metadataNet.taskStatus = k_taskStatusResume;
|
|
|
|
|
|
- [app addNetworkingOperationQueue:app.netQueue delegate:self.delegate metadataNet:metadataNet];
|
|
|
|
-
|
|
|
|
- [self dismissViewControllerAnimated:YES completion:nil];
|
|
|
|
|
|
+ [app addNetworkingOperationQueue:app.netQueue delegate:self metadataNet:metadataNet];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+- (void)uploadFileFailure:(CCMetadataNet *)metadataNet fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector message:(NSString *)message errorCode:(NSInteger)errorCode
|
|
|
|
+{
|
|
|
|
+ [app messageNotification:@"_upload_file_" description:message visible:YES delay:k_dismissAfterSecond type:TWMessageBarMessageTypeError];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+- (void)uploadFileSuccess:(CCMetadataNet *)metadataNet fileID:(NSString *)fileID serverUrl:(NSString *)serverUrl selector:(NSString *)selector selectorPost:(NSString *)selectorPost
|
|
|
|
+{
|
|
|
|
+ [self dismissViewControllerAnimated:YES completion:nil];
|
|
|
|
+}
|
|
|
|
+
|
|
@end
|
|
@end
|