2017-01-20 14:28:59 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
2017-01-20 17:29:21 +01:00
|
|
|
{% load crispy_forms_tags %}
|
|
|
|
|
2017-01-20 14:28:59 +01:00
|
|
|
{% block content %}
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
2017-01-20 17:29:21 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">Registration</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<p>
|
|
|
|
Please register with your (uppercase) Callsign as Usernames.
|
2017-01-26 20:38:22 +01:00
|
|
|
For DN-Calls, -[0-9] is allowed.
|
2017-01-20 17:29:21 +01:00
|
|
|
</p>
|
|
|
|
<form method="POST" action="{% url 'register' %}">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ form|crispy }}
|
|
|
|
<input type="submit" value="Register">
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-01-20 14:28:59 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-01-20 22:13:06 +01:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
function isDNCall(e) {
|
|
|
|
var call = $("#id_username").val().toUpperCase();
|
|
|
|
var disableState = false;
|
|
|
|
if(call.startsWith("DN")) {
|
|
|
|
var disableState = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#id_dncall").prop("disabled", disableState);
|
|
|
|
$("#id_qrv2m").prop("disabled", disableState);
|
|
|
|
$("#id_qrv70cm").prop("disabled", disableState);
|
|
|
|
$("#id_extra2m70cm").prop("disabled", disableState);
|
|
|
|
if(disableState) {
|
|
|
|
$("#id_dncall").prop("value", "");
|
|
|
|
$("#id_qrv2m").prop("checked", false);
|
|
|
|
$("#id_qrv70cm").prop("checked", false);
|
|
|
|
$("#id_extra2m70cm").prop("checked", false);
|
|
|
|
}
|
|
|
|
console.log($("#id_dncall"));
|
|
|
|
}
|
|
|
|
|
|
|
|
$("#id_username").on("input", isDNCall);
|
|
|
|
$("#id_username").change(isDNCall);
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|