removed extraneous save button
parent
8b8db24179
commit
a9f531bffe
|
@ -272,41 +272,6 @@ var PolicyListView = Backbone.View.extend({
|
||||||
app.navigate('user/policy', {trigger: true});
|
app.navigate('user/policy', {trigger: true});
|
||||||
},
|
},
|
||||||
|
|
||||||
savePolicy:function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
var _self = this;
|
|
||||||
|
|
||||||
console.log(this);
|
|
||||||
|
|
||||||
this.model.sync('update', this.model, {
|
|
||||||
success:function() {
|
|
||||||
// update our copy of the resource set object (if we have it)
|
|
||||||
if (_self.options.rs != null) {
|
|
||||||
_self.options.rs.set({claimsRequired: _self.model.toJSON()}, {trigger: false});
|
|
||||||
}
|
|
||||||
|
|
||||||
app.navigate('user/policy', {trigger: true});
|
|
||||||
},
|
|
||||||
error:function (error, response) {
|
|
||||||
console.log("An error occurred when saving a policy set");
|
|
||||||
|
|
||||||
//Pull out the response text.
|
|
||||||
var responseJson = JSON.parse(response.responseText);
|
|
||||||
|
|
||||||
//Display an alert with an error message
|
|
||||||
$('#modalAlert div.modal-header').html(responseJson.error);
|
|
||||||
$('#modalAlert div.modal-body').html(responseJson.error_description);
|
|
||||||
|
|
||||||
$("#modalAlert").modal({ // wire up the actual modal functionality and show the dialog
|
|
||||||
"backdrop" : "static",
|
|
||||||
"keyboard" : true,
|
|
||||||
"show" : true // ensure the modal is shown immediately
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
addPolicy:function(e) {
|
addPolicy:function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,6 @@
|
||||||
|
|
||||||
<script type="text/html" id="tmpl-policy-table">
|
<script type="text/html" id="tmpl-policy-table">
|
||||||
<div class="well well-small">
|
<div class="well well-small">
|
||||||
<button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> <span data-i18n="common.save">Save</span></button>
|
|
||||||
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
|
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -102,7 +101,6 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="well well-small">
|
<div class="well well-small">
|
||||||
<button class="btn btn-small btn-save btn-success"><i class="icon-ok-circle icon-white"></i> <span data-i18n="common.save">Save</span></button>
|
|
||||||
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
|
<button class="btn btn-small btn-cancel"><i class="icon-ban-circle"></i> <span data-i18n="common.cancel">Cancel</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue