fix lint errors
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
1406899ea2
commit
a08fca4c60
|
@ -126,7 +126,7 @@ class CeoFrame(Frame):
|
|||
self.add_layout(layout)
|
||||
self._status_label = Label('')
|
||||
layout.add_widget(self._status_label)
|
||||
|
||||
|
||||
def flash_message(self, msg: str, force_update: bool = False):
|
||||
self._status_label.text = msg
|
||||
if force_update:
|
||||
|
|
|
@ -3,6 +3,7 @@ from asciimatics.widgets import Layout, Text
|
|||
from ...utils import http_get
|
||||
from ..CeoFrame import CeoFrame
|
||||
|
||||
|
||||
class GetUserView(CeoFrame):
|
||||
def __init__(self, screen, width, height, model):
|
||||
super().__init__(
|
||||
|
@ -13,7 +14,7 @@ class GetUserView(CeoFrame):
|
|||
self.add_layout(layout)
|
||||
self._username = Text("Username:", "uid")
|
||||
layout.add_widget(self._username)
|
||||
|
||||
|
||||
self.add_flash_message_layout()
|
||||
self.add_buttons(
|
||||
back_btn=True,
|
||||
|
|
|
@ -15,16 +15,16 @@ class ResetPasswordView(CeoFrame):
|
|||
layout.add_widget(Label('Enter the username of the user whose password will be reset:'))
|
||||
self._username = Text(None, "uid")
|
||||
layout.add_widget(self._username)
|
||||
|
||||
|
||||
self.add_buttons(
|
||||
back_btn=True,
|
||||
next_scene='Confirm', on_next=self._next)
|
||||
self.fix()
|
||||
|
||||
|
||||
def _next(self):
|
||||
uid = self._username.value
|
||||
self._model.viewdata['ResetPassword']['uid'] = uid
|
||||
self._model.confirm_lines= [
|
||||
self._model.confirm_lines = [
|
||||
f"Are you sure you want to reset {uid}'s password?",
|
||||
]
|
||||
self._model.deferred_req = defer(http_post, f'/api/members/{uid}/pwreset')
|
||||
|
|
Loading…
Reference in New Issue