#29348 closed enhancement (fixed)
Add classes to form containers on user-edit.php
| Reported by: | jarednova | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.1 |
| Component: | Users | Version: | 4.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | ui, administration |
Description
This is related to #28196 and applies the same methodology to the user-edit screen. Currently all the field containers are simply <tr> wrappers.
This makes it difficult for a developer to hide or modify specific fields on the page. This patch applies a universal class convention to each tr like...
<tr class="user-description-wrap">
<tr class="user-capabilities-wrap">
Classes are used instead of IDs because IDs are already occasionally used, such as...
<tr class="user-password-wrap" id="password">
Attachments (1)
Change History (11)
#2
@
12 years ago
- Component Administration → Users
- Focuses ui added; template removed
- Milestone Awaiting Review → 4.1
#4
@
12 years ago
I'm all for adding classes to better identify and expose various elements for whatever reason but isn't appending -wrap to each class a bit redundant? Otherwise ... kudos, @jarednova!
#6
follow-up:
↓ 9
@
12 years ago
- Resolution fixed
- Status closed → reopened
It's great, that this is in, I've been waiting for it for 5 years ;-), see #12295, which can now be closed I think.
BUT: Is it possible to also add classes to the <tr> tags, as jarednova did in the second patch?
If we are at it, we should go all the way.
#7
@
12 years ago
@pampfelimetten the classes here are added to the <tr> tags -- is there a specific part you're referring to that I missed?
@oberland and @cais: my reasoning for the -wrap suffix was to be 100% clear that these don't class the fields/inputs themselves, but rather the entire set. The class should speak for itself rather than rely on always being attached to a certain element type. While they're on <tr>s today, I can imagine a future when the admin is no longer a table-based layout. The -wrap adds some more characters, but it also removes any possible confusion about what part of the form these relate to.
#8
@
12 years ago
I'm with @jarednova on -wrap. Unless there's a specific legacy/consistency reason not to, the extra specificity is nice.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)

Git diff to add classes to
<tr>wrappers on user-edit.php