mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 10:59:00 +00:00
from Developer invitation to user invitation
This commit is contained in:
parent
a916dd030d
commit
6601a3c934
@ -13,7 +13,7 @@ USER_CURRENT = "/users/current"
|
||||
|
||||
def api_root(request):
|
||||
"""Returns the configured API_ROOT"""
|
||||
return {'API_ROOT': settings.API_ROOT}
|
||||
return {'API_ROOT': settings.API_ROOT['v500']}
|
||||
|
||||
|
||||
def portal_page(request):
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
<hr class="dropdown-hr">
|
||||
<li {% ifequal request.path url_users_detail %} class="active" {% endifequal %}><a href="{{ url_users_detail }}">{% trans "My User" %}</a></li>
|
||||
<hr class="dropdown-hr">
|
||||
<li {% ifequal request.path my_user_invitation %} class="active" {% endifequal %}><a href="{{ my_user_invitation }}">{% trans "Invite Developer" %}</a></li>
|
||||
<li {% ifequal request.path my_user_invitation %} class="active" {% endifequal %}><a href="{{ my_user_invitation }}">{% trans "Invite User" %}</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
{% url "api-metrics" as api_metrics_url %} {% url "connector-metrics" as connector_metrics_url %} {% url "metrics-summary" as metrics_summary_url %}
|
||||
|
||||
@ -36,6 +36,12 @@ class AddEntitlementForm(forms.Form):
|
||||
super(AddEntitlementForm, self).__init__(*args, **kwargs)
|
||||
|
||||
class CreateInvitationForm(forms.Form):
|
||||
|
||||
USER_CHOICE = (
|
||||
('', _('Any')),
|
||||
('DEVELOPER', 'DEVELOPER'),
|
||||
('CUSTOMER', 'CUSTOMER'),
|
||||
)
|
||||
bank_id = forms.ChoiceField(
|
||||
label=_('Bank'),
|
||||
widget=forms.Select(
|
||||
@ -93,14 +99,15 @@ class CreateInvitationForm(forms.Form):
|
||||
),
|
||||
required=True,
|
||||
)
|
||||
purpose = forms.CharField(
|
||||
purpose = forms.ChoiceField(
|
||||
label=_('Purpose'),
|
||||
widget=forms.TextInput(
|
||||
choices=USER_CHOICE,
|
||||
widget=forms.Select(
|
||||
attrs={
|
||||
'placeholder': _('For the Bank App'),
|
||||
'class': 'form-control',
|
||||
}
|
||||
),
|
||||
initial='',
|
||||
required=False,
|
||||
)
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div id="user-invitation">
|
||||
<h1>{% trans "Invite Developer" %}</h1>
|
||||
<h1>{% trans "Invite User" %}</h1>
|
||||
|
||||
<form action="{% url 'my-user-invitation' %}" method="post">
|
||||
{% csrf_token %}
|
||||
@ -42,25 +42,34 @@
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
{% if form.email.errors %}<div class="alert alert-danger">{{ form.email.errors }}</div>{% endif %}
|
||||
<div class="form-group">
|
||||
<strong>{% trans "email" %} </strong>
|
||||
<strong>{% trans "Email" %} </strong>
|
||||
{{ form.email }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
{% if form.company.errors %}<div class="alert alert-danger">{{ form.company.errors }}</div>{% endif %}
|
||||
<div class="form-group">
|
||||
<strong>{% trans "company" %} </strong>
|
||||
<strong>{% trans "Company" %} </strong>
|
||||
{{ form.company }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
{% if form.country.errors %}<div class="alert alert-danger">{{ form.country.errors }}</div>{% endif %}
|
||||
<div class="form-group">
|
||||
<strong>{% trans "country" %} </strong>
|
||||
<strong>{% trans "Country" %} </strong>
|
||||
{{ form.country }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
{% if form.purpose.errors %}<div class="alert alert-danger">{{ form.purpose.errors }}</div>{% endif %}
|
||||
<div class="form-group">
|
||||
<strong>{% trans "Purpose" %} </strong>
|
||||
{{ form.purpose }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="submit" value='{% trans "Create" %}' class="btn btn-primary btn-green" />
|
||||
<div class="table-responsive">
|
||||
@ -69,9 +78,9 @@
|
||||
<th scope="col">{% trans "First Name" %}</th>
|
||||
<th scope="col">{% trans "Last Name" %}</th>
|
||||
<th scope="col">{% trans "Email" %}</th>
|
||||
<th scope="col">{% trans "company" %}</th>
|
||||
<th scope="col">{% trans "country" %}</th>
|
||||
<th scope="col">{% trans "status" %}</th>
|
||||
<th scope="col">{% trans "Company" %}</th>
|
||||
<th scope="col">{% trans "Country" %}</th>
|
||||
<th scope="col">{% trans "Status" %}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for invitation in invitations %}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user