2020-07-18 16:40:51 +00:00
{% extends "layout.html" %}
{% block body %}
2020-08-24 15:25:42 +03:00
< form method = "POST" action = "" class = "url-form" >
< h1 > & #60 URL Shortener & #62< / h1 >
{{ form.hidden_tag() }}
{{ form.url(placeholder="Enter the URL here", autofocus=true, class="feedback-input") }}
2020-08-25 13:02:48 +03:00
{{ form.token(placeholder="Enter the token (optional)", class="feedback-input") }}
2020-08-24 15:25:42 +03:00
< 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 >
2020-08-22 15:36:09 +03:00
< / div >
2020-08-24 15:25:42 +03:00
{{ 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.token.errors %}
< h4 > {{ error }}< / h4 >
{% endfor %}
< / div >
{% endif %}
< / form >
2020-07-18 16:40:51 +00:00
{% endblock %}