Skip to content

Conversation

@kchang
Copy link
Contributor

@kchang kchang commented Nov 12, 2014

The browsable api forms were missing file inputs for FileField. This was easily added by including the information in HTMLFormRenderer.default_style

Before:
screen shot 2014-11-12 at 1 10 46 pm

After:
screen shot 2014-11-12 at 1 11 29 pm

@lovelydinosaur
Copy link
Contributor

Good catch yup!
The styling seems a little odd - wasn't really expecting the white surround. May be worth looking at (we can always have a separate template for file inputs if needed?

@lovelydinosaur lovelydinosaur added this to the 3.0 Release milestone Nov 12, 2014
@kchang
Copy link
Contributor Author

kchang commented Nov 12, 2014

Taking out class="form-control" removes the white outline box around the file input.

After:

screen shot 2014-11-12 at 2 24 28 pm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've avoided block overriding at all costs so far.

Either we can:

  • Have form-control be something that's passed to all other input fields except file in the context.
  • Not write form_control if style.input_type == file.
  • Go with what you have here, but be explicit rather than using block overriding.

Additionally we need to make the same fix for the vertical and inline styles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants