Files
press/cabinet_service/templates/post_edit.html
T

32 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}Изменить пост{% endblock %}
{% block content %}
<div class="ps-main-head">
<div>
<a href="/posts/{{ post.id }}" class="ps-btn ps-btn--quiet ps-btn--sm app-back">{{ ui.icon('chevron-left', 16) }}<span class="ps-btn-label">К посту</span></a>
<h1 class="ps-h1">Изменить пост</h1>
<p class="ps-lead">{{ platform_label(post.platform) }} · {{ post.created_at|local_dt }}</p>
</div>
</div>
<form method="post" action="/posts/{{ post.id }}/edit" class="ps-panel app-form">
<div class="ps-field">
<div class="ps-field-top">
<label for="content" class="ps-field-label">Текст поста</label>
<span class="ps-field-count" id="len">{{ post.content|length }} зн.</span>
</div>
<textarea id="content" name="content" rows="14" class="ps-field-control" style="font-size:16px; line-height:25px" required>{{ post.content }}</textarea>
</div>
<div class="app-actions">
<button type="submit" class="ps-btn ps-btn--primary">{{ ui.icon('check', 20) }}<span class="ps-btn-label">Сохранить</span></button>
<a class="ps-btn ps-btn--quiet" href="/posts/{{ post.id }}"><span class="ps-btn-label">Отмена</span></a>
</div>
</form>
{% endblock %}
{% block scripts %}
<script>
document.getElementById('content').addEventListener('input', function () {
document.getElementById('len').textContent = this.value.length.toLocaleString('ru-RU') + ' зн.';
});
</script>
{% endblock %}