diff --git a/app/docker/components/imageRegistry/porImageRegistry.html b/app/docker/components/imageRegistry/porImageRegistry.html index 2aab2eba5..aae64be66 100644 --- a/app/docker/components/imageRegistry/porImageRegistry.html +++ b/app/docker/components/imageRegistry/porImageRegistry.html @@ -13,7 +13,7 @@
-
+

Image name is required.

diff --git a/app/extensions/storidge/views/profiles/create/createprofile.html b/app/extensions/storidge/views/profiles/create/createprofile.html index 33c1f0bb5..7680d515e 100644 --- a/app/extensions/storidge/views/profiles/create/createprofile.html +++ b/app/extensions/storidge/views/profiles/create/createprofile.html @@ -18,7 +18,7 @@
-
+

This field is required.

@@ -36,7 +36,7 @@
-
+

This field is required.

@@ -51,7 +51,7 @@
-
+

This field is required.

Minimum value for capacity: 1.

@@ -117,7 +117,7 @@
-
+

A value is required for Min IOPS.

Minimum value for Min IOPS: 30.

@@ -126,7 +126,7 @@
-
+

A value is required for Max IOPS.

Minimum value for Max IOPS: 30.

@@ -162,7 +162,7 @@
-
+

A value is required for Min bandwidth.

Minimum value for Min bandwidth: 1.

@@ -171,7 +171,7 @@
-
+

A value is required for Max bandwidth.

Minimum value for Max bandwidth: 1.

diff --git a/app/extensions/storidge/views/profiles/edit/profile.html b/app/extensions/storidge/views/profiles/edit/profile.html index 73d7d4a2f..12994ad5f 100644 --- a/app/extensions/storidge/views/profiles/edit/profile.html +++ b/app/extensions/storidge/views/profiles/edit/profile.html @@ -29,7 +29,7 @@
-
+

This field is required.

@@ -44,7 +44,7 @@
-
+

This field is required.

Minimum value for capacity: 1.

@@ -110,7 +110,7 @@
-
+

A value is required for Min IOPS.

Minimum value for Min IOPS: 30.

@@ -119,7 +119,7 @@
-
+

A value is required for Max IOPS.

Minimum value for Max IOPS: 30.

@@ -155,7 +155,7 @@
-
+

A value is required for Min bandwidth.

Minimum value for Min bandwidth: 1.

@@ -164,7 +164,7 @@
-
+

A value is required for Max bandwidth.

Minimum value for Max bandwidth: 1.

diff --git a/app/portainer/components/forms/group-form/groupForm.html b/app/portainer/components/forms/group-form/groupForm.html index 4a2d64331..9d3b9a8a3 100644 --- a/app/portainer/components/forms/group-form/groupForm.html +++ b/app/portainer/components/forms/group-form/groupForm.html @@ -7,7 +7,7 @@
-
+

This field is required.

diff --git a/app/portainer/components/forms/template-form/templateForm.html b/app/portainer/components/forms/template-form/templateForm.html index 2fd3d41ed..67832e2ed 100644 --- a/app/portainer/components/forms/template-form/templateForm.html +++ b/app/portainer/components/forms/template-form/templateForm.html @@ -7,7 +7,7 @@
-
+

This field is required.

@@ -22,7 +22,7 @@
-
+

This field is required.

@@ -172,7 +172,7 @@
-
+

This field is required.

diff --git a/app/portainer/views/endpoints/create/createendpoint.html b/app/portainer/views/endpoints/create/createendpoint.html index cce0f67c7..ff8e7c232 100644 --- a/app/portainer/views/endpoints/create/createendpoint.html +++ b/app/portainer/views/endpoints/create/createendpoint.html @@ -102,7 +102,7 @@
-
+

This field is required.

@@ -122,7 +122,7 @@
-
+

This field is required.

@@ -153,7 +153,7 @@
-
+

This field is required.

@@ -168,7 +168,7 @@
-
+

This field is required.

@@ -183,7 +183,7 @@
-
+

This field is required.

diff --git a/app/portainer/views/tags/tags.html b/app/portainer/views/tags/tags.html index 7864a9105..e0fa96e2f 100644 --- a/app/portainer/views/tags/tags.html +++ b/app/portainer/views/tags/tags.html @@ -19,14 +19,15 @@ -
- +
+
-
+

This field is required.

+

This tag already exists.

diff --git a/app/portainer/views/tags/tagsController.js b/app/portainer/views/tags/tagsController.js index e8da81ec8..37f5eb5d0 100644 --- a/app/portainer/views/tags/tagsController.js +++ b/app/portainer/views/tags/tagsController.js @@ -10,6 +10,17 @@ function ($scope, $state, TagService, Notifications) { Name: '' }; + $scope.checkNameValidity = function(form) { + var valid = true; + for (var i = 0; i < $scope.tags.length; i++) { + if ($scope.formValues.Name === $scope.tags[i].Name) { + valid = false; + break; + } + } + form.name.$setValidity('validName', valid); + }; + $scope.removeAction = function (selectedItems) { var actionCount = selectedItems.length; angular.forEach(selectedItems, function (tag) { diff --git a/app/portainer/views/teams/teams.html b/app/portainer/views/teams/teams.html index ac634c21e..58733a269 100644 --- a/app/portainer/views/teams/teams.html +++ b/app/portainer/views/teams/teams.html @@ -13,14 +13,19 @@ -
+
- -
-
- - + +
+ +
+
+
+
+
+

This field is required.

+

This team already exists.

@@ -49,13 +54,10 @@
- - - {{ state.teamCreationError }} -
diff --git a/app/portainer/views/teams/teamsController.js b/app/portainer/views/teams/teamsController.js index b90e68447..ef9196743 100644 --- a/app/portainer/views/teams/teamsController.js +++ b/app/portainer/views/teams/teamsController.js @@ -2,8 +2,6 @@ angular.module('portainer.app') .controller('TeamsController', ['$q', '$scope', '$state', 'TeamService', 'UserService', 'ModalService', 'Notifications', 'Authentication', function ($q, $scope, $state, TeamService, UserService, ModalService, Notifications, Authentication) { $scope.state = { - userGroupGroupCreationError: '', - validName: false, actionInProgress: false }; @@ -12,7 +10,7 @@ function ($q, $scope, $state, TeamService, UserService, ModalService, Notificati Leaders: [] }; - $scope.checkNameValidity = function() { + $scope.checkNameValidity = function(form) { var valid = true; for (var i = 0; i < $scope.teams.length; i++) { if ($scope.formValues.Name === $scope.teams[i].Name) { @@ -20,19 +18,17 @@ function ($q, $scope, $state, TeamService, UserService, ModalService, Notificati break; } } - $scope.state.validName = valid; - $scope.state.teamCreationError = valid ? '' : 'Team name already existing'; + form.team_name.$setValidity('validName', valid); }; $scope.addTeam = function() { - $scope.state.actionInProgress = true; - $scope.state.teamCreationError = ''; var teamName = $scope.formValues.Name; var leaderIds = []; angular.forEach($scope.formValues.Leaders, function(user) { leaderIds.push(user.Id); }); + $scope.state.actionInProgress = true; TeamService.createTeam(teamName, leaderIds) .then(function success(data) { Notifications.success('Team successfully created', teamName); diff --git a/assets/css/app.css b/assets/css/app.css index e4ce06fd7..f6253b647 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -123,6 +123,10 @@ a[ng-click]{ color: #337ab7; } +.text-warning { + color: #f0ad4e; +} + .widget .widget-body table tbody .image-tag { font-size: 90% !important; margin-right: 5px;