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

{% block title %}{{ parent() ~ ' - ' ~ "role_edition" | trans({}, "platform") | striptags | raw }} ({{ role.getTranslationKey() | trans({}, "platform") | striptags | raw }}){% endblock %}

{% block breadcrumb %}
    {{
        macros.workspaceBreadcrumbs(
            workspace,
            [
                {
                    'name': 'roles'|trans({}, 'platform'),
                    'href': path('claro_workspace_roles', {'workspace': workspace.getId()})
                },
                {
                    'name': 'edit'|trans({}, 'platform'),
                    'href': ''
                }
            ]
        )
    }}
{% endblock %}

{% block section_content %}
    <div class="panel-heading">
        <h3 class="panel-title">{{ 'role_edition'|trans({}, 'platform') }} ({{ role.getTranslationKey() | trans({}, "platform") }})</h3>
    </div>
    <form role="form"
          class="form-horizontal"
          action="{{ path('claro_workspace_role_edit', {'workspace': workspace.getId(), 'role': role.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>
{% endblock %}
