AnsweredAssumed Answered

How to add a confirmation dialog before approving a review step of a workflow in alfresco share

Question asked by someone1050 on Apr 3, 2015
Latest reply on Apr 7, 2015 by someone1050
I want to add a confirmation dialog before an approving review step in Alfresco's workflow, as shown in the picture for more precision

http://i.imgur.com/F3XWLSc.png

I've try to do it in a custom activiti-transitions.ftl,

C:\Alfresco\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\form\controls\workflow\custom-activiti-transitions.ftl

but it doesn't work correctly. I tried to do that with 2 javascript alert like here :



    <#if form.mode == "edit"
    && ((form.data['prop_bpm_status']??
    && form.data['prop_bpm_status'] != 'Completed')
    || form.data['prop_bpm_status']?? == false)>

    <script type="text/javascript">//<![CDATA[
    (function()
    {
       new Alfresco.ActivitiTransitions("${fieldHtmlId}").setOptions(
       {
          currentValue: "${field.control.params.options?js_string}",
          hiddenFieldName: "${field.name}"
       }).setMessages(
          ${messages}
       );
    })();
    alert("test !!!!!");
    //]]></script>

    <div class="form-field suggested-actions" id="${fieldHtmlId}">
       <div id="${fieldHtmlId}-buttons">
    <script type="text/javascript">//<![CDATA[
    alert("div button ?  !!!!!");
    //]]></script>
       </div>
    </div>
    </#if>


these 2 alerts appear before the buttons(look at the picture) "Approuver" and "Rejeter" are generated in the page .

You have the images of these two alerts in this link :

http://imgur.com/3vnP7sB,kf4Hud6#0

Outcomes