User profile page working.
This commit is contained in:
parent
b65223198c
commit
ab568365ef
46 changed files with 873 additions and 698 deletions
|
|
@ -1,20 +1,14 @@
|
|||
{% extends "base.html" %}
|
||||
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-15T11:36:36.861Z by adl.to-selmer-templates.
|
||||
<!-- File list-followuprequests-Followuprequests.html generated 2018-07-15T19:59:46.638Z by adl.to-selmer-templates.
|
||||
See [Application Description Language](https://github.com/simon-brooke/adl).-->
|
||||
|
||||
|
||||
{% block back-links %}
|
||||
<div>
|
||||
<div class='back-link-container'>
|
||||
{% ifequal params.offset "0" %}
|
||||
<a id='back-link' class='back-link' href='{{servlet-context}}/admin'>
|
||||
Back
|
||||
</a>
|
||||
{% else %}
|
||||
<a id='prev-selector' class='back-link'>
|
||||
Previous
|
||||
</a>
|
||||
{% endifunequal %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -39,8 +33,8 @@ Add a new Followuprequest
|
|||
{% block content %}
|
||||
<form id='list-followuprequests-Followuprequests' class='list' action='{{servlet-context}}/list-followuprequests-Followuprequests' method='POST'>
|
||||
{% csrf-field %}
|
||||
<input id='offset' type='hidden' value='{{params.offset|default:0}}'/>
|
||||
<input id='limit' type='hidden' value='{{params.limit|default:50}}'/>
|
||||
<input id='offset' name='offset' type='text' value='{{params.offset|default:0}}'/>
|
||||
<input id='limit' name='limit' type='text' value='{{params.limit|default:50}}'/>
|
||||
<table caption='followuprequests'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -68,16 +62,16 @@ Method_id
|
|||
<input id='id' type='text' name='id' value='{{ params.id }}'/>
|
||||
</th>
|
||||
<th>
|
||||
<input id='elector_id_expanded' type='text' name='elector_id_expanded' value='{{ params.elector_id_expanded }}'/>
|
||||
<input id='elector_id' type='text' name='elector_id' value='{{ params.elector_id }}'/>
|
||||
</th>
|
||||
<th>
|
||||
<input id='visit_id_expanded' type='text' name='visit_id_expanded' value='{{ params.visit_id_expanded }}'/>
|
||||
<input id='visit_id' type='text' name='visit_id' value='{{ params.visit_id }}'/>
|
||||
</th>
|
||||
<th>
|
||||
<input id='issue_id_expanded' type='text' name='issue_id_expanded' value='{{ params.issue_id_expanded }}'/>
|
||||
<input id='issue_id' type='text' name='issue_id' value='{{ params.issue_id }}'/>
|
||||
</th>
|
||||
<th>
|
||||
<input id='method_id_expanded' type='text' name='method_id_expanded' value='{{ params.method_id_expanded }}'/>
|
||||
<input id='method_id' type='text' name='method_id' value='{{ params.method_id }}'/>
|
||||
</th>
|
||||
<th>
|
||||
<input type='submit' id='search-widget' value='Search'/>
|
||||
|
|
@ -128,20 +122,25 @@ View
|
|||
var ow = document.getElementById('offset');
|
||||
var lw = document.getElementById('limit');
|
||||
form.addEventListener('submit', function() {
|
||||
ow.value='0';
|
||||
ow.value='0';
|
||||
});
|
||||
|
||||
{% ifunequal params.offset "0" %}
|
||||
document.getElementById('prev-selector').addEventListener('click', function () {
|
||||
ow.value=(parseInt(ow.value)-parseInt(lw.value));
|
||||
console.log('Updated offset to ' + ow.value);
|
||||
form.submit();
|
||||
});
|
||||
{% endifunequal %}
|
||||
var prevSelector = document.getElementById('prev-selector');
|
||||
if (prevSelector != null) {
|
||||
prevSelector.addEventListener('click', function () {
|
||||
if (parseInt(ow.value)===0) {
|
||||
window.location = '{{servlet-context}}/admin';
|
||||
} else {
|
||||
ow.value=(parseInt(ow.value)-parseInt(lw.value));
|
||||
console.log('Updated offset to ' + ow.value);
|
||||
form.submit();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.getElementById('next-selector').addEventListener('click', function () {
|
||||
ow.value=(parseInt(ow.value)+parseInt(lw.value));
|
||||
console.log('Updated offset to ' + ow.value);
|
||||
form.submit();
|
||||
ow.value=(parseInt(ow.value)+parseInt(lw.value));
|
||||
console.log('Updated offset to ' + ow.value);
|
||||
form.submit();
|
||||
});
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue