Explorar el Código

Changed location of change counter button

Denis Merigoux hace 9 años
padre
commit
d372424110
Se han modificado 1 ficheros con 8 adiciones y 6 borrados
  1. 8 6
      counter/templates/homeTemplate.html

+ 8 - 6
counter/templates/homeTemplate.html

@@ -51,12 +51,7 @@
51 51
 
52 52
 					<p>{{ myCounter.lastReset.reason }}</p>
53 53
 					<div class="text-center" id="button{{myCounter.id}}">
54
-						<form action="{% url 'reset-my-counter' %}" method="post">
55
-							{% csrf_token %}
56
-							<button class="btn btn-default btn-danger" type="button" onclick="getElementById('counter{{myCounter.id}}').style.display='inline';getElementById('button{{myCounter.id}}').style.display='none';getElementById('container{{myCounter.id}}').style.height='225px';">Remettre à zéro</button>
57
-							<input type="hidden" name="redirect" value="{% url 'home' %}"></input>
58
-							<button type="submit" class="btn btn-default">Changer mon compteur</button>
59
-						</form>
54
+						<button class="btn btn-default btn-danger" type="button" onclick="getElementById('counter{{myCounter.id}}').style.display='inline';getElementById('button{{myCounter.id}}').style.display='none';getElementById('container{{myCounter.id}}').style.height='225px';">Remettre à zéro</button>
60 55
 					</div>
61 56
 					<form style="display:none" id="counter{{myCounter.id}}" action="{% url 'reset-counter' %}" method="post">
62 57
 						{% csrf_token %}
@@ -164,4 +159,11 @@
164 159
 		</div>
165 160
 	</div>
166 161
 </div>
162
+<div class="row text-center">
163
+	<form action="{% url 'reset-my-counter' %}" method="post">
164
+		{% csrf_token %}
165
+		<input type="hidden" name="redirect" value="{% url 'home' %}"></input>
166
+		<button type="submit" class="btn btn-success">Changer mon compteur</button>
167
+	</form>
168
+</div>
167 169
 {% endblock %}