Changeset 4365
- Timestamp:
- 01/20/07 00:32:08 (2 years ago)
- Files:
-
- django/branches/newforms-admin/django/contrib/admin/options.py (modified) (2 diffs)
- django/branches/newforms-admin/django/contrib/admin/templates/admin/change_form.html (modified) (2 diffs)
- django/branches/newforms-admin/django/contrib/admin/templatetags/admin_modify.py (modified) (1 diff)
- django/branches/newforms-admin/django/contrib/admin/views/main.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/newforms-admin/django/contrib/admin/options.py
r4364 r4365 250 250 c = template.RequestContext(request, { 251 251 'title': _('Add %s') % opts.verbose_name, 252 ' form': form,252 'oldform': form, 253 253 'is_popup': request.REQUEST.has_key('_popup'), 254 254 'show_delete': False, … … 349 349 c = template.RequestContext(request, { 350 350 'title': _('Change %s') % opts.verbose_name, 351 ' form': form,351 'oldform': form, 352 352 'object_id': object_id, 353 353 'original': manipulator.original_object, django/branches/newforms-admin/django/contrib/admin/templates/admin/change_form.html
r4351 r4365 35 35 {% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %} 36 36 {% if save_on_top %}{% submit_row %}{% endif %} 37 {% if form.error_dict %}37 {% if oldform.error_dict %} 38 38 <p class="errornote"> 39 {% blocktrans count form.error_dict.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}39 {% blocktrans count oldform.error_dict.items|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} 40 40 </p> 41 41 {% endif %} … … 56 56 {% if ordered_objects %} 57 57 <fieldset class="module"><h2>{% trans "Ordering" %}</h2> 58 <div class="form-row{% if form.order_.errors %} error{% endif %} ">59 {% if form.order_.errors %}{{form.order_.html_error_list }}{% endif %}60 <p><label for="id_order_">{% trans "Order:" %}</label> {{ form.order_ }}</p>58 <div class="form-row{% if oldform.order_.errors %} error{% endif %} "> 59 {% if oldform.order_.errors %}{{ oldform.order_.html_error_list }}{% endif %} 60 <p><label for="id_order_">{% trans "Order:" %}</label> {{ oldform.order_ }}</p> 61 61 </div></fieldset> 62 62 {% endif %} django/branches/newforms-admin/django/contrib/admin/templatetags/admin_modify.py
r4343 r4365 166 166 bound_related_object_class = relation.field.rel.edit_inline 167 167 original = context.get('original', None) 168 bound_related_object = relation.bind(context[' form'], original, bound_related_object_class)168 bound_related_object = relation.bind(context['oldform'], original, bound_related_object_class) 169 169 context['bound_related_object'] = bound_related_object 170 170 t = loader.get_template(bound_related_object.template_name()) django/branches/newforms-admin/django/contrib/admin/views/main.py
r4354 r4365 173 173 field_sets = model_admin.get_field_sets() 174 174 original = getattr(manipulator, 'original_object', None) 175 bound_field_sets = [field_set.bind(context[' form'], original, AdminBoundFieldSet) for field_set in field_sets]175 bound_field_sets = [field_set.bind(context['oldform'], original, AdminBoundFieldSet) for field_set in field_sets] 176 176 first_form_field_id = bound_field_sets[0].bound_field_lines[0].bound_fields[0].form_fields[0].get_id(); 177 177 ordered_objects = opts.get_ordered_objects()
