aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/onap-ui
diff options
context:
space:
mode:
Diffstat (limited to '3rd_party/static/onap-ui')
-rw-r--r--3rd_party/static/onap-ui/components/results/results.html3
-rw-r--r--3rd_party/static/onap-ui/components/results/resultsController.js53
-rw-r--r--3rd_party/static/onap-ui/shared/header/header.html3
3 files changed, 48 insertions, 11 deletions
diff --git a/3rd_party/static/onap-ui/components/results/results.html b/3rd_party/static/onap-ui/components/results/results.html
index ce43036..2206029 100644
--- a/3rd_party/static/onap-ui/components/results/results.html
+++ b/3rd_party/static/onap-ui/components/results/results.html
@@ -81,7 +81,8 @@
<a ng-class="{'hide': result.status != 'review'}"
ng-click="ctrl.deleteApplication(result)">withdraw submit</a>
</li>
- <li role="menuitem" ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults"
+ <li role="menuitem"
+ ng-if="auth.currentUser.openid == result.owner && ctrl.isUserResults && auth.currentUser.role.indexOf('user') != -1"
class="menu-item menu-item-type-post_type menu-item-object-page">
<a ng-class="{'hide': result.status != 'private'}"
ng-click="ctrl.openApplicationModal(result)">submit to review</a>
diff --git a/3rd_party/static/onap-ui/components/results/resultsController.js b/3rd_party/static/onap-ui/components/results/resultsController.js
index d459495..5983dd8 100644
--- a/3rd_party/static/onap-ui/components/results/resultsController.js
+++ b/3rd_party/static/onap-ui/components/results/resultsController.js
@@ -257,21 +257,58 @@
"primary_business_email": ctrl.primary_business_email
};
- $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
- if (resp.data.code && resp.data.code != 0) {
- alert(resp.data.msg);
- return;
+ if (ctrl.company_name == null ||
+ ctrl.company_website == null ||
+ ctrl.primary_contact_name == null ||
+ ctrl.primary_phone_number == null ||
+ ctrl.primary_business_email== null ||
+ ctrl.xnf_version == null ||
+ ctrl.xnf_name == null ||
+ ctrl.xnf_description == null ||
+ ctrl.xnfd_id == null) {
+
+ alert('There are empty required fields in the application form');
+
+ } else if (ctrl.lab_location == 'third') {
+ if (ctrl.lab_name == null ||
+ ctrl.lab_email == null ||
+ ctrl.lab_address == null ||
+ ctrl.lab_phone == null) {
+
+ alert('There are empty required fields in the application form');
+
+ } else {
+ $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
+ if (resp.data.code && resp.data.code != 0) {
+ alert(resp.data.msg);
+ return;
+ }
+ toggleCheck(result, 'status', 'review');
+ }, function(error) {
+ /* do nothing */
+ });
}
- toggleCheck(result, 'status', 'review');
- }, function(error) {
- /* do nothing */
- });
+ } else {
+ $http.post(testapiApiUrl + "/onap/cvp/applications", data).then(function(resp) {
+ if (resp.data.code && resp.data.code != 0) {
+ alert(resp.data.msg);
+ return;
+ }
+ toggleCheck(result, 'status', 'review');
+ }, function(error) {
+ /* do nothing */
+ });
+ }
}
}, function(error) {
/* do nothing */
});
logo_name = file.name;
}
+
+ if (typeof file === 'undefined') {
+ alert('There are empty required fields in the application form');
+ }
ngDialog.close();
}
diff --git a/3rd_party/static/onap-ui/shared/header/header.html b/3rd_party/static/onap-ui/shared/header/header.html
index 8e18026..732bb9e 100644
--- a/3rd_party/static/onap-ui/shared/header/header.html
+++ b/3rd_party/static/onap-ui/shared/header/header.html
@@ -23,8 +23,7 @@
ng-if="auth.isAuthenticated && auth.canReview(auth.currentUser)">
<a ui-sref="communityResults">Incoming Reviews</a>
</li>
- <li ng-class="{ active: header.isActive('/user_results')}"
- ng-if="auth.isAuthenticated && auth.currentUser.role.indexOf('user') != -1">
+ <li ng-class="{ active: header.isActive('/user_results')}" ng-if="auth.isAuthenticated">
<a ui-sref="userResults">My Results</a>
</li>
<li ng-class="{ active: header.isActive('/profile')}" ng-if="auth.isAuthenticated">