{{ header }}{{ column_left }}
<!-- Content Wrapper. Contains page content -->
<div id="content" class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div>
      <div class="pull-right">
        <a onclick="$('#form').submit();" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary btn-sm"><i class="fa fa-check-circle"></i> {{ button_save }}</a>
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default btn-sm"><i class="fa fa-reply"></i> {{ button_cancel }}</a>
      </div>
      <h1>
        {{ heading_title }}
      </h1>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <ul class="breadcrumb">
          {% for breadcrumb in breadcrumbs %}
          <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
          {% endfor %}
        </ul>
      </div>
    </div>
  </section>

  <!-- Alert -->
  <section class="content-header">
    {% if error_warning %}
    <div class="alert alert-danger alert-dismissible"><i class="fa fa-exclamation-circle"></i> {{ error_warning }}
      <button type="button" class="close" data-dismiss="alert">&times;</button>
    </div>
    {% endif %}
  </section>
  <!-- /.alert -->

  <!-- Main content -->
  <section class="content">

    <!-- Default box -->
    <div class="box">
      <div class="box-header with-border">
        <h3 class="box-title">{{ text_manage }}</h3>

        <div class="box-tools pull-right">
          <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="{{ text_collapse }}">
            <i class="fa fa-minus"></i></button>
        </div>
      </div>
      <div class="box-body">
        <form action="{{ btn_save }}" method="post" enctype="multipart/form-data" id="form" class="form-horizontal">
          <input type="hidden" name="template_id" value="{{ template_id }}" />
            <div class="form-group">
              <label class="col-sm-2 control-label" for="name">{{ entry_template_name }}</label>
              <div class="col-sm-10">
                <input type="text" name="name" value="{{ name }}" placeholder="{{ entry_template_name }}" id="name" class="form-control" />
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 control-label" for="code">{{ entry_template_html }}</label>
              <div class="col-sm-10">
                <textarea name="html" cols="100" rows="100" placeholder="{{ entry_template_html }}" id="code" class="form-control">{{ html }}</textarea>
              </div>
            </div>
        </form>
      </div>
      <!-- /.box-body -->
    </div>
    <!-- /.box -->

  </section>
  <!-- /.content -->
</div>
<!-- /.content-wrapper -->
<style type="text/css"> .CodeMirror {border: 1px solid #888; height:1000px; width:100%;} </style>
<script type="text/javascript"><!--
  var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
    mode: 'text/html',
    autoCloseTags: true,
    lineNumbers: true,
    tabMode: "indent",
    lineWrapping: true,
    indentUnit: 2,
    theme: 'monokai',
    autofocus: true
  });
//--></script>
{{ footer }}
