{% extends "base.html" %}

{% block title %}Create entry{% endblock %}

{% block content_title %}Create entry{% endblock %}

{% block content %}
  <form action="{{ url_for('create') }}" class="form-horizontal" method="post">
    <div class="form-group">
      <label for="title" class="col-sm-2 control-label">Title</label>
      <div class="col-sm-10">
        <input class="form-control" id="title" name="title" type="text" value="{{ request.form.get('title', '') }}">
      </div>
    </div>
    <div class="form-group">
      <label for="Content" class="col-sm-2 control-label">Content</label>
      <div class="col-sm-10">
        <textarea class="form-control" id="content" name="content" style="height: 300px;">{{ request.form.get('content', '') }}</textarea>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <div class="checkbox">
          <label>
            <input name="published" type="checkbox" value="y"> Published?
          </label>
        </div>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
        <button class="btn btn-primary" type="submit">Create</button>
        <a class="btn btn-default" href="{{ url_for('index') }}">Cancel</a>
      </div>
    </div>
  </form>
{% endblock %}
