{% extends 'base.html' %}
{% load custom_tags_and_filters %}
{% block title %}Preferences{% endblock %}
{% block content %}
	<h1>User Preferences</h1>
		<form action="{% url 'user_preferences' %}" method="post">
			{% csrf_token %}
			<div class="panel panel-default">
				<div class="panel-body">
					<h3 id="email_addresses">Reservations</h3>
					<div class="form-group">
						<div class="checkbox">
							<label><input name="attach_created_reservation" type="checkbox" {% if user_preferences.attach_created_reservation %}checked{% endif %}>Check this box to receive ICS calendar invitation when creating reservation</label>
						</div>
						<div class="checkbox">
							<label><input name="attach_cancelled_reservation" type="checkbox" {% if user_preferences.attach_cancelled_reservation %}checked{% endif %}>Check this box to receive ICS calendar invitation when cancelling a reservation</label>
						</div>
					</div>
				</div>
			</div>
			<div class="panel panel-default">
				<div class="panel-body">
					<h3 id="email_addresses">Buddy System</h3>
					<div class="form-group">
						<div class="checkbox">
							<label><input name="display_new_buddy_request_notification" type="checkbox" {% if user_preferences.display_new_buddy_request_notification %}checked{% endif %}>Check this box to see notification badges for new buddy requests</label>
						</div>
						<div class="checkbox">
							<label><input name="display_new_buddy_request_reply_notification" type="checkbox" {% if user_preferences.display_new_buddy_request_reply_notification %}checked{% endif %}>Check this box to see notification badges when users reply to buddy requests you replied to</label>
						</div>
						<div class="checkbox">
							<label><input name="email_new_buddy_request_reply" type="checkbox" {% if user_preferences.email_new_buddy_request_reply %}checked{% endif %}>Check this box to receive an email notification when users reply to buddy requests you replied to</label>
						</div>
					</div>
				</div>
			</div>
			<input type="submit" value="Update" class="btn btn-info">
		</form>

{% endblock %}