Added confirmation page for monitoring + a few tweaks.
This commit is contained in:
parent
1b173b79d4
commit
0bdce5debb
24 changed files with 431 additions and 72 deletions
app/scripts/directives
|
@ -123,6 +123,10 @@ angular.module('ffffng')
|
|||
return $scope.nodeForm && $scope.nodeForm[field].$invalid && submitted;
|
||||
};
|
||||
|
||||
$scope.monitoringActive = function () {
|
||||
return $scope.node.monitoring && monitoringConfirmed && $scope.node.email === initialEmail;
|
||||
};
|
||||
|
||||
$scope.monitoringInitialConfirmationRequired = function () {
|
||||
return $scope.node.monitoring
|
||||
&& ($scope.action === 'create' || $scope.node.email !== initialEmail || !initialMonitoring);
|
||||
|
@ -151,7 +155,8 @@ angular.module('ffffng')
|
|||
}
|
||||
|
||||
$scope.error = null;
|
||||
$scope.save(node).error(function (response, code) {
|
||||
$scope.save(node).catch(function (response, code) {
|
||||
// error
|
||||
switch (code) {
|
||||
case 409: // conflict
|
||||
$scope.error = duplicateError[response.field];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue