fix lint errors
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Max Erenberg 2021-09-07 03:05:13 +00:00
parent 1406899ea2
commit a08fca4c60
3 changed files with 6 additions and 5 deletions

View File

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

View File

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

View File

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