add confirmation disable billing and update other style (#2)
This commit is contained in:
parent
15a794fe97
commit
ea4d6da2cc
4 changed files with 67 additions and 45 deletions
|
@ -16,14 +16,24 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
{% if setting.billing_enabled %}
|
{% if setting.billing_enabled %}
|
||||||
<h1>Billing Enabled</h1> <br/>
|
<div class="panel panel-success">
|
||||||
<a href="{% url 'horizon:admin:billing_setting:disable_billing' %}" class="btn btn-primary">Disable Billing</a>
|
<div class="panel-heading">Status: Billing Enabled</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
<button class="btn btn-danger" data-toggle="modal" data-target="#modal_disable_billing">Disable Billing</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>Billing Disabled</h1> <br/>
|
<div class="panel panel-danger">
|
||||||
<p>Please make sure all price is already configured before enable billing</p>
|
<div class="panel-heading">Status: Billing Disabled</div>
|
||||||
<a href="{% url 'horizon:admin:billing_setting:enable_billing' %}" class="btn btn-primary {% if missing_price.has_missing or missing_setting.has_missing %} disabled {% endif %}">Enable</a>
|
<div class="panel-body">
|
||||||
<a href="{% url 'horizon:admin:billing_setting:reset_billing' %}" class="btn btn-danger">Reset Billing Data</a>
|
<p>Please make sure all price is already configured before enable billing</p>
|
||||||
|
<a href="{% url 'horizon:admin:billing_setting:enable_billing' %}" class="btn btn-primary {% if missing_price.has_missing or missing_setting.has_missing %} disabled {% endif %}">Enable</a>
|
||||||
|
<a href="{% url 'horizon:admin:billing_setting:reset_billing' %}" class="btn btn-danger">Reset Billing Data</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% include "admin/billing_setting/modal_disable_billing.html" with modal_backdrop='static' hide=True %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{% extends "horizon/common/_modal.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block modal_id %}modal_disable_billing{% endblock %}
|
||||||
|
{% block modal_backdrop %}static{% endblock %}
|
||||||
|
{% block modal-header %}{% trans "Confirmation" %}{% endblock %}
|
||||||
|
|
||||||
|
{% block modal-body %}
|
||||||
|
<p>{% trans "Are you sure to disable billing?" %}</p>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block modal-footer %}
|
||||||
|
<a href='#' class='btn btn-danger cancel' data-dismiss='modal'>{% trans "No" %}</a>
|
||||||
|
<a href="{% url 'horizon:admin:billing_setting:disable_billing' %}" class="btn btn-primary">{% trans "Yes" %}</a>
|
||||||
|
{% endblock %}
|
|
@ -6,34 +6,30 @@
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-6">
|
||||||
<dl class="dl-horizontal">
|
<b>Project: </b>
|
||||||
<dt>Project: </dt>
|
<select id="selection" onchange="onSelection(this.value)">
|
||||||
<dd>
|
<option value='null'
|
||||||
<select id="selection" onchange="onSelection(this.value)">
|
{% if not current_tenant_id %}selected {% endif %}
|
||||||
<option value='null'
|
>All</option>
|
||||||
{% if not current_tenant_id %}selected {% endif %}
|
|
||||||
>All</option>
|
|
||||||
|
|
||||||
<option
|
<option
|
||||||
value='{"tenant_id": "0"}'
|
value='{"tenant_id": "0"}'
|
||||||
{% if "0" == current_tenant_id %}selected {% endif %}
|
{% if "0" == current_tenant_id %}selected {% endif %}
|
||||||
>General Notification
|
>General Notification
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
{% for i in select_list %}
|
{% for i in select_list %}
|
||||||
<option
|
<option
|
||||||
value='{"tenant_id": "{{ i.id }}"}'
|
value='{"tenant_id": "{{ i.id }}"}'
|
||||||
{% if i.id == current_tenant_id %}selected {% endif %}
|
{% if i.id == current_tenant_id %}selected {% endif %}
|
||||||
>{{ i.name }}
|
>{{ i.name }}
|
||||||
</option>
|
</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6 text-right">
|
<div class="col-sm-6">
|
||||||
<a href="{% url 'horizon:admin:notification_center:read_all' current_tenant_id %}"
|
<a href="{% url 'horizon:admin:notification_center:read_all' current_tenant_id %}"
|
||||||
class="btn btn-primary" style="margin-bottom: 8px">Mark to Read All</a>
|
class="btn btn-primary pull-right" style="margin-bottom: 8px">Mark to Read All</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
{% block title %}{{ page_title }}{% endblock %}
|
{% block title %}{{ page_title }}{% endblock %}
|
||||||
{% block main %}
|
{% block main %}
|
||||||
<div>
|
<div class="row" style="margin-bottom: 15px;">
|
||||||
<dl class="dl-horizontal">
|
<div class="col-md-6">
|
||||||
<dt>Project: </dt>
|
|
||||||
<dd>
|
<b>Invoice Month</b>
|
||||||
<select id="project_select" onchange="onProjectSelect(this.value)">
|
<select id="project_select" onchange="onProjectSelect(this.value)">
|
||||||
{% for i in project_list %}
|
{% for i in project_list %}
|
||||||
<option
|
<option
|
||||||
value='{"project_id": "{{ i.id }}", "project_name": "{{ i.name }}"}'
|
value='{"project_id": "{{ i.id }}", "project_name": "{{ i.name }}"}'
|
||||||
{% if i.id == current_project_id %}selected {% endif %}
|
{% if i.id == current_project_id %}selected {% endif %}
|
||||||
>{{ i.name }}</option>
|
>{{ i.name }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</dd>
|
</div>
|
||||||
</dl>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ table.render }}
|
{{ table.render }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
|
Loading…
Add table
Reference in a new issue