sou 7 лет назад
Родитель
Сommit
32eb6c5a34
2 измененных файлов с 11 добавлено и 0 удалено
  1. 1 0
      lib/routes/admin.js
  2. 10 0
      lib/views/admin/global-notification.html

+ 1 - 0
lib/routes/admin.js

@@ -343,6 +343,7 @@ module.exports = function(crowi, app) {
       //   break;
       default:
         logger.error('GlobalNotificationSetting Type Error: undefined type');
+        req.flash('errorMessage', 'Error occurred in create a new global notification setting: undefined notification type');
         break;
     }
 

+ 10 - 0
lib/views/admin/global-notification.html

@@ -64,6 +64,11 @@
       if (res.ok) {
         $target.closest('tr').remove();
       }
+      else {
+        $('.admin-notification > .row > .col-md-9').prepend(
+          '<div class=\"alert alert-danger\">Error occurred in deleting global notifcation setting.</div>'
+        );
+      }
     });
   });
 
@@ -73,6 +78,11 @@
       if (res.ok) {
         // do something
       }
+      else {
+        $('.admin-notification > .row > .col-md-9').prepend(
+          '<div class=\"alert alert-danger\">Error occurred in deleting global notifcation setting.</div>'
+        );
+      }
     });
   });
 </script>