{if $blockName eq 'website' || $blockName eq 'im' || $blockName eq 'phone' }
{$form.type.$blockName.$blockId.typeTypeId.html}
{/if}
-
+
{* Display the overwrite/add/add new label *}
<span id="main_{$blockName}_{$blockId}_overwrite">
{if $row.main}
if (!locTypeId) { locTypeId = 0; }
var block = eval( "allBlock.main_" + blockname + "_" + locTypeId + "_" + typeTypeId);
}
-
+
// Create appropriate label / add new link after changing the block
if (!block) {
block = '';
}
label += '<br>';
}
-
+
CRM.$( "#main_" + blockname + "_" + blockId ).html( block );
CRM.$( "#main_" + blockname + "_" + blockId + "_overwrite" ).html( label );
}
});
$('table td input.form-checkbox').each(function() {
- var ele = null;
- var element = $(this).attr('id').split('_',3);
-
- switch ( element['1'] ) {
- case 'addressee':
- ele = '#' + element['0'] + '_' + element['1'];
- break;
-
- case 'email':
- case 'postal':
- ele = '#' + element['0'] + '_' + element['1'] + '_' + element['2'];
- break;
- }
+ var ele = null;
+ var element = $(this).attr('id').split('_',3);
+
+ switch ( element['1'] ) {
+ case 'addressee':
+ ele = '#' + element['0'] + '_' + element['1'];
+ break;
+
+ case 'email':
+ case 'postal':
+ ele = '#' + element['0'] + '_' + element['1'] + '_' + element['2'];
+ break;
+ }
- if( ele ) {
+ if( ele ) {
$(this).on('click', function() {
var val = $(this).prop('checked');
$('input' + ele + ', input' + ele + '_custom').prop('checked', val);
});
- }
+ }
});
// Show/hide matching data rows