<div class="article_password_title">
  <div class="_first">Join our B2B Partner Zone</div>
  <div class="_second">– enter your email to access marketing materials</div>
</div>
<div class="article-password" id="article-password-<?= $this -> article['id'];?>">
  <div class="row">
    <div class="col-12">
      <p><?= \S::lang( 'ten-artykul-jest-chroniony-podaj-haslo-aby-odblokowac-zawartosc-artykulu' );?></p>
      <form metho="POST" id="form-<?= $this -> article['id'];?>">
        <input type="password" name="password" id="password-<?= $this -> article['id'];?>" required="required">
        <input type="submit" class="btn btn-success" id="submit-<?= $this -> article['id'];?>" value="<?= \S::lang( 'odblokuj' );?>">
      </form>
    </div>
  </div>
</div>
<script class="footer" type="text/javascript">
  $( function()
  {
    $( 'body' ).on( click_event, '#submit-<?= $this -> article['id'];?>', function(e)
    {
      if ( $.trim( $( "#password-<?= $this -> article['id'];?>" ).val() ) !== '' )
      {
        e.preventDefault();

        var password = $( '#password-<?= $this -> article['id'];?>' ).val();

        $.ajax(
        {
          type: 'POST',
          cache: false,
          url: '/ajax.php',
          data:
          {
            a: 'article_unlock',
            password: password,
            article_id: <?= $this -> article['id'];?>
          },
          success: function( data )
          {
            location.reload();
          }
        });
        return false;
      }
    });
  });
</script>