mirror of
https://github.com/borgbase/vorta
synced 2024-12-21 23:33:13 +00:00
hide password field if encryption is none
This commit is contained in:
parent
6b5f7a7aac
commit
f252a8ec6a
2 changed files with 8 additions and 0 deletions
|
@ -170,3 +170,9 @@ def create_form_widget(self, parent: Optional[QWidget] = None) -> QWidget:
|
|||
self.add_form_to_layout(form_layout)
|
||||
widget.setLayout(form_layout)
|
||||
return widget
|
||||
|
||||
def set_visibility(self, visible: bool) -> None:
|
||||
self._label_password.setVisible(visible)
|
||||
self._label_confirm.setVisible(visible)
|
||||
self.passwordLineEdit.setVisible(visible)
|
||||
self.confirmLineEdit.setVisible(visible)
|
||||
|
|
|
@ -199,8 +199,10 @@ def encryption_listener(self):
|
|||
'''Validates passwords only if its going to be used'''
|
||||
if self.values['encryption'] == 'none':
|
||||
self.passwordInput.set_validation_enabled(False)
|
||||
self.passwordInput.set_visibility(False)
|
||||
else:
|
||||
self.passwordInput.set_validation_enabled(True)
|
||||
self.passwordInput.set_visibility(True)
|
||||
|
||||
def display_backend_warning(self):
|
||||
'''Display password backend message based off current keyring'''
|
||||
|
|
Loading…
Reference in a new issue