{% extends "base.html" %} {% block title %}{% if announcement %}Edytuj ogloszenie{% else %}Nowe ogloszenie{% endif %} - Norda Biznes Partner{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% if announcement %}Edytuj ogloszenie{% else %}Nowe ogloszenie{% endif %}

{% if announcement %} Podglad ↗ {% endif %}
{% if announcement %}
Status: {{ announcement.status_label }} {% if announcement.published_at %} | Opublikowano: {{ announcement.published_at.strftime('%Y-%m-%d %H:%M') }} {% endif %} {% if announcement.views_count %} | Wyswietlenia: {{ announcement.views_count }} {% endif %}
{% endif %}
0 / 500

Mozesz uzyc HTML: <p>, <h3>, <ul>, <li>, <a href="">, <strong>

Kategoryzacja

Media i linki

Opcjonalny obrazek wyswietlany przy ogloszeniu

{% if announcement and announcement.image_url %} Preview {% endif %}

Link do zewnetrznego zrodla lub formularza

Publikacja

Pozostaw puste aby nie wygasalo

Anuluj {% if announcement %} {% if announcement.status == 'draft' %} {% elif announcement.status == 'published' %} {% elif announcement.status == 'archived' %} {% endif %} {% else %} {% endif %}
{% endblock %} {% block extra_js %} // Character counter for excerpt const excerptTextarea = document.getElementById('excerpt'); const excerptCounter = document.getElementById('excerpt-counter'); function updateExcerptCounter() { const length = excerptTextarea.value.length; excerptCounter.textContent = length + ' / 500'; excerptCounter.classList.remove('warning', 'error'); if (length > 450) { excerptCounter.classList.add('warning'); } if (length >= 500) { excerptCounter.classList.add('error'); } } excerptTextarea.addEventListener('input', updateExcerptCounter); updateExcerptCounter(); // Image preview on URL change const imageUrlInput = document.getElementById('image_url'); imageUrlInput.addEventListener('change', function() { const existingPreview = document.querySelector('.preview-image'); if (existingPreview) { existingPreview.src = this.value; existingPreview.style.display = this.value ? 'block' : 'none'; } else if (this.value) { const img = document.createElement('img'); img.src = this.value; img.alt = 'Preview'; img.className = 'preview-image'; img.onerror = function() { this.style.display = 'none'; }; this.parentNode.appendChild(img); } }); {% endblock %}