{% extends 'ClarolineCoreBundle:Workspace:layout.html.twig' %}

{% block title %}{{ parent() ~ ' - ' ~ "role_creation" | trans({}, "platform") | striptags | raw }}{% endblock %}

{% block breadcrumb %}
    {{
        macros.workspaceBreadcrumbs(
            workspace,
            [
                {
                    'name': 'roles'|trans({}, 'platform'),
                    'href': path('claro_workspace_roles', {'workspace': workspace.getId()})
                },
                {
                    'name': 'creation'|trans({}, 'platform'),
                    'href': ''
                }
            ]
        )
    }}
{% endblock %}
{% block section_content %}
    <div class="panel-heading">
        <h3 class="panel-title">{{ 'role_creation'|trans({}, 'platform') }}</h3>
    </div>
    <div class="panel-body">
        <div class="alert alert-info">
            {{ 'tool_roles_create_directory'|trans({}, 'platform') }}
        </div>
        <form role="form"
              class="form-horizontal"
              action="{{ path('claro_workspace_role_create', {'workspace': workspace.getId()} ) }}"
              method="post" {{ form_enctype(form) }}
              id="workspace-role-creation">
            <div class="panel-body">
                {{ form_widget(form) }}
            </div>
            <div class="panel-footer">
                <button type="submit" class="btn btn-primary">{{ 'ok'|trans({}, 'platform') }}</button>
                <a class="btn btn-default" href="{{ path('claro_workspace_roles', {'workspace': workspace.getId()}) }}" role="button">
                    {{ 'cancel'|trans({}, 'platform') }}
                </a>
                </div>
        </form>
    </div>

{% endblock %}
