diff --git a/kfet/templates/kfet/kpsul.html b/kfet/templates/kfet/kpsul.html
index 88f8f2f9..26c98e55 100644
--- a/kfet/templates/kfet/kpsul.html
+++ b/kfet/templates/kfet/kpsul.html
@@ -250,10 +250,13 @@ $(document).ready(function() {
}
if (account_data['id'] == 0) {
var trigramme = triInput.val().toUpperCase();
- var url_base = '{% url 'kfet.account.create' %}'
if (isValidTrigramme(trigramme)) {
+ var url_base = '{% url 'kfet.account.create' %}'
trigramme = encodeURIComponent(trigramme);
buttons += '';
+ } else {
+ var url_base = '{% url 'kfet.account' %}'
+ buttons += '';
}
}
account_container.find('.buttons').html(buttons);