2022-06-29 11:28:26 +02:00
|
|
|
{% extends "default.html" %}
|
2021-12-02 17:03:13 +01:00
|
|
|
|
|
|
|
{% set active_page = "phone" %}
|
2022-06-29 11:28:26 +02:00
|
|
|
{% block title %}Phone numbers{% endblock %}
|
2021-12-02 17:03:13 +01:00
|
|
|
{% block default_content %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
{% if reservations|length > 0 %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3>Your current numbers</h3>
|
|
|
|
{% for reservation in reservations %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
<div>
|
|
|
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}">
|
|
|
|
{{ reservation.number.number }} ➡
|
|
|
|
</a>
|
|
|
|
</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
|
|
|
<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-06-29 11:28:26 +02:00
|
|
|
<input required
|
|
|
|
name="minute"
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
id="input-minute"
|
2022-01-04 09:37:49 +01:00
|
|
|
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">
|
2022-06-29 11:28:26 +02:00
|
|
|
<label>Countries</label>
|
|
|
|
<br />
|
2021-12-02 17:03:13 +01:00
|
|
|
{% for country in countries %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2021-12-02 17:03:13 +01:00
|
|
|
<div class="form-check form-check-inline">
|
2022-06-29 11:28:26 +02:00
|
|
|
<input class="form-check-input"
|
|
|
|
type="radio"
|
2021-12-02 17:03:13 +01:00
|
|
|
name="country"
|
2022-06-29 11:28:26 +02:00
|
|
|
id="country-{{ country.id }}"
|
|
|
|
value="{{ country.id }}">
|
2021-12-02 17:03:13 +01:00
|
|
|
<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 %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3>Past Reservations</h3>
|
|
|
|
{% for reservation in past_reservations %}
|
2022-06-29 11:28:26 +02:00
|
|
|
|
2022-01-04 09:37:49 +01:00
|
|
|
<div>
|
2022-06-29 11:28:26 +02:00
|
|
|
<a href="{{ url_for('phone.reservation_route', reservation_id=reservation.id ) }}"
|
|
|
|
class="mr-3">
|
2022-01-04 09:37:49 +01:00
|
|
|
{{ 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 %}
|