2021-12-02 17:03:13 +01:00
|
|
|
{% extends 'default.html' %}
|
|
|
|
|
|
|
|
{% set active_page = "phone" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
Phone numbers
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block default_content %}
|
2022-01-04 09:37:49 +01:00
|
|
|
{% if reservations|length > 0 %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3>Your current numbers</h3>
|
|
|
|
|
|
|
|
{% for reservation in reservations %}
|
|
|
|
<div>
|
|
|
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}">
|
|
|
|
{{ reservation.number.number }} ➡
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2021-12-02 17:03:13 +01:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
</div>
|
2021-12-02 17:03:13 +01:00
|
|
|
</div>
|
2022-01-04 09:37:49 +01:00
|
|
|
{% endif %}
|
2021-12-02 17:03:13 +01:00
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3>Phone Reservation</h3>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Currently your phone quota is <b>{{ current_user.phone_quota }}</b> minutes.
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="input-minute">How many minutes do you need this number for?</label>
|
2022-01-04 09:37:49 +01:00
|
|
|
<input required name="minute" type="number" class="form-control" id="input-minute"
|
|
|
|
aria-describedby="emailHelp"
|
2021-12-02 17:03:13 +01:00
|
|
|
placeholder="5, 10, 60, etc.">
|
|
|
|
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
|
|
<label>Countries</label> <br>
|
|
|
|
{% for country in countries %}
|
|
|
|
<div class="form-check form-check-inline">
|
|
|
|
<input class="form-check-input" type="radio"
|
|
|
|
name="country"
|
|
|
|
id="country-{{ country.id }}" value="{{ country.id }}">
|
|
|
|
<label class="form-check-label" for="country-{{ country.id }}">{{ country.name }}</label>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<button type="submit" class="btn btn-primary">Get my number</button>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
{% if past_reservations|length > 0 %}
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3>Past Reservations</h3>
|
2021-12-02 17:03:13 +01:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
{% for reservation in past_reservations %}
|
|
|
|
<div>
|
|
|
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}" class="mr-3">
|
|
|
|
{{ reservation.number.number }} ➡
|
|
|
|
</a>
|
|
|
|
ended {{ reservation.end.humanize() }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
</div>
|
2021-12-02 17:03:13 +01:00
|
|
|
</div>
|
2022-01-04 09:37:49 +01:00
|
|
|
{% endif %}
|
2021-12-02 17:03:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
|