How to extend Create Library dialog?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner

How to extend Create Library dialog?

I want to add a dropdown list to the existing dialog where the value is forwarded like in Aikau. I don't know where to begin.  I've taken a look at this https://www.alfresco.com/abn/adf/docs/content-services/dialogs/library.dialog/ and looked for "adf-library-dialog".

siteService.config.widgetsForCreateSiteDialogOverrides = [
{
id: "SELECT_PROJECT_TEMPLATE",
name: "alfresco/forms/controls/Select",
targetPosition: "START",
config: {
fieldId: "SELECT_PROJECT_TEMPLATE",
label: "TestTitle",
name: "ph:customTemplateProperty",
value: standardTemplate,
optionsConfig: {
fixed: options
}
}
}
];

 

2 Replies
Highlighted
Moderator
Moderator

Re: How to extend Create Library dialog?

Hi @phivuu-2,

What do you mean with "the value is forwarded like in Aikau"?

Are you looking to get one of the values from an external source?

Which is your goal?

Cheers.

Highlighted
Partner

Re: How to extend Create Library dialog?

Hi,

The goal is to retrieve the value in repository(sites.post.json.js). With Aikau it was possible with ph:customTemplateProperty.

siteService.config.widgetsForCreateSiteDialogOverrides = [
{
id: "SELECT_PROJECT_TEMPLATE",
name: "alfresco/forms/controls/Select",
targetPosition: "START",
config: {
fieldId: "SELECT_PROJECT_TEMPLATE",
label: "TestTitle",
name: "ph:customTemplateProperty",
value: standardTemplate,
optionsConfig: {
fixed: options
}
}
}
];

 

I've gotten some advice on Gitter which I'm looking into now. If I have understood correctly I need to do the following:

 

  1. Make my own LibraryDialogComponent to add the extra field I want. https://github.com/Alfresco/alfresco-ng2-components/tree/6331979baa1ab5e37f62da466abb2a2074bbebfe/li...
  2. Make my own custom Action + Effect that does what CREATE_LIBRARY does + fetching values for my droplist from the repository.(Replacing the existing action) https://github.com/Alfresco/alfresco-content-app/blob/development/src/assets/app.extensions.json#L97...
  3. Lastly, somehow supply the selected value in ph:customTemplateProperty in the request to sites.post.json.js