File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed
rest_framework/templates/rest_framework Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 1
1
{% load i18n %}
2
+ {% trans "None" as none_choice %}
2
3
3
4
< div class ="form-group ">
4
5
{% if field.label %}
9
10
{% if field.allow_null or field.allow_blank %}
10
11
< label class ="radio-inline ">
11
12
< input type ="radio " name ="{{ field.name }} " value ="" {% if not field.value %}checked{% endif %} />
12
- {% trans "None" % }
13
+ {{ none_choice } }
13
14
</ label >
14
15
{% endif %}
15
16
{% for key, text in field.choices.items %}
23
24
< div class ="radio ">
24
25
< label >
25
26
< input type ="radio " name ="{{ field.name }} " value ="" {% if not field.value %}checked{% endif %} />
26
- {% trans "None" % }
27
+ {{ none_choice } }
27
28
</ label >
28
29
</ div >
29
30
{% endif %}
Original file line number Diff line number Diff line change
1
+ {% load i18n %}
2
+ {% trans "None" as none_choice %}
3
+
1
4
< div class ="form-group {% if field.errors %}has-error{% endif %} ">
2
5
{% if field.label %}
3
6
< label class ="sr-only "> {{ field.label }}</ label >
4
7
{% endif %}
8
+ {% if field.allow_null or field.allow_blank %}
9
+ < div class ="radio ">
10
+ < label >
11
+ < input type ="radio " name ="{{ field.name }} " value ="" {% if not field.value %}checked{% endif %} >
12
+ {{ none_choice }}
13
+ </ label >
14
+ </ div >
15
+ {% endif %}
5
16
{% for key, text in field.choices.items %}
6
17
< div class ="radio ">
7
18
< label >
Original file line number Diff line number Diff line change
1
+ {% load i18n %}
2
+ {% trans "None" as none_choice %}
3
+
1
4
< div class ="form-group {% if field.errors %}has-error{% endif %} ">
2
5
{% if field.label %}
3
6
< label {% if style.hide_label %}class ="sr-only "{% endif %} > {{ field.label }}</ label >
4
7
{% endif %}
5
8
{% if style.inline %}
6
9
< div >
10
+ {% if field.allow_null or field.allow_blank %}
11
+ < label class ="radio-inline ">
12
+ < input type ="radio " name ="{{ field.name }} " value ="" {% if not field.value %}checked{% endif %} />
13
+ {{ none_choice }}
14
+ </ label >
15
+ {% endif %}
7
16
{% for key, text in field.choices.items %}
8
17
< label class ="radio-inline ">
9
18
< input type ="radio " name ="{{ field.name }} " value ="{{ key }} " {% if key == field.value %}checked{% endif %} >
12
21
{% endfor %}
13
22
</ div >
14
23
{% else %}
24
+ {% if field.allow_null or field.allow_blank %}
25
+ < div class ="radio ">
26
+ < label >
27
+ < input type ="radio " name ="{{ field.name }} " value ="" {% if not field.value %}checked{% endif %} />
28
+ {{ none_choice }}
29
+ </ label >
30
+ </ div >
31
+ {% endif %}
15
32
{% for key, text in field.choices.items %}
16
33
< div class ="radio ">
17
34
< label >
You can’t perform that action at this time.
0 commit comments