[Freeipa-devel] [PATCH] 429 Make ssh_widget not-editable if attr is readonly

Petr Vobornik pvoborni at redhat.com
Tue Aug 13 10:48:33 UTC 2013


On 07/29/2013 03:48 PM, Ana Krivokapic wrote:
> On 07/29/2013 03:10 PM, Petr Vobornik wrote:
>> On 07/29/2013 02:21 PM, Ana Krivokapic wrote:
>>> On 07/29/2013 11:45 AM, Petr Vobornik wrote:
>>>>                dialog.textarea = $('<textarea/>', {
>>>>                    'class': 'certificate',
>>>> -                readonly: that.read_only,
>>>> +                readonly: !writable,
>>>>                    disabled: !that.enabled
>>>>                }).appendTo(dialog.container);
>>>
>>> I suggest setting the 'disabled' attribute on the text area in case it's not
>>> writable:
>>>
>>>       disabled: !that.enabled || !writable
>>>
>>> That way, when the user opens the dialog, the textarea is greyed out and it is
>>> immediately clear that it is not editable.
>>>
>>
>> I agree that we should distinguish the look of readonly textarea, but
>> 'disabled' attribute is not the right one for the task. Disabled inputs
>> have(at least in FF) behavior which we don't want for readonly:
>>   * they are not fucusable
>>   * user can't select(copy) text
>>
>> I've added new css style to create the distinction.
>>
>> Updated patch attached.
>>
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>
> Looks good, ACK.

Pushed to master.

>
> While I was testing this patch, I noticed that syncing CSS files using the
> install/ui/util/sync.sh script is broken. Attached is a two-liner fix.

ACK and pushed to master.


-- 
Petr Vobornik




More information about the Freeipa-devel mailing list