<%page args="path"/>
% if form.errors:
    <div class="alert alert-error">
    ${form.errors}
    </div>
% endif
<form class="form-horizontal" action="${path}" method="POST">
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf_token}" />
<fieldset>
% if form.non_field_errors():
    <div class="alert alert-error">
        <a class="close" data-dismiss="alert">&times;</a>
        % for non_field_error in form.non_field_errors:
             ${ non_field_error }
        % endfor
    </div>
% endif

% for field in form.hidden_fields():
    ${ field }
% endfor

% for field in form.visible_fields():
   <%include file="/common/field.html" args="field=field"/>
% endfor

<div class="control-group">
    <div class="controls">
        <input type="submit" value="Save" class="btn btn-primary">
    </div>
</div>
</fieldset>
</form>