forked from DGNum/gestioCOF
Fix special chars in trigramme
This commit is contained in:
parent
ff968b68b2
commit
4d3531c2cb
2 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ var Account = Backbone.Model.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
url: function () {
|
url: function () {
|
||||||
return django_urls["kfet.account.read.json"](this.get("trigramme"))
|
return django_urls["kfet.account.read.json"](encodeURIComponent(this.get("trigramme")))
|
||||||
},
|
},
|
||||||
|
|
||||||
reset: function () {
|
reset: function () {
|
||||||
|
@ -81,7 +81,7 @@ var AccountView = Backbone.View.extend({
|
||||||
get_buttons: function () {
|
get_buttons: function () {
|
||||||
var buttons = '';
|
var buttons = '';
|
||||||
if (this.model.id != 0) {
|
if (this.model.id != 0) {
|
||||||
var url = django_urls["kfet.account.read"](this.model.get("trigramme"))
|
var url = django_urls["kfet.account.read"](encodeURIComponent(this.model.get("trigramme")))
|
||||||
buttons += `<a href="${url}" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>`;
|
buttons += `<a href="${url}" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>`;
|
||||||
} else {
|
} else {
|
||||||
var trigramme = this.$(this.input).val().toUpperCase();
|
var trigramme = this.$(this.input).val().toUpperCase();
|
||||||
|
|
|
@ -56,7 +56,7 @@ $(document).ready(function () {
|
||||||
function getAccountData(trigramme, callback = function() {}) {
|
function getAccountData(trigramme, callback = function() {}) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
url : django_urls["kfet.account.read.json"]({trigramme: trigramme}),
|
url : django_urls["kfet.account.read.json"]({trigramme: encodeURIComponent(trigramme)}),
|
||||||
method : "GET",
|
method : "GET",
|
||||||
success : callback,
|
success : callback,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue