CRM-12254
authorDonald A. Lobo <lobo@civicrm.org>
Mon, 1 Apr 2013 16:29:08 +0000 (09:29 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Mon, 1 Apr 2013 16:29:08 +0000 (09:29 -0700)
templates/CRM/Contact/Form/Edit/CustomData.tpl
templates/CRM/Custom/Form/CustomData.tpl
templates/CRM/Custom/Form/CustomField.tpl
templates/CRM/Form/attachment.tpl
templates/CRM/Form/attachmentjs.tpl

index e8d838b13d3197e7a06bb313792a0631f6396f3a..94bd3753925cb1af42c4e0d8c79713d62ebafce4 100644 (file)
@@ -95,3 +95,6 @@
 
   {/literal}
  </script>
+
+{include file="CRM/Form/attachmentjs.tpl"}
+
index 51b99f29ee5556ae52beeaccc6267eb4257b031c..2293d581b358402f3f5800188768c799035b21a8 100644 (file)
@@ -84,3 +84,5 @@
   </script>
 
 {/if}
+
+{include file="CRM/Form/attachmentjs.tpl"}
index 67b0caa0fc79c240cf70c10ced3ba0458a1a0243..4ba37d25141d33dc2e7f66dba230460c24eda33a 100644 (file)
@@ -86,7 +86,7 @@
                                 <a href="{$element.element_value.fileURL}">{$element.element_value.fileName}</a>
                             {/if}
                             {if $element.element_value.deleteURL}
-                                   <a href="#" onclick="showDelete('{$element.element_value.fileName}', '{$element.element_value.deleteURLArgs}', {$element.element_value.fid}, '#attachStatusMesg_{$element_name}', '#attachFile_{$element_name}'); return false;" title="{ts}Delete this file{/ts}"><span class="icon red-icon delete-icon" style="margin:0px 0px -5px 20px" title="{ts}Delete this file{/ts}"></span></a>
+                                   <a href="#" onclick="showDeleteAttachment('{$element.element_value.fileName}', '{$element.element_value.deleteURLArgs}', {$element.element_value.fid}, '#attachStatusMesg_{$element_name}', '#attachFile_{$element_name}'); return false;" title="{ts}Delete this file{/ts}"><span class="icon red-icon delete-icon" style="margin:0px 0px -5px 20px" title="{ts}Delete this file{/ts}"></span></a>
                             {/if}
                         </span>
                       </div>
index 4648ac684a4990ba804d5b47301fd93494242db7..262658da93845b49f5b13058e79ace397fb941b5 100644 (file)
                   <strong><a href="{$attVal.url}">{$attVal.cleanName}</a></strong>
                   {if $attVal.description}&nbsp;-&nbsp;{$attVal.description}{/if}
                   {if $attVal.deleteURLArgs}
-                   <a href="#" onclick="showDelete('{$attVal.cleanName}', '{$attVal.deleteURLArgs}', {$attVal.fileID}, '#attachStatusMesg', '#attachFileRecord_{$attVal.fileID}'); return false;" title="{ts}Delete this attachment{/ts}"><span class="icon red-icon delete-icon" style="margin:0px 0px -5px 20px" title="{ts}Delete this attachment{/ts}"></span></a>
+                   <a href="#" onclick="showDeleteAttachment('{$attVal.cleanName}', '{$attVal.deleteURLArgs}', {$attVal.fileID}, '#attachStatusMesg', '#attachFileRecord_{$attVal.fileID}'); return false;" title="{ts}Delete this attachment{/ts}"><span class="icon red-icon delete-icon" style="margin:0px 0px -5px 20px" title="{ts}Delete this attachment{/ts}"></span></a>
                   {/if}
                   {if !empty($attVal.tag)}
                     <br/>
index 8d61d079cecb6a6734e6b207b87c1370a98c321b..c991bbabe3306c445db1197f655e3bd5c415af23 100644 (file)
@@ -1,11 +1,11 @@
 <script type="text/javascript">
 {literal}
-  function hideStatus( divName ) {
+  function hideStatusAttachment( divName ) {
     cj( divName ).hide( );
   }
 
-  function showDelete( fileName, postURLData, fileID, divName, divFile ) {
-    var confirmMsg = '{/literal}{ts escape="js"}Are you sure you want to delete attachment: {/ts}{literal}' + fileName + '&nbsp; <a href="#" onclick="deleteAttachment( \'' + postURLData + '\',' + fileID + ',\'' + divName + '\', \'' + divFile + '\' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}Yes{/ts}{literal}</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="hideStatus( divName ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}No{/ts}{literal}</a>';
+  function showDeleteAttachment( fileName, postURLData, fileID, divName, divFile ) {
+    var confirmMsg = '{/literal}{ts escape="js"}Are you sure you want to delete attachment: {/ts}{literal}' + fileName + '&nbsp; <a href="#" onclick="deleteAttachment( \'' + postURLData + '\',' + fileID + ',\'' + divName + '\', \'' + divFile + '\' ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}Yes{/ts}{literal}</a>&nbsp;&nbsp;&nbsp;<a href="#" onclick="hideStatusAttachment( divName ); return false;" style="text-decoration: underline;">{/literal}{ts escape='js'}No{/ts}{literal}</a>';
     cj( divName ).show( ).html( confirmMsg );
   }
 
@@ -17,7 +17,7 @@
       url: postUrl,
       success: function(html){
         var resourceBase   = {/literal}"{$config->resourceBase}"{literal};
-        var successMsg = '{/literal}{ts escape="js"}The selected attachment has been deleted.{/ts}{literal} &nbsp;&nbsp;<a href="#" onclick="hideStatus( \'' + divName + '\'); return false;"><img title="{/literal}{ts escape='js'}close{/ts}{literal}" src="' +resourceBase+'i/close.png"/></a>';
+        var successMsg = '{/literal}{ts escape="js"}The selected attachment has been deleted.{/ts}{literal} &nbsp;&nbsp;<a href="#" onclick="hideStatusAttachment( \'' + divName + '\'); return false;"><img title="{/literal}{ts escape='js'}close{/ts}{literal}" src="' +resourceBase+'i/close.png"/></a>';
         cj( divFile ).hide( );
         cj( divName ).show( ).html( successMsg );
       }