Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1748349

Summary: 'View objectclass' modal dialog doesn't have all controls disabled
Product: Red Hat Directory Server Reporter: Viktor Ashirov <vashirov>
Component: cockpit-389-dsAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 11.0CC: ebock, lkrispen, mhonek, pasik, spichugi, tbordaz
Target Milestone: ---   
Target Release: dirsrv-11.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.4.2.7-1.module+el8dsrv+5547+8be68086 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-29 08:04:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Dialog with writable input fields
none
Dialog with readonly fields
none
Dialog with disabled input fields none

Description Viktor Ashirov 2019-09-03 12:14:57 UTC
Description of problem:
'View objectclass' dialog is a re-purposed edit dialog, but only with a different title and Save button disabled. Unfortunately, it creates confusion, as all the other elements are enabled and allow to edit name, attributes, etc. It should be clear to the user that a View dialog is read-only. 

Version-Release number of selected component (if applicable):
389-ds-base-1.4.1.6-2.module+el8dsrv+3912+aa2ce078.x86_64


How reproducible:
always

Steps to Reproduce:
1. Schema -> Objectclasses -> View Objectclass
2. Try adding/removing required/allowed attributes, selecting parent objectClass or objectClass kind, etc.
3.

Actual results:
UI elements are enabled and allow changes.

Expected results:
UI elements should be disabled as it is a read-only dialog.

Additional info:

Comment 1 Viktor Ashirov 2019-09-10 11:15:11 UTC
Build tested:  389-ds-base-1.4.1.7-1.module+el8dsrv+4200+233a821d

Checkboxes also should be read only:

disabled="disabled"

Comment 3 Viktor Ashirov 2019-09-27 13:48:15 UTC
Builds tested:
389-ds-base-1.4.1.9-1.module+el8dsrv+4243+ba0eb3c6.x86_64
cockpit-389-ds-1.4.1.9-1.module+el8dsrv+4243+ba0eb3c6.noarch

Input fields should have 'disabled' attribute, not 'readonly'. There is a difference between 'readonly' and 'disabled': user can't differentiate *visually* between readonly and non-readonly input fields, they looks the same, but behave differently. Disabled field, on the other hand, has a different look and its intent is clear.
I'm attaching screenshots of readonly, disabled and writeable dialogs. Note how readonly and writable input fields look exactly the same.

Marking as ASSIGNED.

Comment 4 Viktor Ashirov 2019-09-27 13:48:45 UTC
Created attachment 1620140 [details]
Dialog with writable input fields

Comment 5 Viktor Ashirov 2019-09-27 13:49:09 UTC
Created attachment 1620141 [details]
Dialog with readonly fields

Comment 6 Viktor Ashirov 2019-09-27 13:49:35 UTC
Created attachment 1620142 [details]
Dialog with disabled input fields

Comment 8 Viktor Ashirov 2019-11-04 14:05:12 UTC
Builds tested:
389-ds-base-1.4.1.10-1.module+el8dsrv+4575+0d8b81fc.x86_64
cockpit-389-ds-1.4.1.10-1.module+el8dsrv+4575+0d8b81fc.noarch

View objectClass and View attribute modals have all attributes 'readonly', not 'disabled'.

Moving to ASSIGNED.

Comment 10 mreynolds 2019-11-08 22:03:47 UTC
https://pagure.io/389-ds-base/issue/50696

Comment 12 Viktor Ashirov 2020-02-17 13:51:16 UTC
Build tested: 389-ds-base-1.4.2.7-1.module+el8dsrv+5547+8be68086.x86_64
There is no View objectClass or View attribute modals anymore. Only Edit. Is this expected?

And when I press Edit on an attribute, I get the following error in the console

Uncaught TypeError: Cannot read property 'title' of undefined
    at load_attr_form (schema.js:701)
    at HTMLAnchorElement.<anonymous> (schema.js:789)
    at HTMLDocument.dispatch (jquery-3.3.1.min.js:2)
    at HTMLDocument.y.handle (jquery-3.3.1.min.js:2)

And the modal dialog doesn't appear.

Moving to ASSIGNED.

Comment 13 Viktor Ashirov 2020-02-18 15:53:33 UTC
Please ignore last comment, was testing on a wrong build.
Build tested: cockpit-389-ds-1.4.2.7-1.module+el8dsrv+5547+8be68086.noarch

View objectClass and attribute modals look good, fields are disabled as requested. No crash is observed.
Marking as VERIFIED.

Comment 15 errata-xmlrpc 2020-04-29 08:04:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1961