Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="checkbox"
- name="{$custom_attribute}_checkbox"
- id="{$custom_attribute_id}_source_checkbox"
- {if $custom_attribute_disabled} disabled="disabled"{/if}
- {if $custom_attribute_default|eq( "true" )} checked="checked"{/if} />
- <input type="hidden" name="{$custom_attribute}" value="{if eq( $custom_attribute_default, "" )}false{else}{$custom_attribute_default|wash}{/if}" id="{$custom_attribute_id}_source" />
- <script language="javascript">
- <!--
- jQuery(document).ready(
- function (){ldelim}
- jQuery('#{$custom_attribute_id}_source_checkbox').click(function(){ldelim}
- jQuery('#{$custom_attribute_id}_source').val( $(this).is(':checked') ? 'true' : 'false' );
- {rdelim});
- window.setInterval(function(){ldelim}
- if( jQuery('#{$custom_attribute_id}_source').val() == "true" )
- {ldelim}
- jQuery('#{$custom_attribute_id}_source_checkbox').prop('checked', true);
- {rdelim}
- else
- {ldelim}
- jQuery('#{$custom_attribute_id}_source_checkbox').prop('checked', false);
- {rdelim}
- {rdelim}, 100);
- {rdelim});
- -->
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement