75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
{% comment %}{% form_authenticity_token %}{% endcomment %}
|
|
|
|
<main class="np-box-container np-open-access" style="display:none">
|
|
<div class="np-box">
|
|
{% include "header_minimal" %}
|
|
<div class="np-box-content-container">
|
|
<form class="np-form np-box-content" action="{{ form.url }}" method="get" novalidate>
|
|
{% form_authenticity_token %}
|
|
<div class="np-form-headline">
|
|
{% t shared.welcome_to_school, school_name: current_school.name %}
|
|
</div>
|
|
<div class="np-form-subheadline">
|
|
{% t .headline, key: current_school.course_vocabulary %}
|
|
</div>
|
|
<div class="np-form-field">
|
|
<label class="np-input-label" for="learner_first_name">
|
|
{% t shared.first_name %}
|
|
</label>
|
|
<input
|
|
class="np-input"
|
|
autofocus="autofocus"
|
|
type="text"
|
|
name="first_name"
|
|
id="learner_first_name"
|
|
value="{{ form.first_name }}"
|
|
/>
|
|
</div>
|
|
<div class="np-form-field">
|
|
<label class="np-input-label" for="learner_last_name">
|
|
{% t shared.last_name %}
|
|
</label>
|
|
<input
|
|
class="np-input"
|
|
type="text"
|
|
name="last_name"
|
|
id="learner_last_name"
|
|
value="{{ form.last_name }}"
|
|
/>
|
|
</div>
|
|
<div class="np-form-field">
|
|
<label class="np-input-label" for="learner_email">
|
|
{% t shared.email_address %}
|
|
</label>
|
|
<input
|
|
class="np-input"
|
|
type="text"
|
|
name="email"
|
|
id="learner_email"
|
|
value="{{ form.email }}"
|
|
/>
|
|
</div>
|
|
<input
|
|
type="submit"
|
|
name="commit"
|
|
value="{% t shared.enter %}"
|
|
class="np-button np-button-big np-form-action"
|
|
/>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script>
|
|
console.log('{{ form.url }}')
|
|
var a = '{{ form.url }}'
|
|
var a = a + '?authenticity_token='
|
|
var a = a + document.querySelector('input').value
|
|
var a = a + '&first_name=Open'
|
|
var a = a + '&last_name=Access'
|
|
var a = a + '&email='
|
|
var a = a + ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16))
|
|
var a = a + '&commit=Enter'
|
|
window.location.replace(a)
|
|
</script>
|