Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-06-30-11-58-01
[civicrm-core.git] / templates / CRM / UF / Form / Field.tpl
index 8eb895eee16b3ec51aa8993ac13f3015d266d157..02f4572378a4595b919225e1a878fcfb27061cb6 100644 (file)
@@ -1,8 +1,8 @@
 {*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -34,7 +34,7 @@
   <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
   <table class="form-layout-compressed">
     <tr class="crm-uf-field-form-block-field_name">
-      <td class="label">{$form.field_name.label}</td>
+      <td class="label">{$form.field_name.label} {help id='field_name_0'}</td>
       <td>{$form.field_name.html}<br />
         <span class="description">&nbsp;{ts}Select the type of CiviCRM record and the field you want to include in this Profile.{/ts}</span></td>
     </tr>
@@ -96,13 +96,13 @@ var otherModule = new Array( );
 otherModule[{/literal}{$mkey}{literal}] = '{/literal}{$mval}{literal}';
 {/literal}{/foreach}{literal}
 
-cj(function($) {
+CRM.$(function($) {
   if ( $.inArray( "Profile", otherModule ) > -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
     $('#profile_visibility').show();
   }
   else if( $.inArray( "Search Profile", otherModule ) > -1 ){
     $('#profile_visibility').show();
-    $("#in_selector").attr('checked',true);
+    $("#in_selector").prop('checked',true);
   }
   else if( $.inArray( "Profile", otherModule ) == -1 && $.inArray( "Search Profile", otherModule ) == -1 ){
     $('#profile_visibility').hide();
@@ -182,10 +182,10 @@ function showHideSeletorSearch() {
   if (cj("#visibility").val() == "User and User Admin Only") {
     is_search.hide();
     in_selector.hide();
-    cj("#is_searchable").attr('checked',false);
+    cj("#is_searchable").prop('checked',false);
   }
   else {
-    if (!cj("#is_view").attr('checked')) {
+    if (!cj("#is_view").prop('checked')) {
       is_search.show();
     }
     var fldName = cj("#field_name_1").val();
@@ -202,7 +202,7 @@ cj("#field_name_1").bind( 'change blur', function( ) {
   showHideSeletorSearch( );
 });
 
-cj( function( ) {
+CRM.$(function($) {
   cj("#field_name_1").addClass( 'huge' );
   viewOnlyShowHide( );
   cj("#is_view").click( function(){
@@ -216,7 +216,7 @@ cj("#field_name_1").change(
     multiSummaryToggle(cj(this).val());
   });
 
-cj( function( ) {
+CRM.$(function($) {
   var fieldId = cj("#field_name_1").val();
   multiSummaryToggle(fieldId);
 });
@@ -236,7 +236,7 @@ function multiSummaryToggle(customId) {
         }
         else {
           if (cj('#is_multi_summary').is(':checked')) {
-            cj('#is_multi_summary').removeAttr('checked');
+            cj('#is_multi_summary').prop('checked', false);
           }
           cj('.crm-uf-field-form-block-is_multi').hide();
         }
@@ -245,7 +245,7 @@ function multiSummaryToggle(customId) {
   }
   else {
     if (cj('#is_multi_summary').is(':checked')) {
-      cj('#is_multi_summary').removeAttr('checked');
+      cj('#is_multi_summary').prop('checked', false);
     }
     cj('.crm-uf-field-form-block-is_multi').hide();
   }
@@ -253,9 +253,9 @@ function multiSummaryToggle(customId) {
 
 function viewOnlyShowHide() {
   var is_search = cj('#is_search_label, #is_search_html');
-  if (cj("#is_view").attr('checked')) {
+  if (cj("#is_view").prop('checked')) {
     is_search.hide();
-    cj("#is_searchable").attr('checked', false);
+    cj("#is_searchable").prop('checked', false);
   }
   else if (cj("#visibility").val() != "User and User Admin Only")  {
     is_search.show();
@@ -306,6 +306,3 @@ function verify( ) {
 
 </script>
 {/literal}
-
-{* include jscript to warn if unsaved form field changes *}
-{include file="CRM/common/formNavigate.tpl"}