{% extends 'admin/base.html.twig' %}
{% block title %}Кандидат{% endblock %}
{% block content %}
<h1 class="h3 mb-2 text-gray-800">{{ item.id ? 'Редактирование' : 'Создание' }} кандидата{{ item.id ? " " ~ item.person.name }}</h1>
<div class="card shadow mb-4 mt-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Кандидат</h6>
</div>
<div class="card-body">
{{ form_start(form) }}
{{ form_row(form._token) }}
<div class="form-group mt-3">
<label>Фото:</label>
{% include 'components/image_input.html.twig' with { options: {
formWidgetField: form.newImage,
imagePath: item.image ? path('image_view', {id: item.image.id}) : null,
required: false,
canRemove: true,
form: form,
mediaType: 'image'
} } %}
</div>
<div class="form-group"{{ not getUser().settings.canEditCandidateAccessByReceipt ? ' style="display: none;"' : '' }}>
{{ form_label(form.comment) }}:
{{ form_widget(form.comment, { 'attr': { 'class': 'form-control', 'rows': 2, placeholder: "Пил травы тогда-то..." } }) }}
</div>
<div class="form-group"{{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}>
{{ form_label(form.recommendations) }} (не обязательно):
{{ form_widget(form.recommendations, { 'attr': { 'class': 'form-control', 'rows': 2, placeholder: "Рекомендую сделать то-то..." } }) }}
</div>
<div class="form-group"{{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}>
{{ form_label(form.declineComment) }} (не обязательно):
{{ form_widget(form.declineComment, { 'attr': { 'class': 'form-control', 'rows': 2 } }) }}
</div>
<div class="form-group"
{# {{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}#}
>
{{ form_label(form.person) }}:
{{ form_widget(form.person, { 'attr': { 'class': 'form-control' } }) }}
</div>
<div class="form-group"
{# {{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}#}
>
{{ form_label(form.calendarEvent) }}:
{{ form_widget(form.calendarEvent, { 'attr': { 'class': 'form-control' } }) }}
</div>
<div class="form-group"
{{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}
>
{{ form_label(form.status) }}:
{{ form_widget(form.status, { 'attr': { 'class': 'form-control' } }) }}
</div>
{# Поле Куратор #}
<div class="form-group"
{# {{ not getUser().settings.canEditAllCandidateParams ? ' style="display: none;"' : '' }}#}
>
{{ form_label(form.curator) }}:
{{ form_widget(form.curator, { 'attr': { 'class': 'form-control' } }) }}
</div>
<div class="form-group"{{ not getUser().settings.canEditCandidateAccessByReceipt ? ' style="display: none;"' : '' }}>
<label>
{{ form_widget(form.accessByReceipt, { 'attr': { 'class': '' } }) }}
{{ form_label(form.accessByReceipt) }}
</label>
</div>
<div class="form-group"{{ not getUser().settings.canEditCandidateAccessByReceipt ? ' style="display: none;"' : '' }}>
<label>
{{ form_widget(form.paymentDeferment, { 'attr': { 'class': '' } }) }}
{{ form_label(form.paymentDeferment) }}
</label>
</div>
<button class="btn btn-primary" type="submit">Сохранить</button>
{{ form_end(form, { 'render_rest': false }) }}
</div>
</div>
{% endblock %}
{% block addJs %}
<script>
</script>
{% endblock %}