Add convenience function to enable or disable all share option fields

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-03-04 21:35:25 +08:00
parent 422a6c7962
commit 19316f4d3a

View file

@ -62,4 +62,18 @@ class ShareOptionsView: NSView {
noteForRecipientCheckbox.state = .off noteForRecipientCheckbox.state = .off
noteTextField.isHidden = true noteTextField.isHidden = true
} }
func setAllFields(enabled: Bool) {
labelTextField.isEnabled = enabled
uploadEditPermissionCheckbox.isEnabled = enabled
hideDownloadCheckbox.isEnabled = enabled
passwordProtectCheckbox.isEnabled = enabled
passwordSecureField.isEnabled = enabled
expirationDateCheckbox.isEnabled = enabled
expirationDatePicker.isEnabled = enabled
noteForRecipientCheckbox.isEnabled = enabled
noteTextField.isEnabled = enabled
saveButton.isEnabled = enabled
deleteButton.isEnabled = enabled
}
} }