diff options
author | ubq323 <ubq323> | 2021-07-11 02:22:52 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-07-11 02:22:52 +0000 |
commit | 3aa8279af5247ce34cfab8842afeb404f3864845 (patch) | |
tree | f54cb7ef9d96a8291c8e1b62f4895e9e9d2df559 /apioforum/templates | |
parent | fecd96342a07589f71cac6fc1d28e2f6d3240cbf (diff) |
poll creation and deletion ui; polls work now, for some value of 'work'
Diffstat (limited to 'apioforum/templates')
-rw-r--r-- | apioforum/templates/config_thread.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apioforum/templates/config_thread.html b/apioforum/templates/config_thread.html index b26a73d..2c9804e 100644 --- a/apioforum/templates/config_thread.html +++ b/apioforum/templates/config_thread.html @@ -2,6 +2,7 @@ {% from 'common.html' import tag %} {% block header %}<h1>{% block title %}configure thread '{{thread.title}}'{% endblock %}</h1>{% endblock %} {% block content %} +<h2>thread options</h2> <form method="post"> <fieldset> <legend>title</legend> @@ -27,4 +28,28 @@ <input type="submit" value="confirm"> <a href="{{url_for('thread.view_thread',thread_id=thread.id)}}">cancel</a> </form> + +{% if thread.poll is none %} +<h2>create poll</h2> +<form method="post" action="{{url_for('thread.create_poll',thread_id=thread.id)}}"> + <fieldset> + <legend>create poll</legend> + <label for="polltitle">question title</label> + <input type="title" id="polltitle" name="polltitle"> + <br> + <label for="polloptions">potential options (one per line)</label> + <textarea name="polloptions" id="polloptions"></textarea> + </fieldset> + <p>important: once a poll is created, you will not be able to modify it except to delete it entirely</p> + <input type="submit" value="create"> +</form> +{% else %} +<h2>delete poll</h2> +<p>there is already a poll attached to this thread. you can delete it, which will allow you to create a new one, but this will erase all existing votes and data for the current poll.</p> +<form action="{{url_for('thread.delete_poll',thread_id=thread.id)}}" method="post"> + <input type="submit" value="confirm: delete poll"> +</form> + +{% endif %} + {% endblock %} |