<%= render '/shared/errors_list', error_object: setting %>
<div class="row">
  <div class="col-md-12">
     <div class="form-group">
       <%= form.label :disclaimer_clause %>
       <%= form.text_area :disclaimer_clause, class: 'form-control', placeholder: 'Klauzula o wyłączeniu odpowiedzialności' %>
     </div>
     <div class="form-group">
      <%= form.label :privacy_policy %>
      <%= form.text_area :privacy_policy, class: 'form-control', placeholder: 'Polityka prywatności' %>
     </div>
     <div class="form-group">
     <%= form.label :statute %>
     <%= form.text_area :statute, class: 'form-control', placeholder: 'Regulamin' %>
     </div>
  </div>

</div>
<div class="card-footer">
  <button type="submit" class="btn btn-primary">Zapisz</button>
</div>
<script type="text/javascript">
  $( document ).ready(function() {
    tinymce.remove('#setting_disclaimer_clause');
    tinymce.remove('#setting_privacy_policy');
    tinymce.remove('#setting_statute');
    tinymce.init({
      selector: '#setting_disclaimer_clause',
      height: 500,
      menubar: false,
      plugins: [
        'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
        'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
        'insertdatetime', 'media', 'table', 'code', 'wordcount'
      ],
      toolbar: 'undo redo | blocks | ' +
      'bold italic backcolor | alignleft aligncenter ' +
      'alignright alignjustify | bullist numlist outdent indent | ' +
      'removeformat link | table tableinsertdialog tablecellprops tableprops advtablerownumbering',
      content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
      language: 'pl'
    });

    tinymce.init({
      selector: '#setting_statute',
      height: 500,
      menubar: false,
      plugins: [
        'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
        'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
        'insertdatetime', 'media', 'table', 'code', 'wordcount'
      ],
      toolbar: 'undo redo | blocks | ' +
      'bold italic backcolor | alignleft aligncenter ' +
      'alignright alignjustify | bullist numlist outdent indent | ' +
      'removeformat link | table tableinsertdialog tablecellprops tableprops advtablerownumbering',
      content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }',
      language: 'pl'
    });

    tinymce.init({
      selector: '#setting_privacy_policy',
      height: 500,
      menubar: false,
      plugins: [
        'advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'preview',
        'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen',
        'insertdatetime', 'media', 'table', 'code', 'wordcount'
      ],
      toolbar: 'undo redo | blocks | ' +
      'bold italic backcolor | alignleft aligncenter ' +
      'alignright alignjustify | bullist numlist outdent indent | ' +
      'removeformat link | table tableinsertdialog tablecellprops tableprops advtablerownumbering',
      content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
    });
  });
</script>
