aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
authorLoic Bistuer2014-12-03 17:30:07 +0700
committerLoic Bistuer2014-12-08 09:06:52 +0700
commitb90f4228b274abc3010b159d6abe7b2381067253 (patch)
tree43832a070e61da0e9e236c6a667436100a947290 /rest_framework
parentff02a0af9c8d2dadebfadcc65e17adae3b0bd111 (diff)
downloaddjango-rest-framework-b90f4228b274abc3010b159d6abe7b2381067253.tar.bz2
Ported a couple of templates to Bootstrap 3.x.
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/templates/rest_framework/login_base.html23
-rw-r--r--rest_framework/templates/rest_framework/raw_data_form.html8
2 files changed, 15 insertions, 16 deletions
diff --git a/rest_framework/templates/rest_framework/login_base.html b/rest_framework/templates/rest_framework/login_base.html
index e050cbdc..8e6240a6 100644
--- a/rest_framework/templates/rest_framework/login_base.html
+++ b/rest_framework/templates/rest_framework/login_base.html
@@ -21,11 +21,11 @@
{% csrf_token %}
<div id="div_id_username"
class="clearfix control-group {% if form.username.errors %}error{% endif %}">
- <div class="controls">
- <label class="span4">Username:</label>
- <input style="height: 25px" type="text" name="username" maxlength="100"
+ <div class="form-group">
+ <label for="id_username">Username:</label>
+ <input type="text" name="username" maxlength="100"
autocapitalize="off"
- autocorrect="off" class="span12 textinput textInput"
+ autocorrect="off" class="form-control textinput textInput"
id="id_username" required
{% if form.username.value %}value="{{ form.username.value }}"{% endif %}>
{% if form.username.errors %}
@@ -36,12 +36,11 @@
</div>
</div>
<div id="div_id_password"
- class="clearfix control-group {% if form.password.errors %}error{% endif %}"
- style="margin-top: 10px">
- <div class="controls">
- <label class="span4">Password:</label>
- <input style="height: 25px" type="password" name="password" maxlength="100"
- autocapitalize="off" autocorrect="off" class="span12 textinput textInput"
+ class="clearfix control-group {% if form.password.errors %}error{% endif %}">
+ <div class="form-group">
+ <label for="id_password">Password:</label>
+ <input type="password" name="password" maxlength="100"
+ autocapitalize="off" autocorrect="off" class="form-control textinput textInput"
id="id_password" required>
{% if form.password.errors %}
<p class="text-error">
@@ -56,8 +55,8 @@
<div class="well well-small text-error" style="border: none">{{ error }}</div>
{% endfor %}
{% endif %}
- <div class="form-actions-no-box" style="margin-top: 20px">
- <input type="submit" name="submit" value="Log in" class="btn btn-primary" id="submit-id-submit">
+ <div class="form-actions-no-box">
+ <input type="submit" name="submit" value="Log in" class="btn btn-primary form-control" id="submit-id-submit">
</div>
</form>
</div>
diff --git a/rest_framework/templates/rest_framework/raw_data_form.html b/rest_framework/templates/rest_framework/raw_data_form.html
index 075279f7..b4c9f1a1 100644
--- a/rest_framework/templates/rest_framework/raw_data_form.html
+++ b/rest_framework/templates/rest_framework/raw_data_form.html
@@ -2,10 +2,10 @@
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form %}
- <div class="control-group">
- {{ field.label_tag|add_class:"control-label" }}
- <div class="controls">
- {{ field }}
+ <div class="form-group">
+ {{ field.label_tag|add_class:"col-sm-2 control-label" }}
+ <div class="col-sm-10">
+ {{ field|add_class:"form-control" }}
<span class="help-block">{{ field.help_text }}</span>
</div>
</div>