06/02 Update functionalities
This commit is contained in:
@@ -241,6 +241,14 @@ def transfer():
|
||||
form.from_account_id.choices = _account_choices()
|
||||
form.to_account_id.choices = _account_choices()
|
||||
|
||||
if request.method == 'GET':
|
||||
prefill_to = request.args.get('to_account_id', '')
|
||||
prefill_desc = request.args.get('description', '')
|
||||
if prefill_to:
|
||||
form.to_account_id.data = prefill_to
|
||||
if prefill_desc:
|
||||
form.description.data = prefill_desc
|
||||
|
||||
if form.validate_on_submit():
|
||||
if form.from_account_id.data == form.to_account_id.data:
|
||||
flash('Source and destination accounts must be different.', 'warning')
|
||||
|
||||
Reference in New Issue
Block a user