Prevent sending empty feedback
technically can still send just a bunch of spaces, but whatever
This commit is contained in:
parent
a7ab1b5882
commit
0767b81d0b
|
@ -410,6 +410,9 @@ class POSView(WuttaView):
|
|||
autofocus=True)
|
||||
|
||||
def send_feedback(e):
|
||||
|
||||
if message.value:
|
||||
|
||||
self.app.send_email('pos_feedback', data={
|
||||
'user_name': self.page.session.get('user_display'),
|
||||
'message': message.value,
|
||||
|
@ -425,6 +428,10 @@ class POSView(WuttaView):
|
|||
self.page.snack_bar.open = True
|
||||
|
||||
self.main_input.focus()
|
||||
|
||||
else:
|
||||
message.focus()
|
||||
|
||||
self.page.update()
|
||||
|
||||
def cancel(e):
|
||||
|
|
Loading…
Reference in a new issue