{% extends "base.html" %}

{% block title %}
	{{ _("New Thread") }}
{% endblock %}

{% block scriptextra %}
	{% from "macros/forms.html" import easymde_scripts %}
	{{ easymde_scripts() }}
{% endblock %}

{% block content %}

{% if package and current_user != package.author and package.issueTracker %}
	<p class="alert alert-secondary">
		{{ _("Found a bug? Post on the <a href='%(url)s'>issue tracker</a> instead.", url=package.issueTracker) }}<br />
		{{ _("If the package shouldn't be on CDB (eg: if it doesn't work at all), then you can let us know here.") }}
	</p>
{% endif %}

{% from "macros/forms.html" import render_field, render_submit_field, render_checkbox_field %}
<form method="POST" action="" enctype="multipart/form-data">
	{{ form.hidden_tag() }}
	{{ render_field(form.title) }}

	<div class="row mt-0 mb-4 comments mx-0">
		<div class="col-md-1 p-1">
			<img class="img-fluid user-photo img-thumbnail img-thumbnail-1" src="{{ current_user.get_profile_pic_url() }}">
		</div>
		<div class="col">
			<div class="card">
				<div class="card-header {{ current_user.rank.name }}">
					{{ current_user.display_name }}
					<a name="reply"></a>
				</div>
				<div class="card-body">
					{{ render_field(form.comment, label="", class_="m-0", fieldclass="form-control markdown", data_enter_submit="1") }}
				</div>
			</div>
		</div>
	</div>

	{{ render_submit_field(form.btn_submit) }}
</form>


{% endblock %}
