Clarity Service Management

Expand all | Collapse all

Catalog request widget - Submit button

Jump to Best Answer
  • 1.  Catalog request widget - Submit button

    Posted 04-12-2019 04:25 AM

    Dear friends,

    we recently integrated Catalog widgets in a Kentico portal and also made some "look and feel" customizations.

     

    One of the problems we still face is to have the Submit button not only on the top of the page but also on the bottom. Does anyone know how to do it? We have some large forms and the customers often search for a submit button somewhere on the bottom of the page...

     

    The interesting is that if you open a request in the Catalog, there is a Submit button on the top and also on the bottom of the page.

     

    Thank you for your suggestions,

    Jakub

     

    Current request widgets in Kentico portal - submit button only on the top of the page:

     

    the same request in Catalog - second Submit button on the bottom of the page...



  • 2.  Re: Catalog request widget - Submit button

    Posted 05-13-2019 02:59 AM

    Hello, does anyone have some ideas?

     

    Regards,

    Jakub



  • 3.  Re: Catalog request widget - Submit button

    Posted 05-14-2019 04:01 AM

    Good Morning Jakub.

      

    You could/would possibly disagree, however, based on earlier and similar requests(cases), the following goes.

     

    This is a kind of general statement, reading:
    The USS-UI is difficult to customize, because almost all of it, is 'hardcoded' in the widgets as installed.

    You cannot customize USS on the similar level of SC and/or SDM.
    In other words, customization possibilities allowed and possible on USS, are very limited.
    Sometimes it is possible to change something on 'colors' e.g. through .css file(s).
    And you can change logos, company name, etc.
    Please check the below page for this:
    https://docops.ca.com/ca-service-management/14-1/en/administering/configuring-unified-self-service/modify-unified-self-service

    Thanks in advance for your understanding and kind regards, Louis van Amelsfort.

    PS. Folder to check is C:\Program Files\CA\Service Catalog\view\webapps\usm\explorer\scripts\widgets



  • 4.  Re: Catalog request widget - Submit button
    Best Answer

    Posted 05-20-2019 02:58 AM

    Dear friends,

    finally, I found a working solution - the example below is for request creation:

     

    • Go to ...\view\webapps\usm\explorer\request\ and copy request_create.xsl to the ...\filestore\custom\explorer\request\ folder (for request edit it is request_edit.xsl file)

     

    • Now you have to find a correct place to insert the panel with Submit button - in my case it was following block of code:

     

    <xsl:if test="$hasOneClickSubmitServiceType and not(count(//usm_rate_definition[item_type/LITERAL='0' and enum_1/LITERAL='0' and rate_col/LITERAL='0'])=(count(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION)-number(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/usm_rate_plan/has_header/LITERAL)))">
    <xsl:variable name="expandTitle" select="concat($xslcontent/clickToExpand,' ', $xslcontent/req_conversation)" />
    <xsl:variable name="collapseTitle" select="concat($xslcontent/clickToCollapse,' ', $xslcontent/req_conversation)" />
    <conversation title="{$xslcontent_1/req_conversation}" id="req_conv" class="parent_conv_tbl" showAttachments="true" expand-title="{$expandTitle}" collapse-title="{$collapseTitle}"></conversation>
    </xsl:if>
    </panel>
    • After the </panel> copy the code which creates the header with the Submit button (this is for 17.1 release, may be slightly different for other releases):

     

    <header class="ca-catalog-req-header" label="" description="{/xmlRoot/COLLECTION/usm_offering/description/LITERAL}" id="{/xmlRoot/COLLECTION/usm_offering/offering_id/LITERAL}" aria-labelledby="{/xmlRoot/COLLECTION/usm_offering/offering_id/LITERAL}">
    <actions>
    <xsl:choose>
    <xsl:when test="count(//usm_rate_definition[item_type/LITERAL='13'])>0 or /xmlRoot/COLLECTION/INFO/result/LITERAL != '1' or count(COLLECTION/COLLECTION/COLLECTION)=0 or /xmlRoot/COLLECTION/access_control/add_request/LITERAL='0' or (/xmlRoot/COLLECTION/INFO/allow_only_one_offering_per_request/LITERAL='true' and /xmlRoot/COLLECTION/INFO/cart_count/LITERAL > 0 and not(/xmlRoot/COLLECTION/usm_offering/type/LITERAL='3')) or (count(//usm_rate_definition[item_type/LITERAL='0' and enum_1/LITERAL='0' and rate_col/LITERAL='0'])=(count(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION)-number(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/usm_rate_plan/has_header/LITERAL)))">
    <!-- prevent submission of offerings with wf forms or when there is an error or no sogs or no permission
    or single offering per cart or all info rows -->
    </xsl:when>
    <xsl:when test="/xmlRoot/COLLECTION/usm_offering/type/LITERAL='3'">
    <xsl:choose>
    <xsl:when test="count(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION)&gt;2">
    <portal_button id="submitcartlessbtn_top" label="{$xslcontent_1/submit}" />
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="itemid">
    <xsl:choose>
    <xsl:when test="count(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION)&gt;1"><xsl:value-of select="/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION[2]/usm_rate_definition/item_id/LITERAL"/></xsl:when>
    <xsl:otherwise><xsl:value-of select="/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION[1]/usm_rate_definition/item_id/LITERAL"/></xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <xsl:variable name="itemname">
    <xsl:choose>
    <xsl:when test="count(/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION)&gt;1"><xsl:value-of select="/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION[2]/usm_rate_definition/item_text/LITERAL"/></xsl:when>
    <xsl:otherwise><xsl:value-of select="/xmlRoot/COLLECTION/COLLECTION/COLLECTION/COLLECTION/COLLECTION[1]/usm_rate_definition/item_text/LITERAL"/></xsl:otherwise>
    </xsl:choose>
    </xsl:variable>
    <xsl:variable name="offeringid" select="/xmlRoot/COLLECTION/usm_offering/offering_id/LITERAL"/>
    <portal_button id="submitcartlessbtn_top" label="{$xslcontent_1/submit}" />
    </xsl:otherwise>
    </xsl:choose>
    </xsl:when>
    <xsl:otherwise>
    <xsl:if test="/xmlRoot/COLLECTION/INFO/allow_only_one_offering_per_request/LITERAL='false'">
    <portal_button id="addbtn_top" label="{$xslcontent_1/add_to_cart}" />
    </xsl:if>
    <portal_button id="addcheckoutbtn_top" label="{$xslcontent_1/checkout}" />
    </xsl:otherwise>
    </xsl:choose>
    </actions>
    </header>

     

    • In my case, I've deleted the header label

     

    After some tests, everything seems to be OK..

    For request edit form the steps are similar.

     

    Hope this will help someone,

    Jakub



  • 5.  Re: Catalog request widget - Submit button

    Posted 05-20-2019 03:03 AM

    Good Morning Jakub.

     

    WOW! Chapeaux and congrats.

    As non-ootb USS customization appears to be working.

    Nice job.

     

    Thanks and kind regards, Louis.