Skip to content
Permalink
Browse files

Show warning that the copy needs to be saved before it is created

  • Loading branch information...
carakas committed Jan 24, 2019
1 parent b01dbbd commit 4455b1aa117f72b7e50e3939a59d7d9a36d67aab
@@ -299,3 +299,7 @@ label .templateVisual {
margin-top: 1rem;
margin-left: -20px;
}

#copyPageWarning {
margin: 0 0 15px 0;
}
@@ -732,6 +732,8 @@ private function getOriginalPage(): ?array
return null;
}
$this->template->assign('showCopyWarning', true);
$originalPage = BackendPagesModel::get($id);
$this->blocksContent = BackendPagesModel::getBlocks($id, $originalPage['revision_id']);
@@ -768,6 +768,16 @@
<translation language="ru"><![CDATA[%1$s копия]]></translation>
<translation language="it"><![CDATA[%1$s copia]]></translation>
</item>
<item type="message" name="CopySaveWarning">
<translation language="nl"><![CDATA[<p><strong>Belangrijk:</strong> De kopie is nog niet opgeslagen.</p>]]></translation>
<translation language="en"><![CDATA[<p><strong>Important:</strong> The copy hasn't been saved yet.</p>]]></translation>
<translation language="fr"><![CDATA[<p><strong>Important:</strong> La copie n'a pas encore été sauvegardée.</p>]]></translation>
<translation language="de"><![CDATA[<p><strong> Wichtig:</strong> Die Kopie wurde noch nicht gespeichert.</p>]]></translation>
<translation language="pl"><![CDATA[<p><strong>Uwaga:</strong> Kopia nie została jeszcze zapisana.</p>]]></translation>
<translation language="es"><![CDATA[<p><strong>Importante:</strong> La copia aún no se ha guardado.</p>]]></translation>
<translation language="ru"><![CDATA[<p><strong>Важно:</strong> Копия еще не сохранена.</p>]]></translation>
<translation language="it"><![CDATA[<p><strong>Importante:</strong> La copia non è stata ancora salvata.</p>]]></translation>
</item>
</Pages>
<Core>
<item type="error" name="CantBeMoved">
@@ -28,6 +28,11 @@
{% endblock %}

{% block content %}
{% if showCopyWarning %}
<div id="copyPageWarning" class="alert alert-warning alert-xs">
{{ macro.icon('exclamation-triangle') }}{{ 'msg.CopySaveWarning'|trans|raw }}
</div>
{% endif %}
{% form add %}
{{ hidTemplateId|raw }}
<div class="row fork-module-content">
@@ -2231,7 +2231,8 @@ VALUES
(1530, 1, 'en', 'Backend', 'Pages', 'lbl', 'InsidePage', 'add as subpage of the reference page', '2017-08-31 14:28:26'),
(1531, 1, 'en', 'Backend', 'Pages', 'lbl', 'CopyThisPage', 'copy this page', '2017-08-31 14:28:26'),
(1532, 1, 'en', 'Backend', 'Pages', 'lbl', 'CopiedTitle', '%1$s copy', '2017-08-31 14:28:26'),
(1533, 1, 'en', 'Backend', 'Pages', 'lbl', 'AfterPage', 'add after reference page', '2017-08-31 14:28:26');
(1533, 1, 'en', 'Backend', 'Pages', 'msg', 'CopySaveWarning', '<p><strong>Important:</strong> The copy hasn''t been saved yet.</p>', '2017-08-31 14:28:26'),
(1534, 1, 'en', 'Backend', 'Pages', 'lbl', 'AfterPage', 'add after reference page', '2017-08-31 14:28:26');

/*!40000 ALTER TABLE `locale` ENABLE KEYS */;
UNLOCK TABLES;

0 comments on commit 4455b1a

Please sign in to comment.
You can’t perform that action at this time.