This patch adds ids to the location divs in the node edit form to allow for easier theming via css.
We could tweak the names of the IDs, but I think this is mostly valid.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | location_class.patch | 3.27 KB | greggles |
| location_adding_div_ids.patch | 3.86 KB | greggles |
Comments
Comment #1
geodaniel commentedForgive me if I'm asking a silly question, but what's the benefit of using underscores over dashes for the ids? Are normal dashes not valid? Just curious :)
Comment #2
nevets commentedBad use od id's, should be css class. An id should be only used if there can/is only one of something. Using an id as this patch does would make it hard to include two locations on the same form (the html would not validate, css styling might fail and any assocated javascript will cause odd results). And yes there are reason to have more than one location on a form. In general, any id's assigned to a form field should be unique (ifor example reflect the name of the field).
Comment #3
Tobias Maier commented-1 for ids
+1 for usefull classes
Comment #4
gregglesSo, my diff sucked anyway, but you all got the idea.
For those who are promotingclasses, is the appropriate way something like
?
Comment #5
nevets commentedYes that would be an appropriate way to add more classes.
Comment #6
gregglesHere's a patch for HEAD - I think it probably makes the most sense to leave them the same for 4.7 and only change this in HEAD.
Comment #7
gregglesAlso, the patch uses classes as nevets and Tobias Maier suggested.
The names come mostly from the field name (or the function name in the case of the latlon which are in the same div). I used underscore consistently since some fields contain underscores - but that seems mostly like a preference thing to me.
Comment #8
gregglesone more change - I forgot to update the title.
Comment #9
gregglesComment #10
Tobias Maier commentedhello greggles,
first of all thank you for your new patch.
I thought a little bit about this and came to the idea of using the hcard-Microformat or the geo-Microformat for displaying addresses.
What do you think about this?
Comment #11
gregglesDo those apply to input? My patch is only for the inputting side of location, not the output. But certainly we could investigate using those as the default styles in the theme section.
I think that should live in a different issue, personally.
Comment #12
Tobias Maier commentedoh sorry i over read that this issue only affects the node edit form...
I moved my suggestion to an own issue:
http://drupal.org/node/99191
Comment #13
bdragon commentedPlease open a new issue if this is still a problem. ;)