diff options
| author | Tom Christie | 2014-10-15 15:11:01 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-10-15 15:11:01 +0100 |
| commit | e8ea365c15b13185efc2ba03e57a3302f783d538 (patch) | |
| tree | 89c6b27197fc6be2b822193c302ee58a66170253 | |
| parent | 22b27cbdc46a24c454c2fb7803c489aa65d9f9ba (diff) | |
| download | django-rest-framework-e8ea365c15b13185efc2ba03e57a3302f783d538.tar.bz2 | |
Moar form styling
| -rw-r--r-- | rest_framework/templates/rest_framework/base.html | 4 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/checkbox.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/checkbox.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/checkbox_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/fieldset.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/fieldset.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/form.html | 4 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/input.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/input.html) | 2 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/list_fieldset.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/list_fieldset.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/radio.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/radio.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/select.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/select.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/select_multiple.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/select_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/horizontal/textarea.html (renamed from rest_framework/templates/rest_framework/horizontal/fields/textarea.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/checkbox.html (renamed from rest_framework/templates/rest_framework/inline/fields/checkbox.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/checkbox_multiple.html (renamed from rest_framework/templates/rest_framework/inline/fields/checkbox_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/fieldset.html (renamed from rest_framework/templates/rest_framework/inline/fields/fieldset.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/form.html | 4 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/input.html (renamed from rest_framework/templates/rest_framework/inline/fields/input.html) | 2 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/radio.html (renamed from rest_framework/templates/rest_framework/inline/fields/radio.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/select.html (renamed from rest_framework/templates/rest_framework/inline/fields/select.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/select_multiple.html (renamed from rest_framework/templates/rest_framework/inline/fields/select_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/inline/textarea.html (renamed from rest_framework/templates/rest_framework/inline/fields/textarea.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/checkbox.html (renamed from rest_framework/templates/rest_framework/vertical/fields/checkbox.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/checkbox_multiple.html (renamed from rest_framework/templates/rest_framework/vertical/fields/checkbox_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/fieldset.html (renamed from rest_framework/templates/rest_framework/vertical/fields/fieldset.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/form.html | 4 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/input.html (renamed from rest_framework/templates/rest_framework/vertical/fields/input.html) | 2 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/list_fieldset.html (renamed from rest_framework/templates/rest_framework/vertical/fields/list_fieldset.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/radio.html (renamed from rest_framework/templates/rest_framework/vertical/fields/radio.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/select.html (renamed from rest_framework/templates/rest_framework/vertical/fields/select.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/select_multiple.html (renamed from rest_framework/templates/rest_framework/vertical/fields/select_multiple.html) | 0 | ||||
| -rw-r--r-- | rest_framework/templates/rest_framework/vertical/textarea.html (renamed from rest_framework/templates/rest_framework/vertical/fields/textarea.html) | 0 |
30 files changed, 11 insertions, 11 deletions
diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 4b6c7fcf..dcb0da2c 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -153,7 +153,7 @@ <div class="tab-pane" id="object-form"> {% with form=post_form %} <form action="{{ request.get_full_path }}" - method="POST" enctype="multipart/form-data" class="form-horizontal"> + method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate> <fieldset> {{ post_form }} <div class="form-actions"> @@ -198,7 +198,7 @@ {% if put_form %} <div class="tab-pane" id="object-form"> <form action="{{ request.get_full_path }}" - method="POST" enctype="multipart/form-data" class="form-horizontal"> + method="POST" enctype="multipart/form-data" class="form-horizontal" novalidate> <fieldset> {{ put_form }} <div class="form-actions"> diff --git a/rest_framework/templates/rest_framework/horizontal/fields/checkbox.html b/rest_framework/templates/rest_framework/horizontal/checkbox.html index 07a7308f..07a7308f 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/checkbox.html +++ b/rest_framework/templates/rest_framework/horizontal/checkbox.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/checkbox_multiple.html b/rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html index ec7d5935..ec7d5935 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/checkbox_multiple.html +++ b/rest_framework/templates/rest_framework/horizontal/checkbox_multiple.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/fieldset.html b/rest_framework/templates/rest_framework/horizontal/fieldset.html index f6d5dd9d..f6d5dd9d 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/fieldset.html +++ b/rest_framework/templates/rest_framework/horizontal/fieldset.html diff --git a/rest_framework/templates/rest_framework/horizontal/form.html b/rest_framework/templates/rest_framework/horizontal/form.html index 7560d8a2..fd15b626 100644 --- a/rest_framework/templates/rest_framework/horizontal/form.html +++ b/rest_framework/templates/rest_framework/horizontal/form.html @@ -1,9 +1,9 @@ {% load rest_framework %} -<form class="form-horizontal" role="form" action="." method="POST"> +<form class="form-horizontal" role="form" action="." method="POST" novalidate> {% csrf_token %} {% for field in form %} {% if not field.read_only %} - {% render_field field template_pack=template_pack renderer=renderer %} + {% render_field field style=style %} {% endif %} {% endfor %} <!-- form.non_field_errors --> diff --git a/rest_framework/templates/rest_framework/horizontal/fields/input.html b/rest_framework/templates/rest_framework/horizontal/input.html index 43ab4151..df4aa40f 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/input.html +++ b/rest_framework/templates/rest_framework/horizontal/input.html @@ -3,7 +3,7 @@ <label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">{{ field.label }}</label> {% endif %} <div class="col-sm-10"> - <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" novalidate {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> + <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> {% if field.errors %} {% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %} {% endif %} diff --git a/rest_framework/templates/rest_framework/horizontal/fields/list_fieldset.html b/rest_framework/templates/rest_framework/horizontal/list_fieldset.html index a30514c6..a30514c6 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/list_fieldset.html +++ b/rest_framework/templates/rest_framework/horizontal/list_fieldset.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/radio.html b/rest_framework/templates/rest_framework/horizontal/radio.html index 52238bb1..52238bb1 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/radio.html +++ b/rest_framework/templates/rest_framework/horizontal/radio.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/select.html b/rest_framework/templates/rest_framework/horizontal/select.html index 1d00f424..1d00f424 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/select.html +++ b/rest_framework/templates/rest_framework/horizontal/select.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/select_multiple.html b/rest_framework/templates/rest_framework/horizontal/select_multiple.html index 01c251fb..01c251fb 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/select_multiple.html +++ b/rest_framework/templates/rest_framework/horizontal/select_multiple.html diff --git a/rest_framework/templates/rest_framework/horizontal/fields/textarea.html b/rest_framework/templates/rest_framework/horizontal/textarea.html index ec107549..ec107549 100644 --- a/rest_framework/templates/rest_framework/horizontal/fields/textarea.html +++ b/rest_framework/templates/rest_framework/horizontal/textarea.html diff --git a/rest_framework/templates/rest_framework/inline/fields/checkbox.html b/rest_framework/templates/rest_framework/inline/checkbox.html index 71737f15..71737f15 100644 --- a/rest_framework/templates/rest_framework/inline/fields/checkbox.html +++ b/rest_framework/templates/rest_framework/inline/checkbox.html diff --git a/rest_framework/templates/rest_framework/inline/fields/checkbox_multiple.html b/rest_framework/templates/rest_framework/inline/checkbox_multiple.html index 6caf6440..6caf6440 100644 --- a/rest_framework/templates/rest_framework/inline/fields/checkbox_multiple.html +++ b/rest_framework/templates/rest_framework/inline/checkbox_multiple.html diff --git a/rest_framework/templates/rest_framework/inline/fields/fieldset.html b/rest_framework/templates/rest_framework/inline/fieldset.html index 5ee182a5..5ee182a5 100644 --- a/rest_framework/templates/rest_framework/inline/fields/fieldset.html +++ b/rest_framework/templates/rest_framework/inline/fieldset.html diff --git a/rest_framework/templates/rest_framework/inline/form.html b/rest_framework/templates/rest_framework/inline/form.html index b13d1661..6a0ea81d 100644 --- a/rest_framework/templates/rest_framework/inline/form.html +++ b/rest_framework/templates/rest_framework/inline/form.html @@ -1,9 +1,9 @@ {% load rest_framework %} -<form class="form-inline" role="form" action="." method="POST"> +<form class="form-inline" role="form" action="." method="POST" novalidate> {% csrf_token %} {% for field in form %} {% if not field.read_only %} - {% render_field field template_pack=template_pack renderer=renderer %} + {% render_field field style=style %} {% endif %} {% endfor %} <!-- form.non_field_errors --> diff --git a/rest_framework/templates/rest_framework/inline/fields/input.html b/rest_framework/templates/rest_framework/inline/input.html index 0d3eb884..f8ec4faf 100644 --- a/rest_framework/templates/rest_framework/inline/fields/input.html +++ b/rest_framework/templates/rest_framework/inline/input.html @@ -2,5 +2,5 @@ {% if field.label %} <label class="sr-only">{{ field.label }}</label> {% endif %} - <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" novalidate {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> + <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> </div> diff --git a/rest_framework/templates/rest_framework/inline/fields/radio.html b/rest_framework/templates/rest_framework/inline/radio.html index 1915f4f8..1915f4f8 100644 --- a/rest_framework/templates/rest_framework/inline/fields/radio.html +++ b/rest_framework/templates/rest_framework/inline/radio.html diff --git a/rest_framework/templates/rest_framework/inline/fields/select.html b/rest_framework/templates/rest_framework/inline/select.html index e9fcebb4..e9fcebb4 100644 --- a/rest_framework/templates/rest_framework/inline/fields/select.html +++ b/rest_framework/templates/rest_framework/inline/select.html diff --git a/rest_framework/templates/rest_framework/inline/fields/select_multiple.html b/rest_framework/templates/rest_framework/inline/select_multiple.html index feddf7ab..feddf7ab 100644 --- a/rest_framework/templates/rest_framework/inline/fields/select_multiple.html +++ b/rest_framework/templates/rest_framework/inline/select_multiple.html diff --git a/rest_framework/templates/rest_framework/inline/fields/textarea.html b/rest_framework/templates/rest_framework/inline/textarea.html index 0766a01c..0766a01c 100644 --- a/rest_framework/templates/rest_framework/inline/fields/textarea.html +++ b/rest_framework/templates/rest_framework/inline/textarea.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/checkbox.html b/rest_framework/templates/rest_framework/vertical/checkbox.html index e21a8e90..e21a8e90 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/checkbox.html +++ b/rest_framework/templates/rest_framework/vertical/checkbox.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/checkbox_multiple.html b/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html index 134cca66..134cca66 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/checkbox_multiple.html +++ b/rest_framework/templates/rest_framework/vertical/checkbox_multiple.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/fieldset.html b/rest_framework/templates/rest_framework/vertical/fieldset.html index 824e6098..824e6098 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/fieldset.html +++ b/rest_framework/templates/rest_framework/vertical/fieldset.html diff --git a/rest_framework/templates/rest_framework/vertical/form.html b/rest_framework/templates/rest_framework/vertical/form.html index fe908af0..e68835c0 100644 --- a/rest_framework/templates/rest_framework/vertical/form.html +++ b/rest_framework/templates/rest_framework/vertical/form.html @@ -1,9 +1,9 @@ {% load rest_framework %} -<form role="form" action="." method="POST"> +<form role="form" action="." method="POST" novalidate> {% csrf_token %} {% for field in form %} {% if not field.read_only %} - {% render_field field template_pack=template_pack renderer=renderer %} + {% render_field field style=style %} {% endif %} {% endfor %} <!-- form.non_field_errors --> diff --git a/rest_framework/templates/rest_framework/vertical/fields/input.html b/rest_framework/templates/rest_framework/vertical/input.html index 4f4cb017..e1e21ca1 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/input.html +++ b/rest_framework/templates/rest_framework/vertical/input.html @@ -2,7 +2,7 @@ {% if field.label %} <label {% if style.hide_label %}class="sr-only"{% endif %}>{{ field.label }}</label> {% endif %} - <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" novalidate {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> + <input name="{{ field.name }}" class="form-control" type="{{ style.input_type }}" {% if style.placeholder %}placeholder="{{ style.placeholder }}"{% endif %} {% if field.value %}value="{{ field.value }}"{% endif %}> {% if field.errors %} {% for error in field.errors %}<span class="help-block">{{ error }}</span>{% endfor %} {% endif %} diff --git a/rest_framework/templates/rest_framework/vertical/fields/list_fieldset.html b/rest_framework/templates/rest_framework/vertical/list_fieldset.html index 74bbf448..74bbf448 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/list_fieldset.html +++ b/rest_framework/templates/rest_framework/vertical/list_fieldset.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/radio.html b/rest_framework/templates/rest_framework/vertical/radio.html index ed9f9ddb..ed9f9ddb 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/radio.html +++ b/rest_framework/templates/rest_framework/vertical/radio.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/select.html b/rest_framework/templates/rest_framework/vertical/select.html index 7c673ebb..7c673ebb 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/select.html +++ b/rest_framework/templates/rest_framework/vertical/select.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/select_multiple.html b/rest_framework/templates/rest_framework/vertical/select_multiple.html index 54839294..54839294 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/select_multiple.html +++ b/rest_framework/templates/rest_framework/vertical/select_multiple.html diff --git a/rest_framework/templates/rest_framework/vertical/fields/textarea.html b/rest_framework/templates/rest_framework/vertical/textarea.html index 840ea853..840ea853 100644 --- a/rest_framework/templates/rest_framework/vertical/fields/textarea.html +++ b/rest_framework/templates/rest_framework/vertical/textarea.html |
