Fix plugin field on notification edit
This commit is contained in:
parent
55f219e97a
commit
71df6b8560
|
@ -42,8 +42,8 @@ angular.module('lemur')
|
||||||
PluginService.getByType('notification').then(function (plugins) {
|
PluginService.getByType('notification').then(function (plugins) {
|
||||||
$scope.plugins = plugins;
|
$scope.plugins = plugins;
|
||||||
_.each($scope.plugins, function (plugin) {
|
_.each($scope.plugins, function (plugin) {
|
||||||
if (plugin.slug === $scope.notification.pluginName) {
|
if (plugin.slug === $scope.notification.plugin.slug) {
|
||||||
plugin.pluginOptions = $scope.notification.notificationOptions;
|
plugin.pluginOptions = $scope.notification.plugin.pluginOptions;
|
||||||
$scope.notification.plugin = plugin;
|
$scope.notification.plugin = plugin;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -51,16 +51,6 @@ angular.module('lemur')
|
||||||
NotificationService.getCertificates(notification);
|
NotificationService.getCertificates(notification);
|
||||||
});
|
});
|
||||||
|
|
||||||
PluginService.getByType('notification').then(function (plugins) {
|
|
||||||
$scope.plugins = plugins;
|
|
||||||
_.each($scope.plugins, function (plugin) {
|
|
||||||
if (plugin.slug === $scope.notification.pluginName) {
|
|
||||||
plugin.pluginOptions = $scope.notification.notificationOptions;
|
|
||||||
$scope.notification.plugin = plugin;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.save = function (notification) {
|
$scope.save = function (notification) {
|
||||||
NotificationService.update(notification).then(
|
NotificationService.update(notification).then(
|
||||||
function () {
|
function () {
|
||||||
|
|
Loading…
Reference in New Issue