Read-only fields in the user profile widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 01:26 AM
I'd like to change some of the fields in the user profile widget to read-only while retaining the look-and-feel of the output. I've cloned the OOB user_profile widget and made the following change:
<div ng-repeat="fieldModel in getSysUserModelFields()">
<div class="list-group-item">
<div>
<sp-editable-field block="true" table="sys_user" editable-by-user="false" table-id="data.sysUserID" field-model="fieldModel"></sp-editable-field>
</div>
</div>
</div>
which works fine in that the fields can no longer be changed. However where a field has no data entered I don't get the header. For example when editable I get:
but when read-only I get:
Is there a way to display headers for all of the fields returned by getSysUserModelFields(), even if the option to edit them is set to false?
Also is there a way to selectively make a field read-only? For example you change change your phone number but not your email address?
Thanks.
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 02:17 AM
HI,
Did you try CanWrite and CanRead Concept in portal.
current.canWrite is a good option.
Thanks,
Ashutosh Munot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 03:59 AM
Hi Peter,
If end users with no role shouldn't be allowed to change some fields ( on Portal and Back Office)
Did you try to set these fields as "Read Only" with ACLs, without any change on the widget part ?
Regards,
Denis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2018 07:53 PM
I always seem to over complicate things. This made it really easy for me.
Thanks,
Donald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 02:57 AM
Can you please explain how this was achieved through ACL