2015-05-05 20:33:05 +02:00
|
|
|
{% extends 'base.html.twig' %}
|
2015-05-05 22:04:04 +02:00
|
|
|
|
2015-05-11 21:06:41 +02:00
|
|
|
{% block title %}{{ 'app.menu.home.title'|trans }}{% endblock %}
|
|
|
|
|
2015-05-05 22:04:04 +02:00
|
|
|
{% block body %}
|
2015-05-05 23:24:37 +02:00
|
|
|
<div class="row">
|
2015-05-06 20:35:30 +02:00
|
|
|
<form action="{{ path('home') }}" method="post" id="main-form">
|
2015-05-05 23:25:39 +02:00
|
|
|
<div class="col-md-12">
|
2015-05-05 23:24:37 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
{{ form_widget(form.title) }}
|
|
|
|
</div>
|
|
|
|
<div class="panel-body">
|
|
|
|
<div class="btn-toolbar">
|
|
|
|
<div class="btn-group" id="options">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
|
|
<span id="type-label" data-tpl="{{ 'form.type.label'|trans }}">
|
|
|
|
</span>
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
{% for item in form.type.vars.choices %}
|
|
|
|
<li>
|
|
|
|
<input
|
|
|
|
{% if item.value == form.type.vars.value %}checked{% endif %}
|
|
|
|
data-id="#type-label" type="radio" class="hide"
|
|
|
|
data-title="{{ item.label }}"
|
|
|
|
value="{{ item.value }}"
|
|
|
|
name="form[type]"
|
|
|
|
id="type-{{ loop.index }}" />
|
|
|
|
|
|
|
|
<a href="#">
|
|
|
|
<label for="type-{{ loop.index }}">
|
|
|
|
{{ item.label }}
|
|
|
|
</label>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
|
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
|
|
|
<span id="cipher-label" data-tpl="{{ 'form.cipher.label'|trans }}">
|
|
|
|
</span>
|
|
|
|
<span class="caret"></span>
|
|
|
|
</button>
|
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
{% for item in form.cipher.vars.choices %}
|
|
|
|
<li>
|
|
|
|
<input
|
|
|
|
{% if item.value == form.cipher.vars.value %}checked{% endif %}
|
|
|
|
data-id="#cipher-label" type="radio" class="hide cipher-input"
|
|
|
|
data-title="{{ item.label }}"
|
|
|
|
value="{{ item.value }}"
|
|
|
|
name="form[cipher]"
|
|
|
|
id="cipher-{{ loop.index }}" />
|
|
|
|
|
|
|
|
<a href="#">
|
|
|
|
<label for="cipher-{{ loop.index }}">
|
|
|
|
{{ item.label }}
|
|
|
|
</label>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
{{ form_errors(form.content) }}
|
|
|
|
{{ form_widget(form.content) }}
|
|
|
|
</p>
|
|
|
|
<p>
|
2015-05-07 14:10:23 +02:00
|
|
|
<input type="submit" class="btn btn-primary" value="{{ 'form.submit'|trans }}">
|
2015-05-05 23:24:37 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{ form_widget(form._token) }}
|
|
|
|
</form>
|
|
|
|
</div>
|
2015-05-05 22:04:04 +02:00
|
|
|
{% endblock %}
|
2015-05-06 20:35:30 +02:00
|
|
|
|
|
|
|
{% block js %}
|
2015-05-06 20:39:51 +02:00
|
|
|
{{ parent() }}
|
2015-05-06 20:35:30 +02:00
|
|
|
|
2015-05-06 20:39:51 +02:00
|
|
|
{% if gist is not null %}
|
|
|
|
<script type="text/javascript">
|
|
|
|
document.location.href = '{{ path("view", {gist: gist.file}) }}'{% if gist.cipher %} + '#' + (document.location.href).split('#')[1]{% endif %};
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
2015-05-06 20:35:30 +02:00
|
|
|
{% endblock %}
|