);
// simplified formatted groupTree
$groupTree = CRM_Core_BAO_CustomGroup::formatGroupTree($groupTree, 1, $this);
+ // Array contains only one item
foreach ($groupTree as $groupValues) {
$this->_customTitle = $groupValues['title'];
+ CRM_Utils_System::setTitle(ts('Edit %1', array(1 => $groupValues['title'])));
}
$this->_defaults = array();
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-
-<form action="{crmURL p='civicrm/case/cd/edit' q="cgcount=1&action=update&reset=1&entityID=`$entityID`&groupID=`$groupID`&cid=`$contactID`&subType=`$subType`"}" method="post" id="id_case_custom_dialog" >
- {include file="CRM/Custom/Form/CustomData.tpl"}
- <div class="html-adjust">{$form.buttons.html}</div>
-</form>
+{include file="CRM/Custom/Form/CustomData.tpl" skipTitle=1}
+<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</table>
{/foreach}
<div>
- <a href="#" class="button" style="margin-left: 6px;"
- onclick="updateCaseCustom({$caseID}, {$customGroupId}, {$contactID}, {$caseTypeID}); return false;">
+ <a href="{crmURL p="civicrm/case/cd/edit" q="cgcount=1&action=update&reset=1&type=Case&entityID=$caseID&groupID=$customGroupId&cid=$contactID&subType=$caseTypeID"}" class="button">
<span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
</a>
</div>
<br/>
+ <div class="clear"></div>
</div>
- <div class="clear"></div>
</div>
{/foreach}
CRM.status({success: '{/literal}{ts escape="js"}Record Deleted{/ts}{literal}'}, request);
}
{/literal}
-</script>
- {else}
-<script type="text/javascript">
- {literal}
- function updateCaseCustom( entityID, groupID, contactID, subType ) {
- var dataURL = {/literal}"{crmURL p="civicrm/case/cd/edit" q="snippet=5&cgcount=1&action=update&reset=1" h=0}"{literal};
- dataURL = dataURL + '&type=Case&entityID=' + entityID + '&groupID=' + groupID + '&cid=' + contactID + ( subType ? '&subType=' + subType : '');
-
- cj.ajax({
- url: dataURL,
- success: function(content) {
- cj('#case_custom_edit').show( ).html(content).dialog({
- title: "{/literal}{ts escape='js'}Update Case Information{/ts}{literal}",
- modal: true,
- width: 680,
- overlay: {
- opacity: 0.5,
- background: "black"
- },
- open: function() {
- var dialog = this;
- cj('#_qf_CustomData_cancel').click(function() {
- cj(dialog).dialog('close');
- return false;
- });
- },
- close: function(event, ui) {
- cj(this).dialog('destroy');
- }
- });
- }
- });
- }
- {/literal}
</script>
{/if}