Centralize the templates used for administration forms.

Review Request #7851 — Created Jan. 7, 2016 and submitted

Information

Djblets
release-0.10.x

Reviewers

We had a number of templates that were piggy-backing on the logic in the
siteconfig/settings.html template, but this wasn't a very good
organizational approach. These templates weren't related to siteconfig
settings, and there was a theoretical possibility that a
siteconfig-related change would break the other templates.

We now have a base template, djblets_forms/admin/change_form_page.html,
which can be relied upon as a base template for any forms that are to
appear in the administration UI. It contains the same logic as the
original form, with the additions of including the js18n library,
defining the jQuery object, and allowing the save message to be
configured.

Other templates have been updated to use this as the new base, and
backwards-compatibility templates have been added.

There's also a fix for the margin at the bottom of the extension form,
which was placed on the wrong element, causing a visual issue.

Tested the extension configuration, site settings, and upcoming
integration pages. I was able to save each without problems.

reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        djblets/siteconfig/templates/siteconfig/settings.html
        djblets/forms/templates/djblets_forms/admin/form_field.html
        djblets/extensions/templates/extensions/configure_extension.html
        djblets/forms/templates/djblets_forms/admin/change_form_page.html
        djblets/siteconfig/templates/siteconfig/settings_field.html
        djblets/static/djblets/css/extensions.less
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        djblets/siteconfig/templates/siteconfig/settings.html
        djblets/forms/templates/djblets_forms/admin/form_field.html
        djblets/extensions/templates/extensions/configure_extension.html
        djblets/forms/templates/djblets_forms/admin/change_form_page.html
        djblets/siteconfig/templates/siteconfig/settings_field.html
        djblets/static/djblets/css/extensions.less
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.10.x (20a6ab4)
Loading...