Repository: ranger Updated Branches: refs/heads/master ab4793bce -> e23977ce6
RANGER-1805: Code improvement to follow best practices in js. Signed-off-by: Mehul Parikh <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/ranger/repo Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/e23977ce Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/e23977ce Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/e23977ce Branch: refs/heads/master Commit: e23977ce61ece178d37b97f95d5353fda53ab71b Parents: ab4793b Author: ni3galave <[email protected]> Authored: Thu Jan 25 10:42:50 2018 +0530 Committer: Mehul Parikh <[email protected]> Committed: Thu Jan 25 16:44:32 2018 +0530 ---------------------------------------------------------------------- .../main/webapp/scripts/modules/XAOverrides.js | 7 +++--- .../scripts/modules/globalize/message/en.js | 2 +- .../src/main/webapp/scripts/utils/XAEnums.js | 2 +- .../webapp/scripts/utils/XATemplateHelpers.js | 2 +- .../scripts/views/DownloadServicePolicy.js | 7 +++--- .../webapp/scripts/views/common/AddGroup.js | 2 -- .../scripts/views/policies/PermissionList.js | 9 -------- .../views/policymanager/ServiceLayout.js | 4 ++-- .../webapp/scripts/views/reports/AuditLayout.js | 6 ++--- .../scripts/views/reports/UserAccessLayout.js | 8 +++---- .../scripts/views/user/UserProfileForm.js | 2 +- .../webapp/templates/common/Footer_tmpl.html | 2 +- .../common/downloadservicepolicy_tmpl.html | 2 +- .../main/webapp/templates/helpers/XAHelpers.js | 23 ++++++++++---------- .../webapp/templates/kms/KmsKeyCreate_tmpl.html | 2 +- .../policies/RangerPolicyCreate_tmpl.html | 2 +- .../templates/service/ServiceCreate_tmpl.html | 2 +- .../templates/users/GroupCreate_tmpl.html | 2 +- .../webapp/templates/users/UserCreate_tmpl.html | 2 +- 19 files changed, 36 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/modules/XAOverrides.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/modules/XAOverrides.js b/security-admin/src/main/webapp/scripts/modules/XAOverrides.js index 82a84da..c571a96 100644 --- a/security-admin/src/main/webapp/scripts/modules/XAOverrides.js +++ b/security-admin/src/main/webapp/scripts/modules/XAOverrides.js @@ -86,7 +86,7 @@ render: function () { this.$el.empty(); if(this.model.get(this.column.get("name")) != undefined){ - rawValue = (this.model.get(this.column.get("name"))); + var rawValue = (this.model.get(this.column.get("name"))); this.switchStatus = this.formatter.fromRaw(rawValue, this.model); } @@ -699,9 +699,8 @@ } }, getTemplate : function() { - var that = this , resourcesType ; - var optionsHtml="", selectTemplate = '',excludeSupportToggleDiv='', recursiveSupportToggleDiv=''; - this.preserveResourceValues = {},klass = ''; + var that = this , resourcesType , optionsHtml="" , selectTemplate = '', excludeSupportToggleDiv='', recursiveSupportToggleDiv='', klass = ''; + this.preserveResourceValues = {} ; if(this.resourcesAtSameLevel){ _.each(this.sameLevelOpts, function(option){ return optionsHtml += "<option value='"+option+"'>"+option+"</option>"; },this); selectTemplate = '<select data-js="resourceType" class="btn dropdown-toggle sameLevelDropdown" >\ http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js index 2cd3345..b71427c 100644 --- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js +++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js @@ -36,7 +36,7 @@ if ( typeof require !== "undefined" && */ define(function(require) { 'use strict'; - Globalize = require( "globalize" ); + var Globalize = require( "globalize" ); Globalize.addCultureInfo( "en", { messages: { http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/utils/XAEnums.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/utils/XAEnums.js b/security-admin/src/main/webapp/scripts/utils/XAEnums.js index 164e939..0e0958d 100644 --- a/security-admin/src/main/webapp/scripts/utils/XAEnums.js +++ b/security-admin/src/main/webapp/scripts/utils/XAEnums.js @@ -23,7 +23,7 @@ define(function(require) { var $ = require('jquery'); var XAEnums = {}; - mergeParams = function(defaults, params) { + var mergeParams = function(defaults, params) { if (!params) { return defaults; } http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/utils/XATemplateHelpers.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/utils/XATemplateHelpers.js b/security-admin/src/main/webapp/scripts/utils/XATemplateHelpers.js index 785e2c2..b64f911 100644 --- a/security-admin/src/main/webapp/scripts/utils/XATemplateHelpers.js +++ b/security-admin/src/main/webapp/scripts/utils/XATemplateHelpers.js @@ -165,7 +165,7 @@ define(function ( require ){ return moment(Date(context)).format(f); }else{ return context; // moment plugin not available. return data as is. - }; + } }); return HHelpers; }); http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/DownloadServicePolicy.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/DownloadServicePolicy.js b/security-admin/src/main/webapp/scripts/views/DownloadServicePolicy.js index 1b1a4aa..fc8edbb 100644 --- a/security-admin/src/main/webapp/scripts/views/DownloadServicePolicy.js +++ b/security-admin/src/main/webapp/scripts/views/DownloadServicePolicy.js @@ -42,7 +42,6 @@ define(function(require){ }, ui:{ 'downloadReport' : '[data-id="downloadReport"]', - 'selectService' : '[data-id="selectService"]', 'servicesName' : '[data-id="servicesName"]', 'componentTypeSelected' : '[data-id="componentTypeSelected"]' }, @@ -51,8 +50,8 @@ define(function(require){ okClicked: function (modal) { var that = this, el = $(modal.currentTarget), - urls ='/service/plugins/policies/exportJson' - serviceName = this.ui.servicesName.val() + urls ='/service/plugins/policies/exportJson', + serviceName = this.ui.servicesName.val(); if (_.isEmpty(this.ui.componentTypeSelected.val())){ this.$el.find('.serviceValidationFile').show(); } @@ -125,7 +124,7 @@ define(function(require){ serviceSelect :function(e){ var options =this.serviceNames.map(function(m){ return { 'id' : m.name, 'text' : m.name}; }); var serviceTyp = options.map(function(m){return m.text}) - this.ui.servicesName.val(serviceTyp); + this.ui.servicesName.val(serviceTyp); this.ui.servicesName.select2({ multiple: true, closeOnSelect: true, http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/common/AddGroup.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/common/AddGroup.js b/security-admin/src/main/webapp/scripts/views/common/AddGroup.js index 81fd901..0952b89 100644 --- a/security-admin/src/main/webapp/scripts/views/common/AddGroup.js +++ b/security-admin/src/main/webapp/scripts/views/common/AddGroup.js @@ -93,8 +93,6 @@ define(function(require){ return; } that.checkDirtyFieldForGroup(values); - if(!_.isArray(values)) values=values.toString().split(','); - var valArr = []; if(!_.isUndefined($(that.el).find('.select2-container-multi')) && $(that.el).find('.select2-container-multi').length > 0){ http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js index 73d5417..5b3c492 100644 --- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js +++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js @@ -291,10 +291,6 @@ define(function(require) { return "<span class='label label-info'>" + obj.label + "</span>"; } }); - var perms = [] - if(that.model.has('accesses')){ - perms = that.model.get('accesses'); - } var items=[]; _.each(that.accessItems, function(item){ if($.inArray( item.type, values) >= 0){ @@ -466,11 +462,6 @@ define(function(require) { return "<span class='label label-info'>" + id.substr(0,id.indexOf(":")).toUpperCase() + "</span>"; } }); - var perms = [] - if(that.model.has('accesses')){ - perms = that.model.get('accesses'); - } - var items=[]; _.each(that.accessItems, function(item){ if($.inArray( item.type, values) >= 0){ http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/policymanager/ServiceLayout.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/policymanager/ServiceLayout.js b/security-admin/src/main/webapp/scripts/views/policymanager/ServiceLayout.js index ab42b5c..7aab1e2 100644 --- a/security-admin/src/main/webapp/scripts/views/policymanager/ServiceLayout.js +++ b/security-admin/src/main/webapp/scripts/views/policymanager/ServiceLayout.js @@ -128,7 +128,7 @@ define(function(require){ var el = $(e.currentTarget), serviceType = el.attr('data-servicetype'); if(serviceType){ var componentServices = this.services.where({'type' : serviceType }); - if(serviceType !== undefined && componentServices.length == 0 ){ + if(componentServices.length == 0 ){ XAUtil.alertBoxWithTimeSet(localization.tt('msg.noServiceToExport')); return; } @@ -176,7 +176,7 @@ define(function(require){ var el = $(e.currentTarget), serviceType = el.attr('data-servicetype'); if(serviceType){ var componentServices = this.services.where({'type' : serviceType }); - if(serviceType !== undefined && componentServices.length == 0 ){ + if(componentServices.length == 0 ){ XAUtil.alertBoxWithTimeSet(localization.tt('msg.noServiceToImport')); return; } http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js index 0e864b6..338943f 100644 --- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js +++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js @@ -748,9 +748,9 @@ define(function(require) { hasAction = ["EXPORT JSON", "EXPORT EXCEL", "EXPORT CSV", "IMPORT START", "IMPORT END"]; if($.inArray(action,hasAction)>=0){ if(action == "EXPORT JSON" || action == "EXPORT EXCEL" || action == "EXPORT CSV") - return html = 'Exported policies'; + return 'Exported policies'; else - return html = action; + return action; } else{ if(rawValue == XAEnums.ClassTypes.CLASS_TYPE_XA_ASSET.value || rawValue == XAEnums.ClassTypes.CLASS_TYPE_RANGER_SERVICE.value) html = 'Service '+action+'d '+'<b>'+name+'</b>'; @@ -968,7 +968,7 @@ define(function(require) { formatter: _.extend({}, Backgrid.CellFormatter.prototype, { fromRaw: function (rawValue, model) { return '<div title="'+rawValue+'">'+_.escape(rawValue)+'</div>\ - <div title="'+model.get('serviceType')+'" style="border-top: 1px solid #ddd;">'+_.escape(model.get('serviceType'))+'</div>';; + <div title="'+model.get('serviceType')+'" style="border-top: 1px solid #ddd;">'+_.escape(model.get('serviceType'))+'</div>'; } }) }, http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/reports/UserAccessLayout.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/reports/UserAccessLayout.js b/security-admin/src/main/webapp/scripts/views/reports/UserAccessLayout.js index c5dc053..90f44c1 100644 --- a/security-admin/src/main/webapp/scripts/views/reports/UserAccessLayout.js +++ b/security-admin/src/main/webapp/scripts/views/reports/UserAccessLayout.js @@ -310,9 +310,8 @@ define(function(require) {'use strict'; if(XAUtil.isMaskingPolicy(this.ui.policyType.val())){ subcolumns.push({ name: 'maskingCondition', - cell: 'html', cell: Backgrid.HtmlCell.extend({ - className : 'subgridTable' + className : 'subgridTable' }), label: 'Masking Condition', formatter: _.extend({}, Backgrid.CellFormatter.prototype, { @@ -346,10 +345,9 @@ define(function(require) {'use strict'; if(XAUtil.isRowFilterPolicy(this.ui.policyType.val())){ subcolumns.push({ name: 'rowLevelFilter', - cell: 'html', cell: Backgrid.HtmlCell.extend({ - className : 'subgridTable' - }), + className : 'subgridTable' + }), label: 'Row Level Filter', formatter: _.extend({}, Backgrid.CellFormatter.prototype, { fromRaw: function (rawValue,model) { http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js b/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js index a385592..d545a05 100644 --- a/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js +++ b/security-admin/src/main/webapp/scripts/views/user/UserProfileForm.js @@ -137,7 +137,7 @@ define(function(require){ XAUtil.notifySuccess('Success', "User profile updated successfully !!"); }, error: function (msResponse, options) { - if(!localization.tt(msResponse.responseJSON.msgDesc) == "Invalid new password"){ + if(localization.tt(msResponse.responseJSON.msgDesc) == "Invalid new password"){ that.fields.oldPassword.setError(localization.tt('validationMessages.oldPasswordError')); XAUtil.notifyInfo('',localization.tt('msg.myProfileError')); } http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/common/Footer_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/common/Footer_tmpl.html b/security-admin/src/main/webapp/templates/common/Footer_tmpl.html index e3accb6..e030f18 100644 --- a/security-admin/src/main/webapp/templates/common/Footer_tmpl.html +++ b/security-admin/src/main/webapp/templates/common/Footer_tmpl.html @@ -18,7 +18,7 @@ <div id="main-footer"> <div class="pull-left copy-right-text"> <p class="text-left"> - <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">{{tt 'h.licenseText'}}</a> + <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0" rel="noopener noreferrer" >{{tt 'h.licenseText'}}</a> </p> </div> <div class="pull-right"> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/common/downloadservicepolicy_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/common/downloadservicepolicy_tmpl.html b/security-admin/src/main/webapp/templates/common/downloadservicepolicy_tmpl.html index 49be577..38437fe 100644 --- a/security-admin/src/main/webapp/templates/common/downloadservicepolicy_tmpl.html +++ b/security-admin/src/main/webapp/templates/common/downloadservicepolicy_tmpl.html @@ -25,7 +25,7 @@ </div> <label> <b>Select Service Name *</b> - <input type="text" data-id="servicesName" data-id="selectService"/> + <input type="text" data-id="servicesName"/> <span class="validateFile hide text-color-red"> Required</span> </label> </div> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/helpers/XAHelpers.js ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/helpers/XAHelpers.js b/security-admin/src/main/webapp/templates/helpers/XAHelpers.js index 9363c6b..f8479e4 100644 --- a/security-admin/src/main/webapp/templates/helpers/XAHelpers.js +++ b/security-admin/src/main/webapp/templates/helpers/XAHelpers.js @@ -139,7 +139,7 @@ return moment(context).format(f); }else{ return context; // moment plugin not available. return data as is. - }; + } }); /* @@ -154,7 +154,6 @@ Handlebars.registerHelper('tt', function(str) { return localization.tt(str); - return str; }); Handlebars.registerHelper('getCopyrightDate', function() { @@ -187,7 +186,7 @@ Handlebars.registerHelper('customPermString', function(permsString,kclass) { if(permsString == "--") return permsString; - permArr = permsString.split(','); + var permArr = permsString.split(','); var cl = _.isObject(kclass) ? 'label label-info' : kclass; var tempArr = []; _.each(permArr, function(val){ @@ -424,7 +423,7 @@ html = '<span class="add-text">'+val+'</span>'; } else { if($.inArray(val, arr) < 0) - return html = '<span class="delete-text">'+val+'</span>'; + return '<span class="delete-text">'+val+'</span>'; } return html; }); @@ -442,9 +441,9 @@ isRemoved = false; }); if(isRemoved) - return html = '<span class="delete-text">'+perm[type]+'</span>'; + return '<span class="delete-text">'+perm[type]+'</span>'; } else { - return html = '<span class="delete-text">'+perm[type]+'</span>'; + return '<span class="delete-text">'+perm[type]+'</span>'; } } } else { @@ -456,9 +455,9 @@ isNewAdd = false; }); if(isNewAdd) - return html = '<span class="add-text">'+perm[type]+'</span>'; + return '<span class="add-text">'+perm[type]+'</span>'; } else { - return html = '<span class="delete-text">'+perm[type]+'</span>'; + return '<span class="delete-text">'+perm[type]+'</span>'; } } } @@ -479,9 +478,9 @@ isRemoved = false; }); if(isRemoved) - return html = '<span class="delete-text">'+perm[type]+'</span>'; + return '<span class="delete-text">'+perm[type]+'</span>'; } else { - return html = '<span class="delete-text">'+perm[type]+'</span>'; + return '<span class="delete-text">'+perm[type]+'</span>'; } } } else { @@ -493,9 +492,9 @@ isNewAdd = false; }); if(isNewAdd) - return html = '<span class="add-text">'+perm[type]+'</span>'; + return '<span class="add-text">'+perm[type]+'</span>'; } else { - return html = '<span class="add-text">'+perm[type]+'</span>'; + return '<span class="add-text">'+perm[type]+'</span>'; } } } http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/kms/KmsKeyCreate_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/kms/KmsKeyCreate_tmpl.html b/security-admin/src/main/webapp/templates/kms/KmsKeyCreate_tmpl.html index 2aaac43..b4b7f03 100644 --- a/security-admin/src/main/webapp/templates/kms/KmsKeyCreate_tmpl.html +++ b/security-admin/src/main/webapp/templates/kms/KmsKeyCreate_tmpl.html @@ -17,7 +17,7 @@ <h4 class="wrap-header bold"> Key Detail </h4> <div class="wrap non-collapsible "> <div data-id="r_form"></div> - <div class="form-actions form-policy" class="row-fluid"> + <div class="form-actions form-policy row-fluid"> <button type="button" data-id="save" class="btn btn-primary"> Save </button> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/policies/RangerPolicyCreate_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/policies/RangerPolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/policies/RangerPolicyCreate_tmpl.html index e5e4ce7..eb844ff 100644 --- a/security-admin/src/main/webapp/templates/policies/RangerPolicyCreate_tmpl.html +++ b/security-admin/src/main/webapp/templates/policies/RangerPolicyCreate_tmpl.html @@ -29,7 +29,7 @@ <i class="icon-info-sign searchInfoUserAccess padding-right-10"></i>{{{infoMsg}}} </div> <div data-id="r_form"></div> - <div class="form-actions form-policy" class="row-fluid"> + <div class="form-actions form-policy row-fluid"> {{#if editPolicy}} <button type="submit" data-id="save" class="btn btn-spinner btn-primary"> <span>Save</span> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/service/ServiceCreate_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/service/ServiceCreate_tmpl.html b/security-admin/src/main/webapp/templates/service/ServiceCreate_tmpl.html index d79028e..7464f83 100644 --- a/security-admin/src/main/webapp/templates/service/ServiceCreate_tmpl.html +++ b/security-admin/src/main/webapp/templates/service/ServiceCreate_tmpl.html @@ -21,7 +21,7 @@ {{/if}} <div class="wrap non-collapsible "> <div data-id="r_form"></div> - <div class="form-actions form-asset" class="row-fluid"> + <div class="form-actions form-asset row-fluid"> <button type="submit" data-id="save" class="btn btn-primary"> Save </button> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/users/GroupCreate_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/users/GroupCreate_tmpl.html b/security-admin/src/main/webapp/templates/users/GroupCreate_tmpl.html index c387e68..ffc29bf 100644 --- a/security-admin/src/main/webapp/templates/users/GroupCreate_tmpl.html +++ b/security-admin/src/main/webapp/templates/users/GroupCreate_tmpl.html @@ -17,7 +17,7 @@ <h4 class="wrap-header bold"> Group Detail </h4> <div class="wrap non-collapsible "> <div data-id="r_form"></div> - <div class="form-actions form-policy" class="row-fluid"> + <div class="form-actions form-policy row-fluid"> <button type="button" data-id="save" class="btn btn-primary"> Save </button> http://git-wip-us.apache.org/repos/asf/ranger/blob/e23977ce/security-admin/src/main/webapp/templates/users/UserCreate_tmpl.html ---------------------------------------------------------------------- diff --git a/security-admin/src/main/webapp/templates/users/UserCreate_tmpl.html b/security-admin/src/main/webapp/templates/users/UserCreate_tmpl.html index 204e832..13ce8cc 100644 --- a/security-admin/src/main/webapp/templates/users/UserCreate_tmpl.html +++ b/security-admin/src/main/webapp/templates/users/UserCreate_tmpl.html @@ -26,7 +26,7 @@ </li> </ul> <div data-id="r_form"></div> - <div class="form-actions form-policy" class="row-fluid"> + <div class="form-actions form-policy row-fluid"> <button type="button" data-id="save" class="btn btn-primary"> Save </button>
