cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Cancel button @ 'Modify Content Properties' screen

rbkprod
Champ in-the-making
Champ in-the-making
Anyone know if this is possible?
I tried adding
<showCancelButton>false</showCancelButton>
to the 'web-client-config-custom.xml' file. But alas, It does nothing as far as I can see  Smiley Indifferent .

Help is greatly appreciated.

Thanks.
4 REPLIES 4

dmihelj
Champ in-the-making
Champ in-the-making
Can you post contents of your web-client-config-custom.xml file?

rbkprod
Champ in-the-making
Champ in-the-making
Can you post contents of your web-client-config-custom.xml file?

    
<config evaluator="string-compare" condition="Action Wizards">
      <aspects>
         <aspect name="custom:InputFields"/>
      </aspects>
   </config>
    <config evaluator="aspect-name" condition="custom:InputFields">
      <property-sheet>
         <separator name="sepFields1" display-label="Input Fields" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:Source"/>
       <show-property name="custom:ODN"/>
         <show-property name="custom:daterecieved"/>
         <show-property name="custom:usagerights"/>
         <show-property name="custom:language"/>
         <show-property name="custom:domain"/>
         <show-property name="custom:docutype"/>
         <show-property name="custom:wordcount"/>
       <show-property name="custom:NDN" show-in-edit-mode="false"/>
         <separator name="sepFields2" display-label="Data Tracking" component-generator="HeaderSeparatorGenerator" />
         <show-property name="custom:sendto"/>
       <show-property name="custom:datesent"/>
         <show-property name="custom:projname"/>
       <show-property name="custom:purpose" component-generator="MultilingualTextAreaGenerator"/>
         <show-property name="custom:recieveddate" ignore-if-missing="true"/>
       <show-property name="custom:estDateBack" ignore-if-missing="true"/>
       <showCancelButton>false</showCancelButton>
      </property-sheet>
   </config>

I added it to the last line (before </property-sheet> )where the aspect gets called. Just tried it out, since I found it in some template somewhere.

Thanks

ilazki
Champ in-the-making
Champ in-the-making
I found a solution in order to do it. I changed core's jsp files though (a better solution could be to create a custom dialog and to modify the navigation rules).

Edit the alfresco/jsp/content/add-content-dialog.jsp file. The code hides the button.

<script type="text/javascript">
window.onload=hideCancel;

function hideCancel(){
  var cancelButton = document.getElementById("dialog:cancel-button");
  cancelButton.style.display="none";
}
</script>

rbkprod
Champ in-the-making
Champ in-the-making
I found a solution in order to do it. I changed core's jsp files though (a better solution could be to create a custom dialog and to modify the navigation rules).

Edit the alfresco/jsp/content/add-content-dialog.jsp file. The code hides the button.

<script type="text/javascript">
window.onload=hideCancel;

function hideCancel(){
  var cancelButton = document.getElementById("dialog:cancel-button");
  cancelButton.style.display="none";
}
</script>

Thanks for this friend! It work 100% Although at first it disabled the cancel button at the upload content dialog only, I added that code into container.jsp as well, and it removed the cancel button @ the modify content properties screen (the screen that opens after you upload a file, if the 'Modify all properties when this page closes.' is selected). I have a suspicion that this would also disable other cancel buttons as well though for different dialogs, will check it out.