Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.95 KB | None | 0 0
  1. <label>Severity *</label>
  2. <button class="btn btn-default btn-lg" ng-click="sModal()" name="s" ng-model="cpform.severity">{{cpform.severity}}</button>
  3.  
  4. <label>Occurence *</label>
  5. <button class="btn btn-default btn-lg" ng-click="OModal()" name="o" ng-model="cpform.occurence">{{cpform.occurence}}</button>
  6.  
  7. <label>Detection *</label>
  8. <button class="btn btn-default btn-lg" ng-click="siverifydetectionModal()" name="detection" ng-model="cpform.detection">{{cpform.detection}}</button>
  9.  
  10. <label>RPN</label>
  11. <button class="btn btn-default btn-lg" ng-model="cpform.risk_score">{{cpform.severity*cpform.occurence*cpform.detection}}</button>
  12.  
  13. $scope.cpform = {
  14. summary: r_header.summary,
  15. severity:r_header.severity,
  16. occurence:r_header.occurence,
  17. detection:r_header.detection,
  18. risk_score: r_header.risk_score,
  19. nocpz: nocpz_checked,
  20. route: r_header.route,
  21. layers: r_header.layers,
  22. comments: r_header.comments,
  23. risks: risk_id_list,
  24.  
  25.  
  26. };
  27.  
  28. }
  29.  
  30.  
  31.  
  32. $scope.updateReview = function (cpform, formname) {
  33. $scope.uprev_submit_disabled = true;
  34. var updated_field_list = [];
  35.  
  36. if (r_header.revSeverity[0] != null) {
  37. angular.forEach($scope.cpform, function(value, key) {
  38. //if(key[0] == '$') return;
  39. console.log("Chck", value, key);
  40. if (!formname[key].$pristine) {
  41. updated_field_list.push(key);
  42. }
  43. console.log("CPZ", key, formname[key].$pristine)
  44. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement