Skip to content

Commit

Permalink
fix(Calendar): Show error message when trying to add existing calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
jevers authored and Christian Feitl committed Mar 19, 2024
1 parent de86986 commit 2fb8000
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions tine20/Calendar/js/ExceptionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Tine.Calendar.handleRequestException = function(exception, callback, callbackSco
Tine.log.warn(exception);

switch(exception.code) {
case 600: // Container already exists
case 911: // Calendar_Exception_InvalidUrl
Ext.MessageBox.show(defaults);
break;
Expand Down
3 changes: 3 additions & 0 deletions tine20/Calendar/translations/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -2899,3 +2899,6 @@ msgstr "Resource: {name} schon reserviert"

msgid "The resource {name} on floor {floorName} is reserved for selected date: {date} by {name1}."
msgstr "Die Resource {name} im Stock {floorName} ist von {name1} für den Tag: {date} reserviert."

msgid "The container already exists"
msgstr "Der Container existiert bereits"
3 changes: 3 additions & 0 deletions tine20/Calendar/translations/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -2667,3 +2667,6 @@ msgstr "Remove all filters on change selection"

msgid "On Calendar Change will remove all filters"
msgstr "On Calendar Change will remove all filters"

msgid "The container already exists"
msgstr "The container already exists"
3 changes: 3 additions & 0 deletions tine20/Calendar/translations/template.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2587,3 +2587,6 @@ msgstr ""
#: Model/Resource.php:88
msgid "Site"
msgstr ""

msgid "The container already exists"
msgstr ""
3 changes: 1 addition & 2 deletions tine20/Tinebase/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ protected function _checkExistence(Tinebase_Model_Container $container)
}
$existingContainer = $this->_getExistingContainer($filter);
if ($existingContainer) {
$translation = Tinebase_Translation::getTranslation();
throw new Tinebase_Exception_SystemGeneric($translation->_('The container already exists'));
throw new Tinebase_Exception_SystemGeneric('The container already exists');
}
}

Expand Down

0 comments on commit 2fb8000

Please sign in to comment.