mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-11 21:40:17 +02:00
[CHANGE] Switch to django_bootstrap5
forms
This commit is contained in:
parent
5f51ad4a6a
commit
2440e5d2b2
@ -17,39 +17,39 @@
|
||||
<th class="text-center">{% translate "Eve Time" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for timer in timers %}
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{{ timer.details }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ timer.get_timer_type_display }}
|
||||
</td>
|
||||
<td class="text-center" nowrap>
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center"><a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
{{ timer.details }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{{ timer.get_timer_type_display }}
|
||||
</td>
|
||||
<td class="text-center" nowrap>
|
||||
{% if timer.objective == "Hostile" %}
|
||||
<div class="badge bg-danger">
|
||||
{% translate "Hostile" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Friendly" %}
|
||||
<div class="badge bg-primary">
|
||||
{% translate "Friendly" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if timer.objective == "Neutral" %}
|
||||
<div class="badge bg-default">
|
||||
{% translate "Neutral" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="text-center"><a href="{{ timer.system|dotlan_solar_system_url }}">
|
||||
{{ timer.system }} {{ timer.planet_moon }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-center" nowrap>{{ timer.eve_time | date:"Y-m-d H:i" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -1,29 +1,46 @@
|
||||
{% extends "allianceauth/base-bs5.html" %}
|
||||
{% load bootstrap %}
|
||||
|
||||
{% load django_bootstrap5 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block page_title %}
|
||||
{% endblock page_title %}
|
||||
|
||||
{% block header_nav_brand %}
|
||||
{% translate "Structure Timers" %}
|
||||
{% endblock header_nav_brand %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-lg-12">
|
||||
<h1 class="page-header text-center">
|
||||
<div>
|
||||
<h1 class="page-header text-center mb-3">
|
||||
{% block page_header %}
|
||||
{% endblock page_header %}
|
||||
{% include "timerboard/index_button.html" %}
|
||||
</h1>
|
||||
<div class="container-fluid">
|
||||
<div class="col-md-4 col-md-offset-4">
|
||||
<div class="row">
|
||||
<form id="add-timer-form" class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
{{ form|bootstrap }}
|
||||
<br>
|
||||
<button class="btn btn-lg btn-primary btn-block" type="submit">
|
||||
{% block submit_button_text %}
|
||||
{% endblock submit_button_text %}
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="card card-primary border-0">
|
||||
<div class="card-header">
|
||||
<div class="card-title mb-0">
|
||||
{% translate "Structure Timer Details" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
<form class="form-signin" role="form" action="" method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% bootstrap_form form %}
|
||||
|
||||
<div class="form-group mt-3 clearfix">
|
||||
<button class="btn btn-primary" type="submit">
|
||||
{% block submit_button_text %}
|
||||
{% endblock submit_button_text %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -32,19 +49,16 @@
|
||||
{% endblock content %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('#id_start').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -14,17 +14,18 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
theme: {% if NIGHT_MODE %}'dark'{% else %}'default'{% endif %},
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0,
|
||||
defaultDate: null
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
format: 'Y-m-d H:i',
|
||||
minDate: 0,
|
||||
defaultDate: null
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
@ -14,21 +14,18 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascript %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
{% endblock %}
|
||||
{% include 'bundles/timerboard-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-js.html' %}
|
||||
{% include 'bundles/jquery-datetimepicker-css.html' %}
|
||||
|
||||
{% block extra_script %}
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
{% if NIGHT_MODE %}
|
||||
theme: 'dark',
|
||||
{% else %}
|
||||
theme: 'default',
|
||||
{% endif %}
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
defaultDate: null
|
||||
});
|
||||
{% endblock extra_script %}
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
$('input#id_absolute_time').datetimepicker({
|
||||
setlocale: '{{ LANGUAGE_CODE }}',
|
||||
mask: true,
|
||||
format: 'Y-m-d H:i',
|
||||
defaultDate: null
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user