move buttons in books_for_series in series.html now are form buttons and submit and beginning of code to deal with it exists

This commit is contained in:
2020-11-26 17:35:30 +11:00
parent e9f9f742a3
commit 422db5b6aa
2 changed files with 21 additions and 14 deletions

View File

@@ -56,6 +56,9 @@ def series(id):
### DDP: should this be request.form or request.values?
alert="Success"
series_form = SeriesForm(request.form)
if request.method == 'POST':
if 'move_button' in request.form:
print( 'maybe we are moving a book up or down in series, we pressed: ' + request.form['move_button'] )
if request.method == 'POST' and series_form.validate_on_submit():
id = request.form['id']
series = Series.query.get(id)