{{ header }}{{ column_left }}
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <div class="pull-right">
        <a onclick="$('#form').submit();" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-check-circle"></i></a>
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default"><i class="fa fa-reply"></i></a>
      </div>
      <h1>{{ heading_title }}</h1>
      <ul class="breadcrumb">
        {% for breadcrumb in breadcrumbs %}
        <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
        {% endfor %}
      </ul>
    </div>
  </div>
  <div class="container-fluid">
	{% 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 %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-list"></i> {{ text_manage }}</h3>
      </div>
      <div class="panel-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>
    </div>
  </div>
</div>
<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 }}
