{% import "base_widget.html" as b %}

{%- macro view(field, name) %}
 <h3>{{ name }}</h3>
 <p><i class="icon-eye-close"></i>********</p>
{%- endmacro %}

{%- macro table_view(name, field, prefix) %}
<i class="icon-eye-close"></i>********
{%- endmacro %}

{%- macro edit(name, field) %}
{{kwargs.____}} {#XXX#}
<div class="control-group {% if field.errors %}error{% endif %}">
  {{ b.label(field, name, **kwargs) }}
  <div class="controls">
  <input {{ b.text_attrs(field, name, **kwargs) }}
      value="{{ field.empty }}" />
  {% if field.errors %}<span class="help-inline">{{ field.errors|join(', ') }}</span>{% endif %}
  {% if field.description %}<span class="help-block">{{ field.description }}</span>{% endif %}
  </div>
</div>
{%- endmacro %}

{%- macro inline_edit(name, field) -%}
<input {{ b.text_attrs(field, name, **kwargs) }} 
   value="{{ field.value or field.empty }}" />
{%- endmacro -%}
