Disable the login field if login is generated.
This commit is contained in:
parent
3970cd2eac
commit
7818feaf0b
@ -265,6 +265,9 @@
|
|||||||
[alert setInformativeText:strf( @"Your login name for: %@", self.selectedSite.name )];
|
[alert setInformativeText:strf( @"Your login name for: %@", self.selectedSite.name )];
|
||||||
NSTextField *loginField = [NSTextField new];
|
NSTextField *loginField = [NSTextField new];
|
||||||
[loginField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginName" options:nil];
|
[loginField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginName" options:nil];
|
||||||
|
[loginField bind:@"enabled" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:@{
|
||||||
|
NSValueTransformerNameBindingOption: NSNegateBooleanTransformerName
|
||||||
|
}];
|
||||||
NSButton *generatedField = [NSButton new];
|
NSButton *generatedField = [NSButton new];
|
||||||
[generatedField setButtonType:NSSwitchButton];
|
[generatedField setButtonType:NSSwitchButton];
|
||||||
[generatedField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:nil];
|
[generatedField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:nil];
|
||||||
|
Loading…
Reference in New Issue
Block a user