Advertisement
Guest User

extension/ezoe/design/standard/templates/ezoe/customattribut

a guest
Feb 27th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Smarty 1.29 KB | None | 0 0
  1. <input type="checkbox"
  2.       name="{$custom_attribute}_checkbox"
  3.       id="{$custom_attribute_id}_source_checkbox"
  4.       {if $custom_attribute_disabled} disabled="disabled"{/if}
  5.       {if $custom_attribute_default|eq( "true" )} checked="checked"{/if} />
  6.  
  7. <input type="hidden" name="{$custom_attribute}" value="{if eq( $custom_attribute_default, "" )}false{else}{$custom_attribute_default|wash}{/if}" id="{$custom_attribute_id}_source" />
  8.  
  9.  
  10. <script language="javascript">
  11.     <!--
  12.    jQuery(document).ready(
  13.        function (){ldelim}
  14.            jQuery('#{$custom_attribute_id}_source_checkbox').click(function(){ldelim}
  15.                jQuery('#{$custom_attribute_id}_source').val( $(this).is(':checked') ? 'true' : 'false' );
  16.            {rdelim});            
  17.            
  18.  
  19.            window.setInterval(function(){ldelim}
  20.                if( jQuery('#{$custom_attribute_id}_source').val() == "true" )
  21.                {ldelim}
  22.                    jQuery('#{$custom_attribute_id}_source_checkbox').prop('checked', true);
  23.                {rdelim}
  24.                else
  25.                {ldelim}
  26.                    jQuery('#{$custom_attribute_id}_source_checkbox').prop('checked', false);
  27.                {rdelim}
  28.            {rdelim}, 100);
  29.  
  30.        {rdelim});
  31.    -->
  32. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement