3
3
{% load i18n %}
4
4
{% block content %}
5
5
< div class ="block-center ">
6
- < form class ="form-horizontal " method ="post " action ="{% block app-form-action-url %}{% url 'oauth2_provider:update' application.pk %}{% endblock app-form-action-url %} ">
7
- < h3 class ="block-center-heading ">
8
- {% block app-form-title %}
9
- {% trans "Edit application" %} {{ application.name }}
10
- {% endblock app-form-title %}
11
- </ h3 >
6
+ < h3 class ="block-center-heading ">
7
+ {% block app-form-title %}
8
+ {% trans "Edit application" %} {{ application.name }}
9
+ {% endblock app-form-title %}
10
+ </ h3 >
11
+
12
+ {% if application.client_id %}
13
+ < div class ="control-group ">
14
+ < label class ="control-label "> {% translate "Client ID" %}</ label >
15
+ < div class ="controls ">
16
+ {{ application.client_id }}
17
+ </ div >
18
+ </ div >
19
+ {% endif %}
20
+
21
+ < form id ="application-form " class ="form-horizontal " method ="post " action ="{% block app-form-action-url %}{% url 'oauth2_provider:update' application.id %}{% endblock app-form-action-url %} ">
12
22
{% csrf_token %}
13
23
14
24
{% for field in form %}
@@ -22,21 +32,21 @@ <h3 class="block-center-heading">
22
32
</ div >
23
33
</ div >
24
34
{% endfor %}
35
+ </ form >
25
36
26
- < div class ="control-group {% if form.non_field_errors %}error{% endif %} ">
27
- {% for error in form.non_field_errors %}
28
- < span class ="help-inline "> {{ error }}</ span >
29
- {% endfor %}
30
- </ div >
37
+ < div class ="control-group {% if form.non_field_errors %}error{% endif %} ">
38
+ {% for error in form.non_field_errors %}
39
+ < span class ="help-inline "> {{ error }}</ span >
40
+ {% endfor %}
41
+ </ div >
31
42
32
- < div class ="control-group ">
33
- < div class ="controls ">
34
- < a class ="btn " href ="{% block app-form-back-url %}{% url "oauth2_provider:detail " application.pk %}{% endblock app-form-back-url %}">
35
- {% trans "Go Back" %}
36
- </ a >
37
- < button type ="submit " class ="btn btn-primary "> {% trans "Save" %}</ button >
38
- </ div >
43
+ < div class ="control-group ">
44
+ < div class ="controls ">
45
+ < a class ="btn " href ="{% block app-form-back-url %}{% url "oauth2_provider:detail " application.id %}{% endblock app-form-back-url %}">
46
+ {% trans "Go Back" %}
47
+ </ a >
48
+ < button form ="application-form " type ="submit " class ="btn btn-primary "> {% trans "Save" %}</ button >
39
49
</ div >
40
- </ form >
50
+ </ div >
41
51
</ div >
42
52
{% endblock %}
0 commit comments