First step
This commit is contained in:
parent
227dc79e6b
commit
ef55b4e479
|
@ -27,7 +27,8 @@ from rollerverbrauch.forms import \
|
|||
CreatePitstopForm, \
|
||||
EditVehicleForm, \
|
||||
DeleteVehicleForm, \
|
||||
SelectVehicleForm
|
||||
SelectVehicleForm, \
|
||||
DeleteAccountForm
|
||||
|
||||
from rollerverbrauch.entities import \
|
||||
User, \
|
||||
|
@ -217,3 +218,13 @@ def get_statistics():
|
|||
for vehicle in current_user.vehicles:
|
||||
stats.append(tools.VehicleStats(vehicle))
|
||||
return render_template('statistics.html', data=stats)
|
||||
|
||||
@app.route('/account/delete', methods=['GET', 'POST'])
|
||||
@login_required
|
||||
def delete_account():
|
||||
form = DeleteAccountForm()
|
||||
|
||||
if form.validate_on_submit():
|
||||
return redirect(url_for('get_account_page'))
|
||||
|
||||
return render_template('deleteVehicleForm.html', form=form, vehicle=vehicle)
|
||||
|
|
|
@ -44,3 +44,7 @@ class EditVehicleForm(Form):
|
|||
|
||||
class DeleteVehicleForm(Form):
|
||||
submit = SubmitField(label='Do it!')
|
||||
|
||||
|
||||
class DeleteAccountForm(Form):
|
||||
submit = SubmitField(label='Do it!')
|
||||
|
|
|
@ -53,4 +53,12 @@
|
|||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Account</div>
|
||||
<div class="panel-body">
|
||||
<a href='{{ url_for('security.change_password') }}'>
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Delete
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue