Skip to content

Commit

Permalink
Fixing reset all and activate all button bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpaw053 committed Oct 14, 2019
1 parent e9bda94 commit fe41448
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 121 deletions.
26 changes: 26 additions & 0 deletions orcid_hub/templates/activate_reset_all_form.html
@@ -0,0 +1,26 @@
<!-- Activate all and Reset all widget Details -->
<form style="float: left;padding-right: 5px;" class="icon" method="POST" action="{{url_for('activate_all')}}">
<input id="task_id" name="task_id" type="hidden" value="{{task.id}}">
<button
onclick="return safeConfirm('Are you sure you want to activate every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the below records to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Activate all records for batch processing..."
class="btn btn-info">Activate all
</button>
</form>
<form style="float: right" class="icon" method="POST" action="{{url_for('reset_all')}}">
<input id="task_idd" name="task_id" type="hidden" value="{{task.id}}">
<button
onclick="return safeConfirm('Are you sure you want to reset every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the below records to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Reset all records for batch processing..."
class="btn btn-info">
Reset all
</button>
<a role="button" class="btn btn-primary"
href="{{ request.args.get('url') or url_for('task.index_view') }}">Back</a>
</form>
32 changes: 2 additions & 30 deletions orcid_hub/templates/funding_record_list.html
Expand Up @@ -42,36 +42,8 @@ <h1>{{task.filename}}</h1>
</tbody>
</table>
<span class="pull-right">
<div style="width:auto">
<div style="float: left; width: auto">
<form class="icon" method="POST" action="{{url_for('activate_all')}}">
<input id="task_id" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to activate every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the fundings to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Activate all records for batch processing..."
class="btn btn-info">Activate all</button> <br>
</form>
</div>
<div style="float: right; width: auto">
<form class="icon" method="POST"
action="{{url_for('reset_all')}}">
<input id="task_idd" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to reset every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the fundings to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Reset all records for batch processing..."
class="btn btn-info">
Reset all
</button>
<a role="button" class="btn btn-primary"
href="{{ request.args.get('url') or url_for('task.index_view') }}">Back</a>
</form>
</div>
</div>
</span>
{% include 'activate_reset_all_form.html' %}
</span>
{{ super() }}
{% endblock %}
{% block list_row_actions %}
Expand Down
32 changes: 2 additions & 30 deletions orcid_hub/templates/peer_review_record_list.html
Expand Up @@ -42,36 +42,8 @@ <h1>{{task.filename}}</h1>
</tbody>
</table>
<span class="pull-right">
<div style="width:auto">
<div style="float: left; width: auto">
<form class="icon" method="POST" action="{{url_for('activate_all')}}">
<input id="task_id" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to activate every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the peer review to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Activate all records for batch processing..."
class="btn btn-info">Activate all</button> <br>
</form>
</div>
<div style="float: right; width: auto">
<form class="icon" method="POST"
action="{{url_for('reset_all')}}">
<input id="task_idd" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to reset every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the peer review to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Reset all records for batch processing..."
class="btn btn-info">
Reset all
</button>
<a role="button" class="btn btn-primary"
href="{{ request.args.get('url') or url_for('task.index_view') }}">Back</a>
</form>
</div>
</div>
</span>
{% include 'activate_reset_all_form.html' %}
</span>
{{ super() }}
{% endblock %}
{% block list_row_actions %}
Expand Down
34 changes: 3 additions & 31 deletions orcid_hub/templates/record_list.html
Expand Up @@ -41,37 +41,9 @@ <h1>{{task.filename}}</h1>
</tr>
</tbody>
</table>
<span class="pull-right">
<div style="width:auto">
<div style="float: left; width: auto">
<form class="icon" method="POST" action="{{url_for('activate_all')}}">
<input id="task_id" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to activate every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the below records to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Activate all records for batch processing..."
class="btn btn-info">Activate all</button> <br>
</form>
</div>
<div style="float: right; width: auto">
<form class="icon" method="POST"
action="{{url_for('reset_all')}}">
<input id="task_idd" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to reset every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the below records to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Reset all records for batch processing..."
class="btn btn-info">
Reset all
</button>
<a role="button" class="btn btn-primary"
href="{{ request.args.get('url') or url_for('task.index_view') }}">Back</a>
</form>
</div>
</div>
</span>
<span class="pull-right">
{% include 'activate_reset_all_form.html' %}
</span>
{{ super() }}
{% endblock %}
{% block list_row_actions %}
Expand Down
32 changes: 2 additions & 30 deletions orcid_hub/templates/work_record_list.html
Expand Up @@ -42,36 +42,8 @@ <h1>{{task.filename}}</h1>
</tbody>
</table>
<span class="pull-right">
<div style="width:auto">
<div style="float: left; width: auto">
<form class="icon" method="POST" action="{{url_for('activate_all')}}">
<input id="task_id" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to activate every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the works to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Activate all records for batch processing..."
class="btn btn-info">Activate all</button> <br>
</form>
</div>
<div style="float: right; width: auto">
<form class="icon" method="POST"
action="{{url_for('reset_all')}}">
<input id="task_idd" name="task_id" type="hidden" value="{{task.id}}">
<button onclick="return safeConfirm('Are you sure you want to reset every record in this batch for processing?\n\nBy clicking &quot;OK&quot;'+
' you are affirming that the works to be written are, to the \nbest of your knowledge, correct!');"
data-toggle="tooltip"
data-placement="bottom"
title="Reset all records for batch processing..."
class="btn btn-info">
Reset all
</button>
<a role="button" class="btn btn-primary"
href="{{ request.args.get('url') or url_for('task.index_view') }}">Back</a>
</form>
</div>
</div>
</span>
{% include 'activate_reset_all_form.html' %}
</span>
{{ super() }}
{% endblock %}
{% block list_row_actions %}
Expand Down

0 comments on commit fe41448

Please sign in to comment.