Implement feature proposal categories

This commit is contained in:
Sander Ferdinand 2018-07-04 16:04:19 +02:00
parent b8026511fa
commit 29e5a9eb95
4 changed files with 33 additions and 14 deletions

View file

@ -65,6 +65,15 @@
<input {% if addr_receiving %}disabled{% endif %} id="addr_receiving" type="text" name="addr_receiving" class="form-control" placeholder="WOW..." value="{{ addr_receiving }}">
</div>
<div class="form-group">
<label for="category">Category</label>
<select class="form-control" id="category" name="category">
{% for cat in funding_categories %}
<option value="{{cat}}"{% if cat == proposal.category %} selected{% endif %}>{{cat}}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label>Content</label>
<textarea id="content" class="textarea" name="content" placeholder="Place some text here" style="width: 100%; height: 600px; font-size: 14px; line-height: 18px; border: 1px solid #dddddd; padding: 10px;">{{ content }}</textarea>
@ -118,7 +127,8 @@
'title': document.getElementById('title').value,
'content': simplemde.value(),
'funds_target': parseFloat(document.getElementById('funds_target').value),
'addr_receiving': document.getElementById('addr_receiving').value
'addr_receiving': document.getElementById('addr_receiving').value,
'category': document.getElementById('category').value
};
if (pid) {