backups: Remove custom handling of progress on the restore button

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-06-26 15:07:44 -07:00 committed by Veiko Aasa
parent ff84d3f97e
commit 1b5a10a628
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
2 changed files with 0 additions and 40 deletions

View File

@ -1,31 +0,0 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
/*
This file is part of FreedomBox.
@licstart The following is the entire license notice for the
JavaScript code in this page.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
// XXX: This is misuse of sr-only class. This is problematic for people using
// screen readers.
function swapWithLoadingButton() {
$("#restore_btn").addClass("sr-only");
$("#loading_btn").removeClass("sr-only");
}

View File

@ -24,21 +24,12 @@
<input id="restore_btn" type="submit"
class="btn btn-primary"
onclick="swapWithLoadingButton();"
value="{% trans 'Restore' %}" />
<button id="loading_btn" class="btn btn-primary sr-only" disabled>
<span class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></span>
{% trans "Restoring" %}
</button>
</form>
</p>
{% endblock %}
{% block page_js %}
<script type="text/javascript"
src="{% static 'backups/loading_button.js' %}"></script>
<script type="text/javascript" src="{% static 'backups/select_all.js' %}"></script>
{% endblock %}