{% macro render_field(field) %}
  <div class="control-group">
    {{ field.label(class="control-label") }}
    <div class="controls">
      {{ field(**kwargs)|safe }}
      {% if field.errors %}
      <div class="label label-important">
        {% for error in field.errors %}
        <span>{{ error }}</span>
        {% endfor %}
      </div>
      {% endif %}
    </div>
  </div>
{% endmacro %}

{% macro render_controls(form, destination) %}
  <div class="control-group">
    <div class="controls">
      <input name="action_save" type="submit" class="btn btn-primary" value="Save changes">
      {% if form.next.data %}
      {% set next_val = form.next.data %}
      {% else %}
      {% set next_val = url_for(destination) %}
      {% endif %}
      <a href="{{ next_val }}" name="cancel" class="btn btn-danger">Cancel</a>
    </div>
  </div>
{% endmacro %}

{% macro render_field(field) %}
  <div class="control-group">
    {{ field.label(class="control-label") }}
    <div class="controls">
      {{ field(**kwargs)|safe }}
      {% if field.errors %}
      <div class="label label-important">
        {% for error in field.errors %}
        <span>{{ error }}</span>
        {% endfor %}
      </div>
      {% endif %}
    </div>
  </div>
{% endmacro %}

{% macro render_controls(form, destination) %}
  <div class="form-actions">
    <input name="action_save" type="submit" class="btn btn-primary" value="Save changes">
    {% if form.next.data %}
    {% set next_val = form.next.data %}
    {% else %}
    {% set next_val = url_for(destination) %}
    {% endif %}
    <a href="{{ next_val }}" name="cancel" class="btn btn-danger">Cancel</a>
  </div>
{% endmacro %}

Use bootstrap 'form-actions' for save and cancel.
Use bootstrap 'form-actions' for save and cancel.
