{% import "helpers.html.twig" as helpers %} {% extends '@Admin/base.html.twig' %} {% form_theme form _self %} {% block currentPage %}newnews{% endblock %} {% block title %} {{ '_NEWS_NEW_'|trans({},'admin') }} {% endblock %} {% block _news_group1_pdfFile_row %}
{{ form_label(form) }}
{{ form_widget(form) }}
{% endblock %} {% block errorMessage %} {% if form.vars.errors.form.getErrors(true)|length %} {% endif %} {% endblock %} {% block body %}
{{ form_start(form) }} {# {% for row in sorting %}
{% for fieldName,size in row %} {% if (attribute(form, fieldName) is defined) %}
{{ form_row(attribute(form, fieldName)) }}
{% endif %} {% endfor %}
{% endfor %}#}
{{ form_row(form.title) }}
{{ form_row(form.hotNews) }}
{% for field in [ 'status', 'publishDate'] %} {% if (attribute(form, field) is defined) %}
{{ form_row(attribute(form, field)) }}
{% endif %} {% endfor %} {% for field in [ 'showMostRead','renew' ] %} {% if (attribute(form, field) is defined) %}
{{ form_row(attribute(form, field)) }}
{% endif %} {% endfor %}
{% for field in [ 'priority', 'level', 'type', 'categoryData'] %} {% if (attribute(form, field) is defined) %}
{{ form_row(attribute(form, field)) }}
{% endif %} {% endfor %}
{% for field in [ 'relatedNewsData', 'album', 'eventData', 'rating' ] %} {% if (attribute(form, field) is defined) %}
{{ form_row(attribute(form, field)) }}
{% endif %} {% endfor %}
{% for field in [ 'authorData', 'source'] %} {% if (attribute(form['article-group'], field) is defined) %}
{{ form_row(attribute(form['article-group'], field)) }}
{% endif %} {% endfor %}
{% for field in [ 'body', 'tags'] %} {% if (attribute(form['group1'], field) is defined) %} {{ form_row(attribute(form['group1'], field)) }} {% endif %} {% endfor %}
{% for field in ['picture','imageFile','pdfFile'] %} {% if (attribute(form['group1'], field) is defined) %}
{{ form_row(attribute(form['group1'], field)) }}
{% endif %} {% endfor %}
{{ form_widget(form['group1'].instantTweet,{'attr':{'onchange':"document.getElementById('news_group1_tweet').disabled = !this.checked;if(document.getElementById('news_group1_tweet').value == '')document.getElementById('news_group1_tweet').value= document.getElementById('news_title').value;"}}) }}
{{ form_widget(form['group1'].tweet) }}
{% for field in [ 'instantNotification', 'instantSms'] %} {% if (attribute(form, field) is defined) %} {{ form_widget(attribute(form, field)) }} {% endif %} {% endfor %}
{{ form_widget(form.notificationText) }}
{{ form_end(form) }}
{{ include("@Admin/news/imagePicker.html.twig") }} {{ include("@Admin/albums/picturesForm.html.twig") }} {% endblock %}