{extends file="[shared]/window.tpl"}
{block title}
   {'title'|translate}
{/block}

{block size}
   width = 1200;
{/block}

{block tabs}
   {windowTab id="settings" label=$body.language|capitalize|cat:': Nastavení'}
   {windowTab id="seo" label=$body.language|capitalize|cat:': SEO'}
   {windowTab id="billing" label=$body.language|capitalize|cat:': Fakturační údaje'}
   {windowTab id="analytics" label=$body.language|capitalize|cat:': Měřící kódy'}
{/block}

{block tabsContent}
   <div id="settings" class="tab-pane fade active in boxStatic">
      {include "window/languagesSettings.settings.tpl"}
   </div>
   <div id="seo" class="tab-pane fade active in boxStatic">
      {include "window/languagesSettings.seo.tpl"}
   </div>
   <div id="billing" class="tab-pane fade boxStatic">
      {include "window/languagesSettings.billing.tpl"}
   </div>
   <div id="analytics" class="tab-pane fade boxStatic">
      {include "window/languagesSettings.analytics.tpl"}
   </div>
{/block}

{block buttonsLeft}
   <div class="col-md-4">
   </div>
{/block}


<script type="text/javascript">
   {block onready append}
   $('[data-settings-wrapper] .h4').append('<button type="button" class="btn pull-right btn-sm btn-text" data-copy-settings>Zkopírovat z globálního nastavení</button>');

   $('body').on('click', '[data-copy-settings]', function () {
      $inputs = $(this).closest('[data-settings-wrapper]').find("input, textarea").filter(function () {
         return $(this).attr('placeholder');
      });

      $inputs.each(function () {
         $(this).val($(this).attr('placeholder'));
      })

   });
   {/block}
</script>
