Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added visual indicators between repeated form objects #206

Merged
merged 2 commits into from
Aug 5, 2014

Conversation

cndreisbach
Copy link

Issue #193 discussed one specific place that the admin interface needed a visual indicator between buttons. That same pattern repeats itself throughout the location form, so this commit addresses all of them. In addition, it gives a visual indicator between each element in a list of children.

I am not sure if this visual indicator fits your vision, but I think it's nonintrusive but visually separates things well.

Issue codeforamerica#193 discussed one specific place that the admin interface needed
a visual indicator between buttons. That same pattern repeats itself
throughout the location form, so this commit addresses all of them. In
addition, it gives a visual indicator between each element in a list of
children.
@monfresh
Copy link
Member

monfresh commented Aug 3, 2014

Thanks for doing this. The divider provides a nice separation, and we can always style it differently later. There are a few issues though with the implementation. Could you please make a few changes and additions?

  1. The %hr should actually be in the _fields partial aligned all the way to the left, so that it can appear in the scenario where there aren't any existing entries. For example, if you go to a location that doesn't have any contacts (or if you create a new location), and you click the "Add a new contact" button, the %hr won't appear unless you put it in _contact_fields.html.haml instead of _contacts.html.haml. I believe this is the case for all the fields.
  2. Could you also please do the same thing for the Service keywords, websites, and service areas (app/views/admin/services/forms), and the Organization websites (app/views/admin/organizations/forms/_url_fields.html.haml)?

Thanks!

The lines between repeated sub-forms (contacts, phone numbers, and the
like) were not appearing on new sub-forms added dynamically. This fixes
that. In addition, this fixes all tests that were broken by the button
text change from "Add a(n) X" to "Add a new X"
@cndreisbach
Copy link
Author

Thanks for the feedback, @monfresh! All your requests should be implemented now.

@monfresh monfresh merged commit 9593940 into codeforamerica:master Aug 5, 2014
monfresh added a commit that referenced this pull request Aug 5, 2014
- Move %hr inside fieldset so it gets removed when deleting a set of
fields

- Add styling to keep the hr left-aligned
@monfresh
Copy link
Member

monfresh commented Aug 5, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants