Notes and Scripts Baby
This commit is contained in:
@ -1,6 +1,11 @@
|
||||
{% comment %}{% form_authenticity_token %}{% endcomment %}
|
||||
<style>
|
||||
body {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<main class="np-box-container np-open-access" style="display:none">
|
||||
<main class="np-box-container np-open-access">
|
||||
<div class="np-box">
|
||||
{% include "header_minimal" %}
|
||||
<div class="np-box-content-container">
|
||||
@ -22,7 +27,7 @@
|
||||
type="text"
|
||||
name="first_name"
|
||||
id="learner_first_name"
|
||||
value="{{ form.first_name }}"
|
||||
value="Open"
|
||||
/>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
@ -34,7 +39,7 @@
|
||||
type="text"
|
||||
name="last_name"
|
||||
id="learner_last_name"
|
||||
value="{{ form.last_name }}"
|
||||
value="Access"
|
||||
/>
|
||||
</div>
|
||||
<div class="np-form-field">
|
||||
@ -46,7 +51,7 @@
|
||||
type="text"
|
||||
name="email"
|
||||
id="learner_email"
|
||||
value="{{ form.email }}"
|
||||
value=""
|
||||
/>
|
||||
</div>
|
||||
<input
|
||||
@ -61,14 +66,9 @@
|
||||
</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>
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
let uuid = ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16));
|
||||
document.querySelector('.np-input#learner_email').value = uuid;
|
||||
document.querySelector('.np-button[type="submit"]').click();
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user