Reset newly added fields in ShareOptionsView correctly

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-03-07 01:20:58 +08:00
parent d0195e67c3
commit d12cdebf48

View file

@ -101,15 +101,20 @@ class ShareOptionsView: NSView {
}
func reset() {
shareTypePicker.select(publicLinkShareMenuItem)
shareRecipientTextField.stringValue = ""
labelTextField.stringValue = ""
uploadEditPermissionCheckbox.state = .off
hideDownloadCheckbox.state = .off
passwordProtectCheckbox.state = .off
passwordSecureField.isHidden = true
passwordSecureField.stringValue = ""
expirationDateCheckbox.state = .off
expirationDatePicker.isHidden = true
expirationDatePicker.dateValue = NSDate.now
noteForRecipientCheckbox.state = .off
noteTextField.isHidden = true
noteTextField.stringValue = ""
}
func setAllFields(enabled: Bool) {