{% import 'AgentBundle:Common:agent-macros.html.twig' as agentui %}
<script>
pageMeta.fragmentClass = 'DeskPRO.Agent.PageFragment.Page.NewFeedback';
pageMeta.title = '{{ phrase('agent.general.new_feedback') }}';
pageMeta.uploadAttachUrl = '{{ path('agent_accept_upload') }}';
{% set baseId = el_uid() %}
pageMeta.baseId = '{{ baseId }}';
</script>
{{ agentui.scroll_containers('page-new-feedback page-new-content') }}

<a class="tab-anchor" href="#">&nbsp;</a>

<a class="tab-anchor" href="#">&nbsp;</a>

<div class="form-header-error" style="display: none">
	{{ phrase('agent.feedback.no_feedback_cats_error') }}
</div>
<div class="form-outer">

<form id="{{baseId}}_newfeedback" class="keybound-submit">

<div class="first section cat-section" id="{{baseId}}_cat_section">
	<div class="content">
		<div class="col">
			<h4>{{ phrase('agent.general.type') }}</h4>
			{% include 'AgentBundle:Common:select-standard.html.twig' with {
				'name': 'newfeedback[category_id]',
				'id': baseId ~ '_cat',
				'add_classname': 'category_id',
				'add_attr': '',
				'categories': feedback_categories,
				'selected': state.newfeedback.category_id|default(0)
			} %}
			<div class="error-message category_id">{{ phrase('agent.general.choose_a_type') }}</div>
		</div>
		<div class="col">
			<h4 class="light">{{ phrase('agent.general.status') }}</h4>
			{% include 'AgentBundle:Common:select-feedback-status.html.twig' with {'name': 'newfeedback[status_code]'} %}
		</div>
		<br class="clear" />
	</div>
</div>

<div class="section title-section" id="{{baseId}}_title_section">
	<div class="content">
		<h4>{{ phrase('agent.general.title') }}</h4>
		<input type="text" name="newfeedback[title]" id="{{baseId}}_title" value="{{ state.newfeedback.title }}" style="width: 80%;" />
		<div class="error-message title">{{ phrase('agent.general.enter_a_title') }}</div>
	</div>
</div>

<div class="section article-section" id="{{baseId}}_content_section">
	<div class="content" style="padding-right: 10px;">
		<h4>{{ phrase('agent.general.description') }}</h4>
		<textarea type="text" name="newfeedback[content]" id="{{baseId}}_content">{{ state.newfeedback.content }}</textarea>
	</div>
</div>


<div class="section other-section" id="{{baseId}}_other_section">
	<div class="content">
		{# Tab Container #}
		<div class="tab-container">
			<nav id="{{baseId}}_other_props_tabs_wrap">
				<ul id="{{baseId}}_other_props_tabs">
					<li data-tab-for="> .tab-properties">{{ phrase('agent.general.properties') }}</li>
					<li data-tab-for="> .tab-attach">{{ phrase('agent.general.attachments') }}</li>
				</ul>
			</nav>
			<div class="content-wrapper" id="{{baseId}}_other_props_tabs_content" style="display: none">
				{# Tab Properties #}
				<div class="tab-properties" style="display: none">
					<dl>
						<dt class="prop">{{ phrase('agent.general.labels') }}</dt>
						<dd class="prop">
							<div class="tags-wrap article-tags">
								<input type="text" value="{% for label in state.newfeedback.labels %}{{label.label}},{% endfor %}" />
							</div>
						</dd>
					</dl>
				</div>
				{# /Tab Properties #}

				{# Tab Attach #}
				<div class="tab-attach" style="display: none">
					{% include 'AgentBundle:Common:attach-row-tmpl.html.twig' with {formname: 'newfeedback[attach_ids][]'} %}
					<h6>{{ phrase('agent.general.attachments') }}</h6>
					<div class="file-input">
						<input type="file" name="file-upload" multiple="multiple" />
					</div>
					<ul class="files file-list"></ul>
				</div>
				{# /Tab Attach #}
			</div>
		</div>
		{# /Tab Container #}
	</div>
</div>

<footer class="pop-footer">
	<div class="is-not-loading">
		<button class="submit-trigger clean-white">{{ phrase('agent.general.create_feedback') }} <kbd>{{ phrase('agent.general.altc') }}</kbd></button>
	</div>
	<div class="is-loading" style="padding-top: 9px;">
		<img src="{{ asset('images/spinners/loading-small.gif') }}" />
	</div>
</footer>

</form>

</div>
{{ agentui.scroll_containers_end() }}
