First step
This commit is contained in:
parent
227dc79e6b
commit
ef55b4e479
|
@ -27,7 +27,8 @@ from rollerverbrauch.forms import \
|
||||||
CreatePitstopForm, \
|
CreatePitstopForm, \
|
||||||
EditVehicleForm, \
|
EditVehicleForm, \
|
||||||
DeleteVehicleForm, \
|
DeleteVehicleForm, \
|
||||||
SelectVehicleForm
|
SelectVehicleForm, \
|
||||||
|
DeleteAccountForm
|
||||||
|
|
||||||
from rollerverbrauch.entities import \
|
from rollerverbrauch.entities import \
|
||||||
User, \
|
User, \
|
||||||
|
@ -217,3 +218,13 @@ def get_statistics():
|
||||||
for vehicle in current_user.vehicles:
|
for vehicle in current_user.vehicles:
|
||||||
stats.append(tools.VehicleStats(vehicle))
|
stats.append(tools.VehicleStats(vehicle))
|
||||||
return render_template('statistics.html', data=stats)
|
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):
|
class DeleteVehicleForm(Form):
|
||||||
submit = SubmitField(label='Do it!')
|
submit = SubmitField(label='Do it!')
|
||||||
|
|
||||||
|
|
||||||
|
class DeleteAccountForm(Form):
|
||||||
|
submit = SubmitField(label='Do it!')
|
||||||
|
|
|
@ -53,4 +53,12 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</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 %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue