cancel
Showing results for 
Search instead for 
Did you mean: 

Hide field on edit site

luiscesarinfo
Confirmed Champ
Confirmed Champ

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");
if (siteService && siteService.config) {
   siteService.config.widgetsForCreateSiteDialogOverrides = [{
      id: "CREATE_SITE_FIELD_PRESET",
      replace: true,
      name: "alfresco/forms/controls/Select",
      config: {
         fieldId: "PRESET",
         label: "create-site.dialog.type.label",
         name: "sitePreset",
         optionsConfig: {
            fixed: "{sitePresets}"
         },
         visibilityConfig: {
            initialValue: false
         }
      }
   },{
      id: "CREATE_SITE_FIELD_VISIBILITY",
      replace: true,
      name: "alfresco/forms/controls/RadioButtons",
      config: {
         fieldId: "VISIBILITY",
         label: "create-site.dialog.visibility.label",
         name: "visibility",
         optionsConfig: {
            fixed: [{
               label: "create-site.dialog.visibility.private",
               description: "create-site.dialog.visibility.private.description",
               value: "PRIVATE"
            }]
         },
         visibilityConfig: {
            initialValue: false
         }
      }
   }];

   siteService.config.widgetsForEditSiteDialogOverrides = [{
      id: "EDIT_SITE_FIELD_VISIBILITY",
      replace: true,
      name: "alfresco/forms/controls/RadioButtons",
      config: {
         fieldId: "VISIBILITY",
         label: "VISIBIITY",
         name: "visibility",
         optionsConfig: {
            fixed: [{
               label: "create-site.dialog.visibility.private",
               description: "create-site.dialog.visibility.private.description",
               value: "PRIVATE"
            }]
         }
      }
   }];
}

Regards,

Luís Camargo

8 REPLIES 8

afaust
Legendary Innovator
Legendary Innovator

How did you apply your customisation? Does the Surf extension module have some evaluator to determine when it should be applied? Did you apply the Surf extension module to both regular Share pages as well as Aikau-based pages? Which version of Aikau are you using?

Thanks for answer Axel Faust‌.

We are upgrading the Alfresco from 5.0.d to 5.2 201704 and for a while, we will use an old solution and configure the legacyMode.
I'm sure there a lot of configs missing and I have to learn and check everything.

Thank you very much for help.

HI,

I'm facing the same issue and even after upgraded from 5.0 to 5.2.

I have done the configs changes also but no success. Nothing got display for Edit site dialog.

Can you please let me know if you get the solution of the above issue?

Thanks a ton,
Simant

Sorry for late replay.

I'm still using the legacyMode. So far it has been enough for me.

Regards,

Luis