This reverts commit c6784759cd.
This commit is contained in:
@@ -235,15 +235,37 @@
|
||||
<li>Statistics</li>
|
||||
<li>Great Support</li>
|
||||
</ul>
|
||||
<div class="schedule-updater" style="margin-top: 15px;">
|
||||
<label for="schedule-{{ forloop.counter }}" style="display:block; font-size: 12px; margin-bottom: 5px;">Select Schedule:</label>
|
||||
<a class="btn-price" href="#">Get This Plan</a>
|
||||
|
||||
<!-- Triggers a POST request to '/run-my-module/' without reloading -->
|
||||
<!-- When clicked, 'Run Module' changes to 'Done!' -->
|
||||
<button hx-post="{% url 'run_my_action_url' %}"
|
||||
hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
|
||||
Run Module
|
||||
</button>
|
||||
<script>
|
||||
function vote(kind) {
|
||||
$.getJSON("/vote/", { pk:{ { object.pk }}, vote: kind }, function(json){
|
||||
alert("Was successful?: " + json['success']);
|
||||
});
|
||||
}
|
||||
function addClickHandlers() {
|
||||
$("#upvote").click( function() { vote("up") });
|
||||
$("#downvote").click( function() { vote("down") });
|
||||
}
|
||||
$(document).ready(addClickHandlers);
|
||||
</script>
|
||||
|
||||
<div id="resultarea"></div>
|
||||
<div id="status-message"></div>
|
||||
<select class="btn-price" name="cars" id="cars">
|
||||
|
||||
<select class="form-control" name="schedule_id" id="schedule-{{ forloop.counter }}">
|
||||
{% for schedule in list_schedule %}
|
||||
<option value="{{ schedule.id }}">{{ schedule.name }}</option>
|
||||
<tr>
|
||||
<option value="{{ schedule }}">{{ schedule }}</option>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<button class="btn-price" style="margin-top: 10px; width: 100%;"
|
||||
hx-post="{% url 'change_schedule' %}"
|
||||
hx-include="#schedule-{{ forloop.counter }}"
|
||||
@@ -254,8 +276,6 @@
|
||||
Update Schedule
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="status-{{ forloop.counter }}" style="margin-top: 10px; font-size: 13px; font-weight: bold;"></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user