mirror of
https://github.com/simple-login/app.git
synced 2024-11-01 03:21:01 +01:00
cb7868bdca
* Add DJlint configuration * Initial reformat for djlint * Add template linting to CI * Add explanation for HTML template checks in CONTRIBUTING.md
79 lines
2.5 KiB
HTML
79 lines
2.5 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% set active_page = "phone" %}
|
|
{% block title %}Phone numbers{% endblock %}
|
|
{% block default_content %}
|
|
|
|
{% 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 %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<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>
|
|
<input required
|
|
name="minute"
|
|
type="number"
|
|
class="form-control"
|
|
id="input-minute"
|
|
aria-describedby="emailHelp"
|
|
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>
|
|
{% if past_reservations|length > 0 %}
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h3>Past Reservations</h3>
|
|
{% 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>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|