Файл: upload/core/templates/default/pages/work/edit.html
Строк: 69
<?php
<div class="home_us tematic profile">
{{ breadcrumbs_html|raw }}
<script type="application/ld+json">{{ breadcrumbs_json|raw }}</script>
<script>const oldImagesCount = {{ old_images_count }};</script>
<div class="head_box">
<div class="box_title">Редактирование объявления</div>
</div>
<div class="form_block">
<form method="POST" enctype="multipart/form-data" id="new_forms">
<input type="hidden" name="csrf_token" value="{{ csrf }}">
<select name="person">
<option value="1" {% if work.person == 1 %}selected{% endif %}>Объявление от исполнителя</option>
<option value="2" {% if work.person == 2 %}selected{% endif %}>Объявление от заказчика</option>
</select>
<input placeholder="Название" type="text" name="name" required value="{{ work.name }}">
<div class="rubric_set-work">
<select id="category" name="category" required>
<option value="">Выберите рубрику</option>
{% for c in categories %}
<option value="{{ c.id }}" {% if c.id == work.category %}selected{% endif %}>
{{ c.name }}
</option>
{% endfor %}
</select>
<div id="section">
{% if sections %}
<select name="section" required>
{% for s in sections %}
<option value="{{ s.id }}" {% if s.id == work.section %}selected{% endif %}>
{{ s.name }}
</option>
{% endfor %}
</select>
{% endif %}
</div>
</div>
<textarea placeholder="Подробно опишите задачу, сроки выполнения, другие условия работы"
name="desc" required>{{ work.desc }}</textarea>
<input placeholder="Цена" type="number" name="cena" required value="{{ work.price }}">
<div id="previewBox" class="preview-box">
{% for img in old_images %}
<div class="preview-item old-item" data-id="{{ img.id }}">
<img src="{{ home }}/uploads/works/{{ img.file }}" class="preview-img">
<span class="remove-img remove-old" data-id="{{ img.id }}">×</span>
{% if img.is_main %}
<div class="main-badge">Главное</div>
{% else %}
<div class="make-main" data-img="{{ img.file }}">Сделать главным</div>
{% endif %}
</div>
{% endfor %}
<div class="add-images-block" id="addImagesBtn">Добавить изображения</div>
</div>
<input type="file" id="images" name="images[]" accept="image/*" multiple style="display:none">
<input type="submit" name="set" value="Сохранить">
</form>
</div>
</div>
?>