{% extends "layout.html" %}

{% block content_header %}
  {{ build_breadcrumbs(current_breadcrumbs + [
    { 'name': resource.name, 'link': url_for('.GroupView:get', id=resource.id), 'icon': 'users' }
  ]) }}
{% endblock %}

{% block content %}
  {% call build_section_row() %}
    {% call build_form_box(_('Group'), resource.name, 'users') %}
      {% call build_form(action=url_for('.GroupView:put', id=resource.uuid)) %}
        {% call add_default_fields(form=form, submit_value=_('Update')) %}
          {{ render_field(form.name) }}
          {{ render_field(form.members.user_uuids, data_listing_href=url_for(listing_urls['identity'])) }}
          {{ render_field(form.members.users, with_label=False) }}
          {{ render_field(form.members.policy_uuids, data_listing_href=url_for(listing_urls['policy'])) }}
          {{ render_field(form.members.policies, with_label=False) }}
        {% endcall %}
      {% endcall %}
    {% endcall %}
  {% endcall %}
{% endblock %}
