summaryrefslogtreecommitdiffstats
path: root/apps/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'apps/bookmarks')
-rw-r--r--apps/bookmarks/js/bookmarks.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js
index 73986e49186..5032aa5f50c 100644
--- a/apps/bookmarks/js/bookmarks.js
+++ b/apps/bookmarks/js/bookmarks.js
@@ -60,7 +60,14 @@ function addOrEditBookmark(event) {
var title = encodeEntities($('#bookmark_add_title').val());
var tags = encodeEntities($('#bookmark_add_tags').val());
$("#firstrun").hide();
-
+ if($.trim(url) == '') {
+ OC.dialogs.alert('A valid bookmark url must be provided', 'Error creating bookmark');
+ return false;
+ }
+ if($.trim(title) == '') {
+ OC.dialogs.alert('A valid bookmark title must be provided', 'Error creating bookmark');
+ return false;
+ }
if (id == 0) {
$.ajax({
url: OC.filePath('bookmarks', 'ajax', 'addBookmark.php'),