Merge pull request #410 from tiwariav/task/3354/modal_restyling
task/3354/modal_restyling
This commit is contained in:
commit
7ffcc18378
5 changed files with 192 additions and 78 deletions
|
@ -2,19 +2,18 @@
|
|||
{% load i18n %}
|
||||
|
||||
<div class="modal fade bs-example-modal-sm" style="color:black;" id="successModal" tabindex="-1" role="dialog">
|
||||
<div class="vertical-alignment-helper">
|
||||
<div class="modal-dialog vertical-align-center">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">{% trans "Request Sent" %}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{% trans "Thank you for your subscription! You will receive a confirmation mail from our team" %}</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-icon"><i class="fa fa-check" aria-hidden="true"></i></div>
|
||||
<h4 class="modal-title">{% trans "Request Sent" %}</h4>
|
||||
<p class="modal-text">{% trans "Thank you for your subscription! You will receive a confirmation mail from our team" %}</p>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
<script>
|
||||
// Show modal
|
||||
|
@ -22,7 +21,7 @@
|
|||
// close the modal after 3 seconds
|
||||
setTimeout(function() {
|
||||
$('#successModal').modal('hide');
|
||||
}, 5000);
|
||||
}, 5000);
|
||||
</script>
|
||||
<style>
|
||||
.vertical-alignment-helper {
|
||||
|
|
|
@ -1,22 +1,23 @@
|
|||
.dashboard-container {
|
||||
padding-top:70px; padding-bottom: 70px;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
max-width: 768px;
|
||||
padding-top:70px;
|
||||
padding-bottom: 70px;
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
max-width: 768px;
|
||||
}
|
||||
|
||||
.content-dashboard{
|
||||
min-height: 100vh;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
max-width: 1120px;
|
||||
min-height: 100vh;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
max-width: 1120px;
|
||||
}
|
||||
.container-table{
|
||||
margin-top: 35px;
|
||||
overflow-y: hidden;
|
||||
margin-top: 35px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
.container-table table{
|
||||
overflow-y: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.borderless td {
|
||||
border: none !important;
|
||||
|
@ -36,25 +37,143 @@
|
|||
}
|
||||
|
||||
.space-above {
|
||||
margin-top: 4%;
|
||||
margin-top: 4%;
|
||||
}
|
||||
|
||||
.space-above-big {
|
||||
margin-top: 20%;
|
||||
margin-top: 20%;
|
||||
}
|
||||
|
||||
.table>tbody>tr>td{
|
||||
vertical-align: middle;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.fa-separate{
|
||||
margin-right: 15px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
@media (max-width: 540px) {
|
||||
select {
|
||||
width: 280px;
|
||||
width: 280px;
|
||||
}
|
||||
.content-dashboard {
|
||||
width: 90%;
|
||||
}
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
/***********Styles for Model********************/
|
||||
.modal-content {
|
||||
border-radius: 0px;
|
||||
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
width: 100%;
|
||||
float: left;
|
||||
border-radius: 0;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
min-height: 25px;
|
||||
}
|
||||
|
||||
.modal-header .close {
|
||||
font-size: 75px;
|
||||
font-weight: 300;
|
||||
margin-top: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.modal-header .close:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
border-bottom: 0px solid #e5e5e5;
|
||||
padding: 0px 15px;
|
||||
width: 100%;
|
||||
}
|
||||
.modal-body {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
float: left;
|
||||
padding: 0px 30px 15px 30px;
|
||||
}
|
||||
.modal-body .modal-icon i {
|
||||
font-size: 80px;
|
||||
font-weight: 100;
|
||||
color: #999;
|
||||
}
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
line-height: 1.42857143;
|
||||
font-size: 25px;
|
||||
padding: 0;
|
||||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
.modal-text {
|
||||
padding-top: 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.modal-footer {
|
||||
border-top: 0px solid #e5e5e5;
|
||||
width: 100%;
|
||||
float: left;
|
||||
text-align: center;
|
||||
padding: 15px 15px;
|
||||
}
|
||||
.modal-footer button[type="submit"] {
|
||||
min-width: 80px;
|
||||
}
|
||||
@media (min-width: 1300px) {
|
||||
.modal-dialog {/* top: 30%; */width: 35%;}
|
||||
}
|
||||
@media (max-width: 1299px) {
|
||||
.modal-dialog {
|
||||
/* top: 20%; */
|
||||
width: 43%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.modal-dialog {
|
||||
/* top: 20%; */
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.modal-dialog {
|
||||
/* top: 30%; */
|
||||
width: 90%;
|
||||
margin: 0 auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ========= */
|
||||
@media(min-width: 320px) {
|
||||
.modal:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle;
|
||||
margin-right: -4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.modal-dialog {
|
||||
/* width: 520px; */
|
||||
margin: 15px auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
|
@ -52,16 +52,13 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do You want to delete your order?"%}</h4>
|
||||
<div class="modal-icon"><i class="fa fa-trash" aria-hidden="true"></i></div>
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do you want to delete your order?"%}</h4>
|
||||
|
||||
<form method="post"
|
||||
action="{% url 'hosting:delete_order' order.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
{% trans "Close"%}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Delete"%}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -71,7 +68,6 @@
|
|||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% extends "hosting/base_short.html" %}
|
||||
{% load staticfiles bootstrap3 i18n %}
|
||||
{% block content %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<div class="container virtual-machine-container dashboard-container ">
|
||||
<div class="row">
|
||||
|
@ -18,26 +18,26 @@
|
|||
<a class="btn btn-success" href="{% url 'hosting:create_ssh_key' %}" >{% trans "Add Key"%} </a>
|
||||
</p>
|
||||
<h5> Use your created key to access to the machine. If you lost it, contact us. </h5>
|
||||
<table class="table borderless table-hover">
|
||||
<table class="table borderless table-hover">
|
||||
<br/>
|
||||
<thead>
|
||||
<tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans "Name"%}</th>
|
||||
<th>{% trans "Created at"%} </th>
|
||||
<th>{% trans "Status"%} </th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
{% for user_key in keys %}
|
||||
<tr>
|
||||
<td scope="row">{{user_key.name}}</td>
|
||||
<tr>
|
||||
<td scope="row">{{user_key.name}}</td>
|
||||
|
||||
<td><span id="ssh-created_at-{{user_key.id}}">{{user_key.created_at|date:'Y-m-d H:i' }}</span></td>
|
||||
<td><span id="ssh-created_at-{{user_key.id}}">{{user_key.created_at|date:'Y-m-d H:i' }}</span></td>
|
||||
<td>
|
||||
<span class="h3 label label-success"><strong>Active</strong></span>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-default" data-toggle="modal"
|
||||
data-target="#Modal{{ user_key.id }}"><a
|
||||
href="#">{% trans "Delete Key"%}</a>
|
||||
|
@ -53,16 +53,13 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Do You want to delete this key?"%}</h4>
|
||||
|
||||
<div class="modal-icon"><i class="fa fa-trash" aria-hidden="true"></i></div>
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Delete SSH Key"%}</h4>
|
||||
<p class="modal-text">{% trans "Do You want to delete this key?"%}</p>
|
||||
<form method="post" action="{% url 'hosting:delete_ssh_key' user_key.id %}">
|
||||
{% csrf_token %}
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
{% trans "Close"%}
|
||||
</button>
|
||||
<button type="submit" class="btn btn-primary">{% trans "Delete"%}
|
||||
<button type="submit" class="btn btn-danger">{% trans "Delete"%}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -73,7 +70,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
@ -84,21 +81,20 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
{% if next_url %}
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
window.location.href = '{{next_url}}';
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
window.onload = function () {
|
||||
{% for user_key in keys %}
|
||||
// var locale_date = new Date(document.getElementById("ssh-created_at-{{user_key.id}}").textContent).toISOString();
|
||||
var locale_date = moment.utc(document.getElementById("ssh-created_at-{{user_key.id}}").textContent,'YYYY-MM-DD HH:mm').toDate();
|
||||
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
|
||||
document.getElementById('ssh-created_at-{{user_key.id}}').innerHTML = locale_date;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{% load staticfiles bootstrap3 %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
{% block content %}
|
||||
<div>
|
||||
<div class="virtual-machine-container dashboard-container ">
|
||||
<div class="row">
|
||||
|
@ -46,19 +46,19 @@
|
|||
<button type="link"
|
||||
data-clipboard-text="{{virtual_machine.ipv4}}" id="copy_vm_id" class="to_copy btn btn-link"
|
||||
data-toggle="tooltip" data-placement="bottom" title="Copied" data-trigger="click">
|
||||
Ipv4: {{virtual_machine.ipv4}} <i class="fa fa-files-o" aria-hidden="true"></i>
|
||||
Ipv4: {{virtual_machine.ipv4}} <i class="fa fa-files-o" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button type="link"
|
||||
data-clipboard-text="{{virtual_machine.ipv6}}" id="copy_vm_id" class="to_copy btn btn-link"
|
||||
data-toggle="tooltip" data-placement="bottom" title="Copied" data-trigger="click">
|
||||
Ipv6: {{virtual_machine.ipv6}} <i class="fa fa-files-o" aria-hidden="true"></i>
|
||||
Ipv6: {{virtual_machine.ipv6}} <i class="fa fa-files-o" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
{% else %}
|
||||
|
||||
<div class="pull-right right-place">
|
||||
<span class="label label-warning"><strong>{% trans "Ip not assigned yet"%}</strong></span>
|
||||
<i data-toggle="tooltip" title="Your ip will be assigned soon" class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
<i data-toggle="tooltip" title="Your ip will be assigned soon" class="fa fa-info-circle" aria-hidden="true"></i>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
@ -85,12 +85,12 @@
|
|||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="well text-center box-setting">
|
||||
<i class="fa fa-hdd-o" aria-hidden="true"></i>
|
||||
<i class="fa fa-hdd-o" aria-hidden="true"></i>
|
||||
<span>{% trans "Disk"%}</span>
|
||||
<span class="label label-success">{{virtual_machine.disk_size|floatformat:2}} GB</span>
|
||||
</div>
|
||||
</div>
|
||||
</div><!--/row-->
|
||||
</div><!--/row-->
|
||||
</div><!--/col-12-->
|
||||
</div><!--/row-->
|
||||
<div class="row">
|
||||
|
@ -106,7 +106,7 @@
|
|||
<div class="row ">
|
||||
<div class="col-md-12 inline-headers">
|
||||
<h3>{% trans "Current pricing"%}</h3>
|
||||
<span class="h3 pull-right"><strong>{{virtual_machine.price|floatformat}} CHF</strong>/month</span>
|
||||
<span class="h3 pull-right"><strong>{{virtual_machine.price|floatformat}} CHF</strong>/month</span>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -136,13 +136,13 @@
|
|||
<div class="pull-right">
|
||||
<form method="POST"
|
||||
id="virtual_machine_cancel_form" class="cancel-form" action="{% url 'hosting:virtual_machines' virtual_machine.vm_id %}">
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
|
||||
{% csrf_token %}
|
||||
</form>
|
||||
|
||||
<button type="text" data-href="{% url 'hosting:virtual_machines' virtual_machine.vm_id %}" data-toggle="modal" data-target="#confirm-cancel" class="btn btn-danger">{% trans "Terminate Virtual Machine"%}</button>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<br/>
|
||||
|
@ -159,14 +159,18 @@
|
|||
<div class="modal fade" id="confirm-cancel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
{% trans "Terminate your Virtual Machine"%}
|
||||
</div>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-label="Confirm"><span
|
||||
aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% trans "Are you sure do you want to cancel your Virtual Machine "%} {{virtual_machine.name}} ?
|
||||
<div class="modal-icon"><i class="fa fa-ban" aria-hidden="true"></i></div>
|
||||
<h4 class="modal-title" id="ModalLabel">{% trans "Terminate your Virtual Machine"%}</h4>
|
||||
<p class="modal-text">{% trans "Are you sure do you want to cancel your Virtual Machine "%} {{virtual_machine.name}} ?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Cancel"%}</button>
|
||||
<a class="btn btn-danger btn-ok">OK</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue