2
0

Disable the login field if login is generated.

This commit is contained in:
Maarten Billemont 2020-04-08 20:21:58 -04:00
parent 3970cd2eac
commit 7818feaf0b

View File

@ -265,6 +265,9 @@
[alert setInformativeText:strf( @"Your login name for: %@", self.selectedSite.name )];
NSTextField *loginField = [NSTextField new];
[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];
[generatedField setButtonType:NSSwitchButton];
[generatedField bind:@"value" toObject:self.selectedSite withKeyPath:@"loginGenerated" options:nil];