-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added an ability to approve registration requests for approval via ad…
…min app
- Loading branch information
1 parent
1855d55
commit a1e906a
Showing
7 changed files
with
161 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<a data-toggle="modal" data-target="#confirmApproveRegistrationListModal" class="btn btn-success"> | ||
Approve | ||
</a> | ||
<div class="modal" id="confirmApproveRegistrationListModal"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<form class="well" method="post" action="{% url 'nodes:confirm-approve-backlog-list' %}"> | ||
<div class="modal-header"> | ||
<button type="button" class="close" data-dismiss="modal">x</button> | ||
<h3>Are you sure you want to approve these registrations?</h3> | ||
</div> | ||
{% csrf_token %} | ||
<div class="modal-footer"> | ||
<input class="btn btn-success" type="submit" value="Confirm" /> | ||
<button type="button" class="btn btn-default" data-dismiss="modal"> | ||
Cancel | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{% extends "base.html" %} | ||
{% load render_bundle from webpack_loader %} | ||
{% load node_extras %} | ||
|
||
{% load static %} | ||
{% block title %} | ||
<title>Registrations to be approved</title> | ||
{% endblock title %} | ||
{% block content %} | ||
<h2>List of registration requests that are waiting for approval</h2> | ||
{% if perms.osf.change_registrationapproval %} | ||
<form action="{% url 'nodes:confirm-approve-backlog-list' %}" method="post"> | ||
{% csrf_token %} | ||
{% endif %} | ||
{% include "util/pagination.html" with items=page status=status %} | ||
<table class="table table-striped table-hover table-responsive"> | ||
<thead> | ||
<tr> | ||
<th> | ||
<input type="checkbox" onclick="toggle(this)"> | ||
<script language="javascript"> | ||
function toggle(source) { | ||
var checkboxes = document.getElementsByClassName('selection'); | ||
for (var i in checkboxes) { | ||
checkboxes[i].checked = source.checked; | ||
} | ||
} | ||
</script> | ||
</th> | ||
<th>ID</th> | ||
<th>Title</th> | ||
<th>Date created</th> | ||
<th>Initiated By</th> | ||
<th>State</th> | ||
<th>Initiation Date</th> | ||
<th>End Date</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for approval in queryset %} | ||
<tr> | ||
{% if perms.osf.change_registrationapproval %} | ||
<td> | ||
<input name="{{approval.guid}}" class="selection" type="checkbox"/> | ||
</td> | ||
{% endif %} | ||
<td> | ||
{{ approval.guid }} | ||
</td> | ||
<td> | ||
{{ approval.registrations.first.title }} | ||
</td> | ||
<td> | ||
{{ approval.created| date }} | ||
</td> | ||
<td> | ||
{{ approval.initiated_by }} | ||
</td> | ||
<td> | ||
{{ approval.state }} | ||
</td> | ||
<td> | ||
{{ approval.initiation_date }} | ||
</td> | ||
<td> | ||
{{ approval.end_date }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% if perms.osf.change_registrationapproval %} | ||
{% include 'nodes/approve_modal.html'%} | ||
</form> | ||
{% endif %} | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters