@@ -34,7 +34,7 @@ <h4 class="ui header">
34
34
< div class ="ui attached message ">
35
35
< div class ="header "> {{ app.name }}</ div >
36
36
</ div >
37
- {% if app.active or (not app.approved and not app.rejection) %}
37
+ {% if app.isActive or app.isPending %}
38
38
< form class ="ui form attached fluid segment " method ="post " action ="/app/{{ app._id }} ">
39
39
< div class ="two fields ">
40
40
< div class ="field ">
@@ -54,68 +54,82 @@ <h4 class="ui header">
54
54
< div class ="twelve wide field ">
55
55
< label > Prod Nøkkel</ label >
56
56
< div class ="ui action input ">
57
- < input type ="text " name ="key_prod " value ="{{ app.key.prod }} "
57
+ < input
58
+ type ="text "
59
+ name ="key_prod "
60
+ value ="{{ app.key.prod }} "
58
61
readonly ="">
59
- < button class ="ui teal right labeled icon button copy "
62
+ < button
63
+ class ="ui teal right labeled icon button copy "
60
64
data-clipboard-text ="{{ app.key.prod }} ">
61
- < i class ="copy icon "> </ i > Kopier
65
+ < i class ="copy icon "> </ i > Kopier
62
66
</ button >
63
67
</ div >
64
68
</ div >
65
69
< div class ="four wide field ">
66
70
< label > Rate Limit</ label >
67
- < input type ="text " name ="limit_prod "
71
+ < input
72
+ type ="text "
73
+ name ="limit_prod "
74
+ placeholder ="{{ app.limit.prod }} "
68
75
value ="{{ app.limit.prodRequest | d(app.limit.prod) }} ">
69
76
</ div >
70
77
</ div >
71
78
< div class ="fields ">
72
79
< div class ="twelve wide field ">
73
80
< label > Dev Nøkkel</ label >
74
81
< div class ="ui action input ">
75
- < input type ="text " name ="key_dev " value ="{{ app.key.dev }} "
82
+ < input
83
+ type ="text "
84
+ name ="key_dev "
85
+ value ="{{ app.key.dev }} "
76
86
readonly ="">
77
- < button class ="ui teal right labeled icon button copy "
87
+ < button
88
+ class ="ui teal right labeled icon button copy "
78
89
data-clipboard-text ="{{ app.key.dev }} ">
79
- < i class ="copy icon "> </ i > Kopier
90
+ < i class ="copy icon "> </ i > Kopier
80
91
</ button >
81
92
</ div >
82
93
</ div >
83
94
< div class ="four wide field ">
84
95
< label > Rate Limit</ label >
85
- < input type ="text " name ="limit_dev "
96
+ < input
97
+ type ="text "
98
+ name ="limit_dev "
99
+ placeholder ="{{ app.limit.dev }} "
86
100
value ="{{ app.limit.devRequest | d(app.limit.dev) }} ">
87
101
</ div >
88
102
</ div >
89
- < button class ="ui blue submit button " name =" save " value =" true ">
103
+ < button class ="ui blue submit button " type =" submit ">
90
104
Lagre
91
105
</ button >
92
- {% if app.active %}
93
- < button class ="ui red submit button " name =" deactivate " value =" true ">
106
+ {% if app.isActive %}
107
+ < button class ="ui red submit button " type =" submit ">
94
108
Deaktiver
95
109
</ button >
96
110
{% endif %}
97
111
</ form >
98
112
{% endif %}
99
- {% if app.rejection %}
113
+ {% if app.isRejected %}
100
114
< div class ="ui bottom attached error message ">
101
115
< i class ="icon warning "> </ i >
102
116
Denne applikasjonen ble avvist. {{ app.rejection }}
103
117
</ div >
104
- {% elif not app.approved %}
118
+ {% elif app.isPending %}
105
119
< div class ="ui bottom attached info message ">
106
120
< i class ="icon wait "> </ i >
107
121
Denne applikasjonen venter på godkjenning.
108
122
</ div >
109
- {% elif not app.active %}
110
- < div class ="ui bottom attached warning message ">
111
- < i class ="icon warning "> </ i >
112
- Denne applikasjonen er deaktivert.
113
- </ div >
114
123
{% elif app.limit.devRequest or app.limit.prodRequest %}
115
124
< div class ="ui bottom attached info message ">
116
125
< i class ="icon wait "> </ i >
117
126
Endring av API rate-limit venter på godkjenning.
118
127
</ div >
128
+ {% elif not app.isActive %}
129
+ < div class ="ui bottom attached warning message ">
130
+ < i class ="icon warning "> </ i >
131
+ Denne applikasjonen er deaktivert.
132
+ </ div >
119
133
{% endif %}
120
134
</ div >
121
135
{% endfor %}
0 commit comments