88 lines
4.0 KiB
HTML
88 lines
4.0 KiB
HTML
{% extends 'users/dashboard.html' %}
|
|
|
|
{% block sectiontitle %}
|
|
<h1>Your forms</h1>
|
|
{% endblock %}
|
|
|
|
{% block section %}
|
|
|
|
<div class="col-1-1">
|
|
<h4>Active Forms</h4>
|
|
<table class="forms responsive">
|
|
{# status icon | host or form link | target email | number of submissions #}
|
|
{% for form in enabled_forms %}
|
|
{% include "forms/list-item.html" %}
|
|
{% else %}
|
|
<p>No active forms found. Forms can be enabled by clicking the unlock icon below.</p>
|
|
{% endfor %}
|
|
</table>
|
|
|
|
{% if disabled_forms %}
|
|
<h4>Disabled Forms</h4>
|
|
<table class="forms responsive">
|
|
{# status icon | host or form link | target email | number of submissions #}
|
|
{% for form in disabled_forms %}
|
|
{% include "forms/list-item.html" %}
|
|
{% endfor %}
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% if not enabled_forms and not disabled_forms and current_user.upgraded %}
|
|
<h6 class="light">You don't have any forms associated with this account, maybe you should <a
|
|
href="{{ url_for('account') }}">verify your email</a>.</h6>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% include "forms/create.html" %}
|
|
|
|
{# modals for each form #}
|
|
{% for form in (enabled_forms + disabled_forms) %}
|
|
<div class="modal" id="form-{{ form.hashid }}" aria-hidden="true">
|
|
<div>
|
|
{% if request.args.get('new') == form.hashid %}
|
|
<div class="x"><h4>Congratulations!</h4><a href="#">×</a></div>
|
|
<p style="clear: both">Now that you have created your form, use the following HTML code in your website, filling it with the <span class="code"><input></span> fields you wish your visitors to fill:</p>
|
|
{% else %}
|
|
<div class="x"><h4>Use this code in your HTML</h4><a href="#">×</a></div>
|
|
{% endif %}
|
|
<div class="html-highlight">
|
|
<span class="bracket"><</span><span class="tagname">form</span>
|
|
<span class="attrkey">action</span><span class="equal">=</span><span
|
|
class="attrvalue">"{{ config.SERVICE_URL }}/{{ form.hashid }}"</span>
|
|
<span class="attrkey">method</span><span class="equal">=</span><span class="attrvalue">"POST"</span><span
|
|
class="bracket">></span>
|
|
<br>
|
|
<span class="bracket"><</span><span class="tagname">input</span>
|
|
<span class="attrkey">type</span><span class="equal">=</span><span class="attrvalue">"text"</span>
|
|
<span class="attrkey">name</span><span class="equal">=</span><span class="attrvalue">"_gotcha"</span>
|
|
<span class="attrkey">style</span><span class="equal">=</span><span
|
|
class="attrvalue">"display: none"</span><span class="bracket">></span>
|
|
<br>
|
|
<br>
|
|
<span class="comment"><!-- your other form fields go here --></span>
|
|
<br>
|
|
<br>
|
|
<span class="bracket"><</span><span class="tagname">button</span>
|
|
<span class="attrkey">type</span><span class="equal">=</span><span class="attrvalue">"submit"</span><span class="bracket">></span>Send<span class="bracket"></</span><span class="tagname">button</span><span class="bracket">></span>
|
|
<br>
|
|
<span class="bracket"></</span><span class="tagname">form</span><span class="bracket">></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal" id="delete-{{ form.hashid }}" aria-hidden="true">
|
|
<div>
|
|
<div class="x"><h4>Are you ABSOLUTELY sure?</h4><a href="#">×</a></div>
|
|
<br/>
|
|
<p>This action <strong>CANNOT</strong> be undone. This will permanently delete the form{% if form.host %} on
|
|
<strong>{{ form.host }}</strong>{% endif %} and all related submissions.</p>
|
|
<form method="POST" action="{{ url_for('form-deletion', hashid=form.hashid) }}">
|
|
<span class="cancel"><button type="button" onclick="return false;">Cancel</button></span>
|
|
<button class="delete">Confirm deletion</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|