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.

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

<<attachment: required-field.png>>

Freeipa-devel mailing list

Reply via email to