Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
131 lines (118 sloc) 5.38 KB
{% extends "saas/base_dashboard.html" %}
<!-- User Roles Page -->
{% block saas_title %}
{% trans %}Accessible by {{user}}{% endtrans %}
{% endblock %}
{% block saas_content %}
<role-profile-list inline-template id="accessible-list-container">
<div>
<!-- Add a User to Organization -->
<div class="container">
<div class="row pt-3">
<div class="col-md-6">
<user-typeahead @item-save="save" :url="typeaheadUrl" inline-template>
<form id="add-profile" class="form-inline" @submit.prevent="submit">
<div class="w-100">
<input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}">
<div class="form-group mb-0" data-trip data-trip-index="2" data-trip-content="<p>{% trans %}Start typing the name or email of the profile you want access to.{% endtrans %}</p>" data-trip-position="s">
<!-- Text and Button Input -->
<div class="input-group w-100">
<input type="text" id="userTypeahead" name="organization" autocomplete="off" class="form-control" placeholder="{% trans %}Name or e-mail{% endtrans %}" aria-label="Recipient's username" aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="submit">{% trans %}Add Profile{% endtrans %}</button>
</div>
</div>
</div>
<uiv-typeahead v-model="itemSelected" target="#userTypeahead" :async-function="getUsers" item-key="slug" :open-on-focus="false" class="typeahead-dropdown" />
</div>
</form>
</user-typeahead>
</div>
</div>
<div class="row">
<div class="col-md-12">
<hr />
</div>
</div>
</div>
<!-- Start Filter/Match Input -->
<div class="container">
<div class="row">
<div class="col-md-6">
{% include "saas/_filter_match.html" %}
</div>
</div>
</div>
<!-- End Filter/Match Input -->
<div class="container pb-4">
<div class="row">
<div class="col-md-12 py-5 my-5" v-show="!itemsLoaded">
<h3 class="text-center"><i class="fa fa-refresh fa-spin fa-2x"></i></h3>
</div>
<div class="col-md-12" v-show="itemsLoaded && items.results.length == 0" v-cloak>
<p class="text-muted mt-2">{% trans %}There are currently no items here. Would you like to create some?{% endtrans %}</p>
</div>
</div>
<div class="row mt-4" infinite-wrapper>
<div class="col-md-3 mb-3" v-for="(item, index) in items.results" v-show="itemsLoaded && items.results.length > 0" v-cloak>
{% include "saas/_organization_card.html" %}
</div>
</div>
</div>
<!-- Start Pagination -->
{% include "_pagination.html" %}
<!-- End Pagination -->
<!-- Modal Dialogs -->
<!-- Modal Dialog to add a request to add a role to a user on an organization. -->
<div class="add-role-modal modal fade" tabindex="-1" role="dialog"
aria-labelledby="{% trans %}Request access{% endtrans %}" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans %}Request access{% endtrans %} ...</h5>
<button type="button" class="close"
data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<form>
<div class="modal-body">
<p class="text-danger">
{% trans full_name='[[unregistered.full_name]]', site=site.printable_name %}{{full_name}} was not found. This is an opportunity to invite a profile manager for {{full_name}} to join {{site}}.{% endtrans %}
</p>
<div class="form-group" style="margin-bottom: 15px;">
<label>{% trans %}To{% endtrans %}</label>
<input id="new-request-email" class="email form-control"
name="email" type="text"
max-length="150" placeholder="invitee@example.com"
style="width:100%;" autofocus
v-model="unregistered.email" />
</div>
<div class="form-group">
<div class="controls">
<label>{% trans %}The following invite message will be sent:{% endtrans %}</label>
<textarea class="form-control"
name="message"
maxlength="255" type="text" rows="10">
{% trans organization_name="[[unregistered.full_name]]", user=request.user.first_name %}Hello,
I would like to request access to {{organization_name}}
Thank you,
- {{user}}{% endtrans %}
</textarea>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button"
class="btn btn-secondary"
data-dismiss="modal">{% trans %}Cancel{% endtrans %}</button>
<button type="submit"
class="btn btn-primary"
data-dismiss="modal"
@click="create">{% trans %}Request access{% endtrans %}</button>
</div>
</form>
</div>
</div>
</div>
</div>
</role-profile-list>
{% endblock %}
You can’t perform that action at this time.