<%= form_tag({controller: '/ps_admin/settings', action: :home_page_update}, remote: true) do %>
  <div class="box box-warning box-solid">
    <div class="box-header with-border">
      <i class="fa fa-home"></i>
      <h3 class="box-title">Strona tytułowa: <b>Uwaga</b></h3>
    </div>
    <div class="box-body">
      <div class="form-group">
        <%= text_area :sc_setting, :index_page_first_info, class: 'summernote' %>
      </div>
    </div>
    <div class="box-footer">
      <%= submit_tag 'Zapisz', class: "btn btn-primary" %>
    </div>
  </div>
  <div class="box box-info box-solid">
    <div class="box-header with-border">
      <i class="fa fa-home"></i>
      <h3 class="box-title">Strona tytułowa: <b>Aktualności</b></h3>
    </div>
    <div class="box-body">
      <div class="form-group">
        <%= text_area :sc_setting, :index_page_second_info, class: 'summernote' %>
      </div>
    </div>
    <div class="box-footer">
      <%= submit_tag 'Zapisz', class: "btn btn-primary" %>
    </div>
  </div>
  <div class="box box-success box-solid">
    <div class="box-header with-border">
      <i class="fa fa-home"></i>
      <h3 class="box-title">Strona tytułowa: <b>Informacje ogólne</b></h3>
    </div>
    <div class="box-body">
      <div class="form-group">
        <%= text_area :sc_setting, :index_page_content, class: 'summernote' %>
      </div>
    </div>
    <div class="box-footer">
      <%= submit_tag 'Zapisz', class: "btn btn-primary" %>
    </div>
  </div>
<% end %>
<script>
  $(document).ready(function() {
    $('.summernote').summernote({
      height: 300,
      tabsize: 2,
      lang: 'pl-PL',
      toolbar: [
        ['style'],
        ['style', ['bold', 'italic', 'underline', 'hr', 'strikethrough', 'clear', 'fontname', 'superscript', 'subscript']],
        ['fontsize', ['fontsize']],
        ['color', ['color']],
        ['para', ['ul', 'ol', 'paragraph']],
        ['insert', ['picture', 'link', 'video']],
        ['table', ['table']],
        ["view", ["fullscreen", "codeview"]],
        ['height', ['height']],
        ['history', ['undo', 'redo']],
        ['help', ['help']]
      ]
    });
  });
</script>
