I'm trying to hide some fields on create and edit site and I got success in my modification for create-site dialog, however for edit-site dialog, nothing happened and I don't know why.
In the below code, I'm removing the options "Public" and "Moderated" of visibility field.
I'm using alfresco community 201704.
Following my share-header.get.js
var siteService = widgetUtils.findObject(model.jsonModel, "id", "SITE_SERVICE");<br>if (siteService && siteService.config) {<br> siteService.config.widgetsForCreateSiteDialogOverrides = [{<br> id: "CREATE_SITE_FIELD_PRESET",<br> replace: true,<br> name: "alfresco/forms/controls/Select",<br> config: {<br> fieldId: "PRESET",<br> label: "create-site.dialog.type.label",<br> name: "sitePreset",<br> optionsConfig: {<br> fixed: "{sitePresets}"<br> },<br> visibilityConfig: {<br> initialValue: false<br> }<br> }<br> },{<br> id: "CREATE_SITE_FIELD_VISIBILITY",<br> replace: true,<br> name: "alfresco/forms/controls/RadioButtons",<br> config: {<br> fieldId: "VISIBILITY",<br> label: "create-site.dialog.visibility.label",<br> name: "visibility",<br> optionsConfig: {<br> fixed: [{<br> label: "create-site.dialog.visibility.private",<br> description: "create-site.dialog.visibility.private.description",<br> value: "PRIVATE"<br> }]<br> },<br> visibilityConfig: {<br> initialValue: false<br> }<br> }<br> }];<br>
siteService.config.widgetsForEditSiteDialogOverrides = [{<br> id: "EDIT_SITE_FIELD_VISIBILITY",<br> replace: true,<br> name: "alfresco/forms/controls/RadioButtons",<br> config: {<br> fieldId: "VISIBILITY",<br> label: "VISIBIITY",<br> name: "visibility",<br> optionsConfig: {<br> fixed: [{<br> label: "create-site.dialog.visibility.private",<br> description: "create-site.dialog.visibility.private.description",<br> value: "PRIVATE"<br> }]<br> }<br> }<br> }];<br>}
Regards,
Luís Camargo