File: //home/arjun/projects/buyercall/buyercall/blueprints/user/templates/user/settings_old.jinja2
{% extends 'layouts/backend_old.jinja2' %}
{% if current_user.role == 'partner' %}
{% set dep = 'partnership' %}
{% endif %}
{% if current_user.role == 'admin' %}
{% set dep = 'partnership_account' %}
{% endif %}
{% block title %}My Account Settings{% endblock %}
{% block heading %} Manage your account details {% endblock %}
{% block body %}
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="card">
<div class="card-header card-header-tabs" data-background-color="light-blue">
<div class="nav-tabs-navigation">
<div class="nav-tabs-wrapper">
<span class="nav-tabs-title">Account Settings:</span>
<ul class="nav nav-tabs" data-tabs="tabs">
<li class="active">
<a href="#pill1" data-toggle="tab">
<i class="material-icons">face</i> Profile
<div class="ripple-container"></div>
</a>
</li>
{% if current_user.role != 'agent' %}
<li>
<a href="#pill2" data-toggle="tab">
<i class="material-icons">credit_card</i> Billing
<div class="ripple-container"></div>
</a>
</li>
{% endif %}
{% if current_user.role == 'partner' %}
<li>
<a href="#pill3" data-toggle="tab">
<i class="material-icons">contactless</i> CPaaS API Credentials
<div class="ripple-container"></div>
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
<div class="card-content">
<div class="tab-content">
<div class="tab-pane active" id="pill1">
<h4 class="text-muted margin-bottom">{{ current_user.email }}</h4>
<div class="list-group">
{% if current_user.role in ['partner'] %}
<a class="list-group-item"
href="{{ url_for('partnership.settings') }}">
Update partnership details
</a>
{% endif %}
<a class="list-group-item"
href="{{ url_for('user.update_personaldetails') }}">
Update personal information
</a>
<a class="list-group-item"
href="{{ url_for('user.update_credentials') }}">Update email
and password</a>
<a class="list-group-item"
href="{{ url_for('user.update_locale') }}">
Update language
</a>
<a class="list-group-item"
href="{{ url_for('user.update_security') }}">
Update Additional Account Security Measures
</a>
</div>
</div>
<div class="tab-pane" id="pill2">
{% if current_user.role != 'agent' %}
{% if (dep == 'partnership_account' and current_user[dep].billing_type == 'partnership')
or (dep == 'partnership' and current_user[dep].billing_type == 'account')
or (current_user[dep].billing_type == 'invoice') %}
<div>
{% if dep == 'partnership' %}
Please note that your accounts maintain their own billing and subscriptions.
if you have questions contact BuyerCall support.
{% else %}
Please contact your administrator for any billing questions.
{% endif %}
</div>
{% elif current_user[dep].has_active_subscription and current_user[dep].subscription.plan not in ['invoice', 'partnershipsingle'] %}
<h4 class="text-muted margin-bottom">{{ current_user[dep].subscription.plan | title }}
Subscription Plan -
{{ current_user[dep].subscription.credit_card.brand }}
****{{ current_user[dep].subscription.credit_card.last4 }}
({{ current_user[dep].subscription.credit_card.exp_date.strftime('%m/%Y') }})
</h4>
<div class="list-group">
<a class="list-group-item"
href="{{ url_for('billing.update_payment_method') }}">
Update payment info
</a>
<a class="list-group-item"
href="{{ url_for('billing.billing_history') }}">
Billing details
</a>
<a class="list-group-item"
href="{{ url_for('billing.update') }}">
Change plan
</a>
<a class="list-group-item"
href="{{ url_for('billing.cancel') }}">
<span class="text-muted">Cancel subscription</span>
</a>
</div>
{% elif current_user[dep].subscription.plan == 'invoice' %}
Please note that you are on an invoice plan.
{% elif current_user[dep].subscription.plan == 'partnershipsingle' %}
Please note that you are running a partnership account with single partnership accounts.
If you like more information about your partnership or account please contact our support.
{% else %}
<p class="highlight-module__title">
<h3>Subscribe today</h3>
<h4 class="text-muted margin-bottom">
Why haven't you subscribed yet?
</h4>
<p>Now that you've created an
account, wouldn't it be
unbelievably amazing to unlock everything by becoming a
subscriber today?</p>
<a href="{{ url_for('billing.pricing') }}"
class="btn btn-fill btn-light-blue">Learn more</a>
{% endif %}
{% endif %}
</div>
<div class="tab-pane" id="pill3">
<h4 class="text-muted margin-bottom"> CPaaS API Credentials</h4>
{% if current_user.role in ['partner'] %}
<div class="list-group">
<a class="list-group-item"
href="{{ url_for('partnership.twilio_credentials') }}">
Twilio API Credentials
</a>
<a class="list-group-item"
href="{{ url_for('partnership.bandwidth_credentials') }}">
Bandwidth API Credentials
</a>
</div>
{% else %}
Sorry, you do not have permissions to view this information.
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}