Highlighted

How to change default value of expiration time in DAM-UI while sharing assets

Avatar

Avatar

lovepreetk75597

Avatar

lovepreetk75597

lovepreetk75597

15-04-2019

Hi,

I have one query regarding sharing assets from DAM-UI. When we share assets so expiration time will get set for 24 hours by default. I need to change this value to 48 hours. Does anybody know from where can we change this default value.

Thanks in advance.

Lovepreet

Replies

Highlighted

Avatar

Avatar

raj_mandalapu

Avatar

raj_mandalapu

raj_mandalapu

16-04-2019

You need to modify below js file.

/libs/dam/gui/coral/components/admin/adhocassetshare/clientlibs/adhocassetshare/js/adhocassetshare.js

Change add(1, days) to your default value and test.

$(document).on("asset-share-link-fetched", function (e) {

        // Fix this, avoid setTimeOut

        setTimeout(function () {

            $(".adhocassetshare-share-link").val(assetShareLink);

            $("#expirationDate")[0].valueAsDate = new Date(moment().add(1, 'days'));

            $("#sharelink").attr("readonly", "true");

            //retain the textbox border..

            $("#sharelink").css({

                "border-width":"1px",

                "border-style":"solid",

                "border-color":"#d0d0d0"});

           

        }, 3000);

    });

Highlighted

Avatar

Avatar

lovepreetk75597

Avatar

lovepreetk75597

lovepreetk75597

16-04-2019

Hi ,

Thanks for the answer. I am able to change default expiration time. But expiration time is still configurable so do you know how we can disable this that user will not be able to select expiration time while sharing assets.

Highlighted

Avatar

Avatar

raj_mandalapu

Avatar

raj_mandalapu

raj_mandalapu

16-04-2019

You need to make date-time picker as read-only.

Thanks

Raj.

Highlighted

Avatar

Avatar

raj_mandalapu

Avatar

raj_mandalapu

raj_mandalapu

16-04-2019

Apply read-only for below field

/libs/dam/gui/content/assets/adhocassetsharedialog/items/dialog/items/nameandexpiration/items/expirationdate