@@ -5812,7 +5812,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
5812
5812
5813
5813
$templateCache.put('views/directives/create-secret.html',
5814
5814
"<alerts alerts=\"alerts\"></alerts>\n" +
5815
- "<ng-form name=\"secretForm\">\n" +
5815
+ "<ng-form name=\"secretForm\" class=\"create-secret-form\" >\n" +
5816
5816
"<div for=\"secretType\" ng-if=\"!type\" class=\"form-group mar-top-lg\">\n" +
5817
5817
"<label>Secret Type</label>\n" +
5818
5818
"<ui-select required ng-model=\"newSecret.type\" search-enabled=\"false\" ng-change=\"newSecret.authType = secretAuthTypeMap[newSecret.type].authTypes[0].id\">\n" +
@@ -5825,18 +5825,21 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
5825
5825
"<div ng-if=\"newSecret.type\">\n" +
5826
5826
"<div class=\"form-group\">\n" +
5827
5827
"<label for=\"secretName\" class=\"required\">Secret Name</label>\n" +
5828
- "<span ng-class=\"{'has-error': nameTaken || (secretForm.secretName.$error.pattern && secretForm.secretName.$touched)}\">\n" +
5828
+ "<span ng-class=\"{'has-error': nameTaken || (secretForm.secretName.$invalid && secretForm.secretName.$touched)}\">\n" +
5829
5829
"<input class=\"form-control\" id=\"secretName\" name=\"secretName\" ng-model=\"newSecret.data.secretName\" type=\"text\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" aria-describedby=\"secret-name-help\" ng-maxlength=\"253\" ng-pattern=\"/^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/\" required>\n" +
5830
5830
"</span>\n" +
5831
5831
"<div class=\"has-error\" ng-show=\"nameTaken\">\n" +
5832
5832
"<span class=\"help-block\">\n" +
5833
5833
"This name is already in use. Please choose a different name.\n" +
5834
5834
"</span>\n" +
5835
5835
"</div>\n" +
5836
- "<div class=\"has-error\" ng-show=\"secretForm.secretName.$error.pattern && secretForm.secretName.$touched \">\n" +
5837
- "<span class=\"help-block\">\n" +
5836
+ "<div class=\"has-error\" ng-show=\"secretForm.secretName.$invalid \">\n" +
5837
+ "<div ng-show=\"secretForm.secretName.$error.pattern && secretForm.secretName.$touched\" class=\"help-block\">\n" +
5838
5838
"Secret name must consist of lower-case letters, numbers, periods, and hyphens. It must start and end with a letter or number.\n" +
5839
- "</span>\n" +
5839
+ "</div>\n" +
5840
+ "<div ng-show=\"secretForm.secretName.$error.required && secretForm.secretName.$touched\" class=\"help-block\">\n" +
5841
+ "Secret name is required.\n" +
5842
+ "</div>\n" +
5840
5843
"</div>\n" +
5841
5844
"<div class=\"help-block\" id=\"secret-name-help\">\n" +
5842
5845
"Unique name of the new secret.\n" +
@@ -5861,15 +5864,18 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
5861
5864
"Optional username for Git authentication.\n" +
5862
5865
"</div>\n" +
5863
5866
"</div>\n" +
5864
- "<div class=\"form-group\">\n" +
5867
+ "<div class=\"form-group\" ng-class=\"{ 'has-error' : secretForm.passwordToken.$invalid && secretForm.passwordToken.$touched }\" >\n" +
5865
5868
"<label ng-class=\"{ required: !add.cacert && !add.gitconfig }\" for=\"passwordToken\">Password or Token</label>\n" +
5866
- "<div>\n" +
5867
5869
"<input class=\"form-control\" id=\"passwordToken\" name=\"passwordToken\" ng-model=\"newSecret.data.passwordToken\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" aria-describedby=\"password-token-help\" type=\"password\" ng-required=\"!add.cacert && !add.gitconfig\">\n" +
5868
5870
"</div>\n" +
5871
+ "<div class=\"has-error\" ng-show=\"secretForm.passwordToken.$error.required && secretForm.passwordToken.$touched\">\n" +
5872
+ "<div class=\"help-block\">\n" +
5873
+ "Password or token is required.\n" +
5874
+ "</div>\n" +
5875
+ "</div>\n" +
5869
5876
"<div class=\"help-block\" id=\"password-token-help\">\n" +
5870
5877
"Password or token for Git authentication. Required if a ca.crt or .gitconfig file is not specified.\n" +
5871
5878
"</div>\n" +
5872
- "</div>\n" +
5873
5879
"<div class=\"form-group\">\n" +
5874
5880
"<div class=\"checkbox\">\n" +
5875
5881
"<label>\n" +
@@ -5930,30 +5936,53 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
5930
5936
"</div>\n" +
5931
5937
"</div>\n" +
5932
5938
"<div ng-if=\"newSecret.authType === 'kubernetes.io/dockercfg'\">\n" +
5933
- "<div class=\"form-group\">\n" +
5939
+ "<div class=\"form-group\" ng-class=\"{ 'has-error' : secretForm.dockerServer.$invalid && secretForm.dockerServer.$touched }\" >\n" +
5934
5940
"<label for=\"dockerServer\" class=\"required\">Image Registry Server Address</label>\n" +
5935
5941
"<div>\n" +
5936
5942
"<input class=\"form-control\" id=\"dockerServer\" name=\"dockerServer\" ng-model=\"newSecret.data.dockerServer\" type=\"text\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" required>\n" +
5937
5943
"</div>\n" +
5938
5944
"</div>\n" +
5939
- "<div class=\"form-group\">\n" +
5945
+ "<div ng-show=\"secretForm.dockerServer.$error.required && secretForm.dockerServer.$touched\" class=\"has-error\">\n" +
5946
+ "<div class=\"help-block\">\n" +
5947
+ "Image registry server address is required.\n" +
5948
+ "</div>\n" +
5949
+ "</div>\n" +
5950
+ "<div class=\"form-group\" ng-class=\"{ 'has-error' : secretForm.dockerUsername.$invalid && secretForm.dockerUsername.$touched }\">\n" +
5940
5951
"<label for=\"dockerUsername\" class=\"required\">Username</label>\n" +
5941
5952
"<div>\n" +
5942
5953
"<input class=\"form-control\" id=\"dockerUsername\" name=\"dockerUsername\" ng-model=\"newSecret.data.dockerUsername\" type=\"text\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" required>\n" +
5943
5954
"</div>\n" +
5944
5955
"</div>\n" +
5945
- "<div class=\"form-group\">\n" +
5956
+ "<div ng-show=\"secretForm.dockerUsername.$error.required && secretForm.dockerUsername.$touched\" class=\"has-error\">\n" +
5957
+ "<div class=\"help-block\">\n" +
5958
+ "Username is required.\n" +
5959
+ "</div>\n" +
5960
+ "</div>\n" +
5961
+ "<div class=\"form-group\" ng-class=\"{ 'has-error' : secretForm.dockerPassword.$invalid && secretForm.dockerPassword.$touched }\">\n" +
5946
5962
"<label for=\"dockerPassword\" class=\"required\">Password</label>\n" +
5947
5963
"<div>\n" +
5948
5964
"<input class=\"form-control\" id=\"dockerPassword\" name=\"dockerPassword\" ng-model=\"newSecret.data.dockerPassword\" type=\"password\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" required>\n" +
5949
5965
"</div>\n" +
5950
5966
"</div>\n" +
5951
- "<div class=\"form-group\">\n" +
5967
+ "<div ng-show=\"secretForm.dockerPassword.$error.required && secretForm.dockerPassword.$touched\" class=\"has-error\">\n" +
5968
+ "<div class=\"help-block\">\n" +
5969
+ "Password is required.\n" +
5970
+ "</div>\n" +
5971
+ "</div>\n" +
5972
+ "<div class=\"form-group\" ng-class=\"{ 'has-error' : secretForm.dockerEmail.$invalid && secretForm.dockerEmail.$touched }\">\n" +
5952
5973
"<label for=\"dockerEmail\" class=\"required\">Email</label>\n" +
5953
5974
"<div>\n" +
5954
5975
"<input class=\"form-control\" type=\"email\" id=\"dockerEmail\" name=\"dockerEmail\" ng-model=\"newSecret.data.dockerMail\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\" required>\n" +
5955
5976
"</div>\n" +
5956
5977
"</div>\n" +
5978
+ "<div class=\"has-error\" ng-show=\"secretForm.dockerEmail.$invalid\">\n" +
5979
+ "<div ng-show=\"secretForm.dockerEmail.$error.email && secretForm.dockerEmail.$touched\" class=\"help-block\">\n" +
5980
+ "Email must be in the form of <var>user@domain</var>.\n" +
5981
+ "</div>\n" +
5982
+ "<div ng-show=\"secretForm.dockerEmail.$error.required && secretForm.dockerEmail.$touched\" class=\"help-block\">\n" +
5983
+ "Email is required.\n" +
5984
+ "</div>\n" +
5985
+ "</div>\n" +
5957
5986
"</div>\n" +
5958
5987
"<div ng-if=\"newSecret.authType === 'kubernetes.io/dockerconfigjson'\">\n" +
5959
5988
"<div class=\"form-group\" id=\"docker-config\">\n" +
0 commit comments