Added url reporting

This commit is contained in:
xemeds
2020-08-25 13:02:48 +03:00
parent e5e9b7a5f4
commit 661bfb3e46
8 changed files with 77 additions and 8 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<h1>&#60 URL Shortener &#62</h1>
{{ form.hidden_tag() }}
{{ form.url(placeholder="Enter the URL here", autofocus=true, class="feedback-input") }}
{{ form.token(placeholder="Enter the token (optional)", autofocus=true, class="feedback-input") }}
{{ form.token(placeholder="Enter the token (optional)", class="feedback-input") }}
<div class="tooltip">
What's a token?
<span class="tooltiptext"><p>tiny0.cc/token</p><p>Token must be between 6 and 16 characters long</p><p>It can only contain letters, numbers, underscores(_) and dashes(-)</p></span>
+1 -1
View File
@@ -20,7 +20,7 @@
<li class="items"><a href="{{ url_for('index') }}">Shortener</a></li>
<li class="items"><a href="{{ url_for('tracker') }}">Tracker</a></li>
<li class="items"><a href="{{ url_for('lookup') }}">Lookup</a></li>
<li class="items"><a href="#">Report</a></li>
<li class="items"><a href="{{ url_for('report') }}">Report</a></li>
<li class="items"><a href="{{ url_for('donate') }}">Donate</a></li>
<li class="btn"><a href="#"><i class="fas fa-bars"></i></a></li>
</ul>
+21
View File
@@ -0,0 +1,21 @@
{% extends "layout.html" %}
{% block body %}
<form method="POST" action="" class="url-form">
<h1>&#60 Report &#62</h1>
{{ form.hidden_tag() }}
{{ form.url(placeholder="Enter the short URL", autofocus=true, class="feedback-input") }}
{{ form.message(placeholder="Enter a short message explaining the reason for your report", class="feedback-input") }}
{{ form.submit(class="button") }}
{% if form.errors %}
<div class="form-errors">
{% for error in form.url.errors %}
<h4>{{ error }}</h4>
{% endfor %}
{% for error in form.message.errors %}
<h4>{{ error }}</h4>
{% endfor %}
</div>
{% endif %}
</form>
{% endblock %}
+7
View File
@@ -0,0 +1,7 @@
{% extends "layout.html" %}
{% block body %}
<div class="thanks">
<h1>Your report has been submitted</h1>
</div>
{% endblock %}