vendor/easycorp/easyadmin-bundle/src/Resources/views/crud/new.html.twig line 1

Open in your IDE?
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
  3. {% extends ea.templatePath('layout') %}
  4. {% form_theme new_form with ea.crud.formThemes only %}
  5. {% trans_default_domain ea.i18n.translationDomain %}
  6. {% block body_id 'ea-new-' ~ entity.name %}
  7. {% block body_class 'ea-new ea-new-' ~ entity.name %}
  8. {% set ea_field_assets = ea.crud.fieldAssets(constant('EasyCorp\\Bundle\\EasyAdminBundle\\Config\\Crud::PAGE_NEW')) %}
  9. {% block head_javascript %}
  10.     {{ parent() }}
  11.     <script src="{{ asset('form.js', ea.assets.defaultAssetPackageName) }}"></script>
  12. {% endblock head_javascript %}
  13. {% block configured_head_contents %}
  14.     {{ parent() }}
  15.     {% for htmlContent in ea_field_assets.headContents %}
  16.         {{ htmlContent|raw }}
  17.     {% endfor %}
  18. {% endblock %}
  19. {% block configured_body_contents %}
  20.     {{ parent() }}
  21.     {% for htmlContent in ea_field_assets.bodyContents %}
  22.         {{ htmlContent|raw }}
  23.     {% endfor %}
  24. {% endblock %}
  25. {% block configured_stylesheets %}
  26.     {{ parent() }}
  27.     {{ include('@EasyAdmin/includes/_css_assets.html.twig', { assets: ea_field_assets.cssAssets }, with_context = false) }}
  28.     {{ include('@EasyAdmin/includes/_encore_link_tags.html.twig', { assets: ea_field_assets.webpackEncoreAssets }, with_context = false) }}
  29. {% endblock %}
  30. {% block configured_javascripts %}
  31.     {{ parent() }}
  32.     {{ include('@EasyAdmin/includes/_js_assets.html.twig', { assets: ea_field_assets.jsAssets }, with_context = false) }}
  33.     {{ include('@EasyAdmin/includes/_encore_script_tags.html.twig', { assets: ea_field_assets.webpackEncoreAssets }, with_context = false) }}
  34. {% endblock %}
  35. {% block content_title %}
  36.     {%- apply spaceless -%}
  37.         {% set custom_page_title = ea.crud.customPageTitle('new', null, ea.i18n.translationParameters) %}
  38.         {{ custom_page_title is null
  39.             ? ea.crud.defaultPageTitle('new', null, ea.i18n.translationParameters)|trans|raw
  40.             : custom_page_title|trans|raw }}
  41.     {%- endapply -%}
  42. {% endblock %}
  43. {% block page_actions %}
  44.     {% for action in entity.actions %}
  45.         {{ include(action.templatePath, { action: action }, with_context = false) }}
  46.     {% endfor %}
  47. {% endblock %}
  48. {% block main %}
  49.     {% block new_form %}
  50.         {{ form(new_form) }}
  51.     {% endblock new_form %}
  52. {% endblock %}