diff --git a/src/Infrastructure/Resources/views/admin/edit/_partial/_body.html.twig b/src/Infrastructure/Resources/views/admin/edit/_partial/_body.html.twig
index b4e7669..a282a23 100644
--- a/src/Infrastructure/Resources/views/admin/edit/_partial/_body.html.twig
+++ b/src/Infrastructure/Resources/views/admin/edit/_partial/_body.html.twig
@@ -57,7 +57,11 @@
{{ form_row(form.title, {'attr': {'class': 'terms-module-form-field-full'}}) }}
-
{{ form_row(form.publicationDate, {'attr': {'class': 'terms-module-form-field-small'}}) }}
+ {% if lastTermsVersion.version > 1 %}
+
{{ form_row(form.publicationDate, {'attr': {'class': 'terms-module-form-field-small'}}) }}
+ {% else %}
+ {% do form.publicationDate.setRendered() %}
+ {% endif %}
{{ form_row(form.content, {'attr': {'class': 'terms-module-form-field-full'}}) }}
diff --git a/src/Infrastructure/Resources/views/admin/edit/_partial/js/_listener.js.twig b/src/Infrastructure/Resources/views/admin/edit/_partial/js/_listener.js.twig
index d1b97ce..0bb7f51 100644
--- a/src/Infrastructure/Resources/views/admin/edit/_partial/js/_listener.js.twig
+++ b/src/Infrastructure/Resources/views/admin/edit/_partial/js/_listener.js.twig
@@ -15,11 +15,14 @@ document.getElementById('{{ form.title.vars.id }}').addEventListener('input', fu
window.computeExitButtonText();
});
-document.getElementById('{{ form.publicationDate.vars.id }}').addEventListener('input', function () {
- window.currentTermsVersion.publicationDate = window.getTermsVersionPublicationDate();
- window.computeSaveButtonStatus();
- window.computeExitButtonText();
-});
+const publicationDate = document.getElementById('{{ form.publicationDate.vars.id }}');
+if (publicationDate !== null) {
+ publicationDate.addEventListener('input', function () {
+ window.currentTermsVersion.publicationDate = window.getTermsVersionPublicationDate();
+ window.computeSaveButtonStatus();
+ window.computeExitButtonText();
+ });
+}
CKEDITOR.instances.terms_version_form_content.on('change', function () {
window.currentTermsVersion.content = window.getTermsVersionContent();