AddForm works again???
This commit is contained in:
parent
670347ca73
commit
841a1f0d17
8
form.py
8
form.py
|
@ -156,7 +156,7 @@ class FormWindow:
|
||||||
if self.bt==0:
|
if self.bt==0:
|
||||||
return {}
|
return {}
|
||||||
elif self.bt==1:
|
elif self.bt==1:
|
||||||
return self.return_values()
|
return self._return_values()
|
||||||
else:
|
else:
|
||||||
self._mv_focus(+1)
|
self._mv_focus(+1)
|
||||||
self.w.refresh()
|
self.w.refresh()
|
||||||
|
@ -241,7 +241,7 @@ class FormWindow:
|
||||||
def _return_values(self):
|
def _return_values(self):
|
||||||
book = {}
|
book = {}
|
||||||
for k,e in zip(self.labels, self.entries):
|
for k,e in zip(self.labels, self.entries):
|
||||||
if v!="" and k.lower()!="publish date":
|
if e!="" and k.lower()!="publish date":
|
||||||
book[k.lower()]=e.value
|
book[k.lower()]=e.value
|
||||||
return book
|
return book
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ class BookForm(FormWindow):
|
||||||
return {'lccn':lccn}
|
return {'lccn':lccn}
|
||||||
|
|
||||||
def return_book(self):
|
def return_book(self):
|
||||||
return self.return_values()
|
return self._return_values()
|
||||||
|
|
||||||
def handle_input(self,ch):
|
def handle_input(self,ch):
|
||||||
if ch==10 or ch==curses.KEY_ENTER:
|
if ch==10 or ch==curses.KEY_ENTER:
|
||||||
|
@ -321,5 +321,5 @@ class CategoryForm(FormWindow):
|
||||||
blabel = "Add"
|
blabel = "Add"
|
||||||
labels = ["Category"]
|
labels = ["Category"]
|
||||||
|
|
||||||
def return_values(self):
|
def _return_values(self):
|
||||||
return self.entries
|
return self.entries
|
||||||
|
|
Loading…
Reference in New Issue