From 7dd479029fd68fe44ab9c509f86c1f200abd86ee Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 2 Sep 2016 11:30:19 +0200 Subject: [PATCH] Fixed error message for invalid links --- com.woltlab.wcf/templates/wysiwyg.tpl | 1 + wcfsetup/install/files/acp/templates/wysiwyg.tpl | 1 + .../install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js | 3 ++- wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/com.woltlab.wcf/templates/wysiwyg.tpl b/com.woltlab.wcf/templates/wysiwyg.tpl index fa3332ba7f..54b28feb45 100644 --- a/com.woltlab.wcf/templates/wysiwyg.tpl +++ b/com.woltlab.wcf/templates/wysiwyg.tpl @@ -72,6 +72,7 @@ 'wcf.editor.link.add': '{lang}wcf.editor.link.add{/lang}', 'wcf.editor.link.edit': '{lang}wcf.editor.link.edit{/lang}', + 'wcf.editor.link.error.invalid': '{lang}wcf.editor.link.error.invalid{/lang}', 'wcf.editor.link.url': '{lang}wcf.editor.link.url{/lang}', 'wcf.editor.link.text': '{lang}wcf.editor.link.text{/lang}', diff --git a/wcfsetup/install/files/acp/templates/wysiwyg.tpl b/wcfsetup/install/files/acp/templates/wysiwyg.tpl index fa3332ba7f..54b28feb45 100644 --- a/wcfsetup/install/files/acp/templates/wysiwyg.tpl +++ b/wcfsetup/install/files/acp/templates/wysiwyg.tpl @@ -72,6 +72,7 @@ 'wcf.editor.link.add': '{lang}wcf.editor.link.add{/lang}', 'wcf.editor.link.edit': '{lang}wcf.editor.link.edit{/lang}', + 'wcf.editor.link.error.invalid': '{lang}wcf.editor.link.error.invalid{/lang}', 'wcf.editor.link.url': '{lang}wcf.editor.link.url{/lang}', 'wcf.editor.link.text': '{lang}wcf.editor.link.text{/lang}', diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js index f278af6594..ca5693775a 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Redactor/Link.js @@ -33,9 +33,10 @@ define(['Language', 'Ui/Dialog'], function(Language, UiDialog) { if (small === null) { small = elCreate('small'); small.className = 'innerError'; - small.textContent = Language.get('wcf.global.form.error.empty'); url.parentNode.appendChild(small); } + + small.textContent = Language.get((url.value.trim() === '' ? 'wcf.global.form.error.empty' : 'wcf.editor.link.error.invalid')); } }, diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index c158fec651..25a6cb1072 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2364,6 +2364,7 @@ Fehler sind beispielsweise: + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 6e937727c5..19c497cad8 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2330,6 +2330,7 @@ Errors are: + -- 2.20.1