Merge branch 'Aufinal/encode_trigramme' into 'k-fet'
K-Psul - Fix: Lien -> création/modification de comptes Le javascript de K-Psul encode maintenant les caractères spéciaux (dont `, / ? : @ & = + $ # "`) afin de pouvoir avoir accès aux comptes en question sans bugs. See merge request !131
This commit is contained in:
commit
e63e56371d
1 changed files with 3 additions and 1 deletions
|
@ -245,12 +245,14 @@ $(document).ready(function() {
|
|||
if (account_data['id'] != 0) {
|
||||
var url_base = '{% url 'kfet.account.read' 'LIQ' %}';
|
||||
url_base = url_base.substr(0, url_base.length - 3);
|
||||
buttons += '<a href="'+ url_base + account_data['trigramme']+'" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>';
|
||||
trigramme = encodeURIComponent(account_data['trigramme']) ;
|
||||
buttons += '<a href="'+ url_base + trigramme +'" class="btn btn-primary" target="_blank" title="Modifier"><span class="glyphicon glyphicon-cog"></span></a>';
|
||||
}
|
||||
if (account_data['id'] == 0) {
|
||||
var trigramme = triInput.val().toUpperCase();
|
||||
var url_base = '{% url 'kfet.account.create' %}'
|
||||
if (isValidTrigramme(trigramme)) {
|
||||
trigramme = encodeURIComponent(trigramme);
|
||||
buttons += '<a href="'+url_base+'?trigramme='+trigramme+'" class="btn btn-primary" target="_blank" title="Créer"><span class="glyphicon glyphicon-plus"></span></a>';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue