[Freeipa-devel] [PATCH] 295 Fixed inconsistent required/optional attributes.
Petr Vobornik
pvoborni at redhat.com
Fri Oct 21 11:40:21 UTC 2011
On 10/20/2011 09:35 PM, Endi Sukma Dewata wrote:
> The dialogs and details pages have been modified to use the * symbol
> to mark required fields. The automount map and the DNS zone dialogs
> have been modified to update the required fields according to the
> input type.
>
> Ticket #1696
>
1) Wouldn't be better if the asterisk has different color than the
label? Visually I don't like it that much and I think it can be
overlook. Attaching a proposition. I used green IPAish color because red
usually means error.
Code from browser how it was done:
<td class="section-cell-label" title="First name"><label
name="givenname" class="field-label">First name:</label><span
class="required" style="
float: right;
font-weight: bold;
color: #319016;
font-size: 20px;
" title="required">*</span></td>
(style should be moved to css file)
<div style="line-height: 25px;"><span class="required" style="
font-weight: bold;
color: #319016;
font-size: 20px;
vertical-align: middle;
">*</span> required</div>
It may vary on the section type.
2) When rendering label, we should also obtain field input's id (if
possible) for 'for' attribute of <label>. This can be done separately.
3) Should we create some common pure html widgets with certain
semantics? IE asterisk shouldn't be directly concatenated with label
text. It is used on more than one place which may cause maintenance issues.
IPA.form(or some other name).required_indicator = function() {
return '*'
};
in this case this seems unnecessary. But if the required indicator was
like in 1) it will be useful.
Summary:
All 3 points are nice to have. If you think is not necessary then ACK.
This patch is also fixing https://fedorahosted.org/freeipa/ticket/1973 .
--
Petr Vobornik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: required-field.png
Type: image/png
Size: 8210 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20111021/1be6d1f7/attachment.png>
More information about the Freeipa-devel
mailing list