-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile.html
55 lines (44 loc) · 1.95 KB
/
profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% extends "base.html" %}
{% block pagetitle %} My Profile {% endblock %}
{% block c_body %}
<div class="row pad">
<form action="{{ url_for(url) }}" method="POST" name="form" class="form-horizontal">
{{ form.hidden_tag() }}
{{ render_field_with_errors(form.name, class="form-control") }}
{{ render_field_with_errors(form.address, class="form-control") }}
<div class="form-group">
{{ form.reduce_emails.label(class="col-sm-6 col-sm-offset-1 control-label") }}
<div class="col-sm-2">
{{ form.reduce_emails(class="checkbox")|safe }}
</div>
</div>
<div class="form-group row col-sm-10">
<button type="button" class="btn btn-danger col-sm-offset-1" onclick="disable_warn()" name="disable_user_btn">Disable Account</button>
<input type="submit" value="Disable Account" class="hidden" name="disable_btn" id="disable_btn">
</div>
<div class="form-group row col-sm-10">
<input type="submit" value="Save Changes" class="btn btn-primary col-sm-offset-1">
</div>
</form>
</div>
{% endblock %}
{% block scripts %}
{{ super() }}
<script>
function disable_warn() {
foo = BootstrapDialog.confirm({
title: 'Disable Account?',
message: 'This will prevent further use of your account and stop all email communication to you. You will no longer be able to log in.',
type: BootstrapDialog.TYPE_DANGER, // <-- Default value is BootstrapDialog.TYPE_PRIMARY
btnOKLabel: 'Disable',
btnOKClass: 'btn-danger',
callback: function(result) {
if(result) {
var disable_btn = document.getElementById('disable_btn');
disable_btn.click()
}
}
});
}
</script>
{% endblock %}