Revert "Make the switching work, wows"

Actually this is bad, switching on this page is not useful enough for
the UI complexity. Users can switch percent/pages on the book page.

This reverts commit a4796cf5c5.
This commit is contained in:
Joel Bradshaw 2021-01-17 12:40:24 -08:00
parent a4796cf5c5
commit 6e05dfde92

View file

@ -1,40 +1,25 @@
<form class="field is-grouped is-small pl-2" action="/edit-readthrough" method="POST"> <form class="field is-grouped is-small pl-2" action="/edit-readthrough" method="POST">
{% csrf_token %} {% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}"/> <input type="hidden" name="id" value="{{ readthrough.id }}"/>
<div class="control">
<div> {% if readthrough.progress_mode == 'PG' %}
<input class="toggle-control" type="radio" name="progress-mode" id="progress-mode-page" {% if readthrough.progress_mode == 'PG' %}checked{% endif %}> on page
<div class="toggle-content hidden" role="tabpanel" id="progress-mode-page-panel"> {% else %}
<div class="control"> currently at
<label for="progress-mode-percent">on page</label> {% endif %}
</div>
<div class="control">
<input
aria-label="Current page"
class="input is-small" type="text"
name="progress" size="3" value="{{ readthrough.progress|default:'' }}">
</div>
{% if book.pages %}
<div class="control">
of {{ book.pages }}
</div>
{% endif %}
</div>
</div> </div>
<div> <div class="control">
<input class="toggle-control" type="radio" name="progress-mode" id="progress-mode-percent" {% if readthrough.progress_mode == 'PCT' %}checked{% endif %}> <input
<div class="toggle-content hidden" role="tabpanel" id="progress-mode-percent-panel"> aria-label="{% if readthrough.progress_mode == 'PG' %}Current page{% else %}Perent read{% endif%}"
<div class="control"> class="input is-small" type="text"
<label for="progress-mode-page">currently at</label> name="progress" size="3" value="{{ readthrough.progress|default:"" }}">
</div> </div>
<div class="control"> <div class="control">
<input {% if readthrough.progress_mode == 'PG' and book.pages %}
aria-label="Percent read" of {{ book.pages }}
class="input is-small" type="text" {% else %}
name="progress" size="3" value="{{ readthrough.progress|default:'' }}"> %
% {% endif %}
</div>
</div>
</div> </div>
<div class="control"> <div class="control">
<button class="button is-small px-2" type="submit">Go</button> <button class="button is-small px-2" type="submit">Go</button>