fix: Comment in send mail form

pull/79/head
Raphaël Vinot 2020-05-11 19:58:46 +02:00
parent 754ae9354d
commit 6781d5f02e
2 changed files with 5 additions and 5 deletions

View File

@ -235,7 +235,7 @@ def cache_tree(tree_uuid):
return redirect(url_for('index'))
@app.route('/tree/<string:tree_uuid>/send_mail', methods=['POST'])
@app.route('/tree/<string:tree_uuid>/send_mail', methods=['POST', 'GET'])
def send_mail(tree_uuid):
comment = request.form.get('comment') if request.form.get('comment') else ''
lookyloo.send_mail(tree_uuid, comment)

View File

@ -187,10 +187,10 @@
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="comment">Please write a comment (optional)</label>
<textarea class="form-control" id="comment" rows="3"></textarea>
</div>
<div class="form-group">
<label for="comment">Please write a comment (optional)</label>
<textarea class="form-control" name="comment" id=comment rows="3"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-success">Send email</button>