1
0
Fork 0
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:
shivansh02 2024-05-31 18:33:14 +05:30 committed by Manu
parent 6b5f7a7aac
commit f252a8ec6a
2 changed files with 8 additions and 0 deletions

View file

@ -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)

View file

@ -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'''