Merge upstream master
This commit is contained in:
		
				commit
				
					
						22af001489
					
				
			
		
					 6 changed files with 65 additions and 164 deletions
				
			
		|  | @ -1501,6 +1501,8 @@ tech-sub-sec h2 { | |||
|     font-size: 14px; | ||||
|     font-weight: 300; | ||||
|     letter-spacing: 2px; | ||||
|     line-height: 24px; | ||||
|     display: block; | ||||
| } | ||||
| 
 | ||||
| .content-section-a { | ||||
|  |  | |||
|  | @ -16,7 +16,7 @@ | |||
|                         <hr class="intro-divider"> | ||||
|                         <ul class="list-inline intro-social-buttons"> | ||||
|                             <li> | ||||
|                                 <a class="btn btn-default btn-lg btn-transparent url" href="#how"><i class="#Services"></i> <span class="network-name">{% trans "Highlights" %}</span></a> | ||||
|                                 <a class="btn btn-default btn-lg btn-transparent url" href="#how"><span class="network-name">{% trans "Highlights" %}</span></a> | ||||
|                             </li> | ||||
|                             <li> | ||||
|                                 <a class="btn btn-primary btn-lg page-scroll url" href="#price"><span class="network-name">{% trans "I want it!" %}</span></a> | ||||
|  |  | |||
|  | @ -1,143 +1,21 @@ | |||
| {% extends "hosting/base_short.html" %} | ||||
| {% load staticfiles bootstrap3 %} | ||||
| {% extends "hosting/order_detail.html" %} | ||||
| {% load i18n %} | ||||
| {% load custom_tags %} | ||||
| 
 | ||||
| {% block navbar %} | ||||
|     {% include "datacenterlight/includes/_navbar.html" %} | ||||
| {% endblock navbar %} | ||||
| 
 | ||||
| {% block content %} | ||||
| {% block submit_btn %} | ||||
|   <form action="" method="POST"> | ||||
|       {% csrf_token %} | ||||
|       <div class="row"> | ||||
|           <div class="col-sm-8"> | ||||
|               <div class="dcl-place-order-text">{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.</div> | ||||
|           </div> | ||||
|           <div class="col-sm-4 order-confirm-btn text-right"> | ||||
|               <button type="submit" class="btn choice-btn">{% trans "Place order" %}</button> | ||||
|           </div> | ||||
|       </div> | ||||
|   </form> | ||||
| {% endblock submit_btn %} | ||||
| 
 | ||||
| <div class="order-detail-container"> | ||||
|    {% if messages %} | ||||
|         <div class="row"> | ||||
|             <div class="col-xs-12 col-md-8 col-md-offset-2"> | ||||
|                 <br/> | ||||
|                 <div class="alert alert-warning"> | ||||
|                     {% for message in messages %} | ||||
|                     <span>{{ message }}</span> | ||||
|                     {% endfor %} | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|     {% endif %} | ||||
|     {% if not error %} | ||||
|         <div class="row"> | ||||
|             <div class="col-xs-12 col-md-8 col-md-offset-2"> | ||||
|                 <div class="invoice-title"> | ||||
|                     <h2>{% trans "Confirm Order"%}</h2> | ||||
|                 </div> | ||||
|                 <hr> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-xs-12 col-sm-6 pull-right order-confirm-date"> | ||||
|                         <address> | ||||
|                             <strong>{% trans "Date"%}:</strong><br> | ||||
|                             <span id="order-created_at">{% now "Y-m-d H:i" %}</span><br><br> | ||||
|                         </address> | ||||
|                     </div> | ||||
|                     <div class="col-xs-12 col-sm-6"> | ||||
|                         <address> | ||||
|                         <h3><b>{% trans "Billed To:"%}</b></h3> | ||||
|                         {% with billing_address_data as billing_address %} | ||||
|                             {{billing_address.cardholder_name}}<br> {{billing_address.street_address}}, {{billing_address.postal_code}}<br> | ||||
|                             {{billing_address.city}}, {{billing_address.country}}. | ||||
|                         {% endwith %} | ||||
|                         </address> | ||||
|                     </div> | ||||
|                 </div> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-xs-6"> | ||||
|                         <address> | ||||
|                             <strong>{% trans "Payment Method:"%}</strong><br> | ||||
|                                 {{cc_brand}} {% trans "ending in" %} **** {{cc_last4}}<br> | ||||
|                                 {{request.session.user.email}} | ||||
|                         </address> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
| 
 | ||||
|         <div class="row"> | ||||
|             <div class="col-md-8 col-md-offset-2"> | ||||
|                 <h3><b>{% trans "Order summary"%}</b></h3> | ||||
|                 <hr> | ||||
|                 <div class="content"> | ||||
|                     {% with request.session.specs as vm %} | ||||
|                         <p><b>{% trans "Cores"%}</b> <span class="pull-right">{{vm.cpu}}</span></p> | ||||
|                         <hr> | ||||
|                         <p><b>{% trans "Memory"%}</b> <span class="pull-right">{{vm.memory}} GB</span></p> | ||||
|                         <hr> | ||||
|                         <p><b>{% trans "Disk space"%}</b> <span class="pull-right">{{vm.disk_size}} GB</span></p> | ||||
|                         <hr> | ||||
|                         <p><b>{% trans "Configuration"%}</b> <span class="pull-right">{{request.session.template.name}}</span></p> | ||||
|                         <hr> | ||||
|                         <h4>{% trans "Total"%}<p class="pull-right"><b>{{vm.price}} CHF</b><span class="dcl-price-month"> /{% trans "Month" %}</span></p></h4> | ||||
|                     {% endwith %} | ||||
|                 </div> | ||||
|                 <br/> | ||||
|                 <form method="post" id="virtual_machine_create_form"> | ||||
|                     {% csrf_token %} | ||||
|                     <div class="row"> | ||||
|                         <div class="col-sm-8"> | ||||
|                             <p class="dcl-place-order-text">{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.</p> | ||||
|                         </div> | ||||
|                         <div class="col-sm-4 content"> | ||||
|                             <button class="btn btn-info pull-right" | ||||
|                                     id="btn-create-vm" | ||||
|                                     data-href="{% url 'hosting:order-confirmation' %}" | ||||
|                                     data-toggle="modal" | ||||
|                                     data-target="#createvm-modal"> | ||||
|                                 {% trans "Place order"%} | ||||
|                             </button> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                 </form> | ||||
|             </div> | ||||
|         </div> | ||||
|     {% endif %} | ||||
| </div> | ||||
| <!-- Create VM Modal --> | ||||
| <div class="modal fade" id="createvm-modal" tabindex="-1" role="dialog" | ||||
|      aria-hidden="true" data-backdrop="static" data-keyboard="false"> | ||||
|     <div class="modal-dialog"> | ||||
|         <div class="modal-content"> | ||||
|             <div class="modal-header"> | ||||
|                 <button type="button" class="close hidden" data-dismiss="modal" | ||||
|                         aria-label="create-vm-close"> | ||||
|                     <span aria-hidden="true">×</span> | ||||
|                 </button> | ||||
|             </div> | ||||
|             <div class="modal-body"> | ||||
|                 <div class="modal-icon"> | ||||
|                     <i class="fa fa-cog fa-spin fa-3x fa-fw"></i> | ||||
|                     <span class="sr-only">{% trans "Processing..." %}</span> | ||||
|                 </div> | ||||
|                 <h4 class="modal-title" id="createvm-modal-title"> | ||||
|                 </h4> | ||||
|                 <div class="modal-text" id="createvm-modal-body"> | ||||
|                     {% trans "Hold tight, we are processing your request" %} | ||||
|                 </div> | ||||
|                 <div class="modal-footer"> | ||||
|                     <a id="createvm-modal-done-btn" class="btn btn-success btn-ok btn-wide hide" href="">{% trans "OK" %}</a> | ||||
|                     <button id="createvm-modal-close-btn" type="button" class="btn btn-danger btn-ok btn-wide hide" data-dismiss="modal" aria-label="create-vm-close">{% trans "Close" %}</button> | ||||
|                 </div> | ||||
|             </div> | ||||
|         </div> | ||||
|     </div> | ||||
| </div> | ||||
| <!-- / Create VM Modal --> | ||||
| 
 | ||||
| 
 | ||||
| <script type="text/javascript"> | ||||
|     {% trans "Some problem encountered. Please try again later." as err_msg %} | ||||
|     var create_vm_error_message = '{{err_msg|safe}}.'; | ||||
| 
 | ||||
|     window.onload = function () { | ||||
|         var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate(); | ||||
|         locale_date =  moment(locale_date).format("YYYY-MM-DD h:mm:ss a"); | ||||
|         document.getElementById('order-created_at').innerHTML = locale_date; | ||||
|     }; | ||||
| 
 | ||||
| </script> | ||||
| {%endblock%} | ||||
|  |  | |||
|  | @ -463,6 +463,8 @@ class OrderConfirmationView(DetailView): | |||
|             'site_url': reverse('datacenterlight:index'), | ||||
|             'cc_last4': card_details.get('response_object').get('last4'), | ||||
|             'cc_brand': card_details.get('response_object').get('brand'), | ||||
|             'vm': request.session.get('specs'), | ||||
|             'page_header_text': _('Confirm Order'), | ||||
|             'billing_address_data': request.session.get('billing_address_data') | ||||
|         } | ||||
|         return render(request, self.template_name, context) | ||||
|  |  | |||
|  | @ -362,7 +362,7 @@ msgid "Product" | |||
| msgstr "Produkt" | ||||
| 
 | ||||
| msgid "Period" | ||||
| msgstr "" | ||||
| msgstr "Periode" | ||||
| 
 | ||||
| msgid "Cores" | ||||
| msgstr "Prozessorkerne" | ||||
|  | @ -729,6 +729,9 @@ msgstr "" | |||
| "Wir konnten die gesucht VM nicht finden. Kontaktiere den Data Center Light " | ||||
| "Support." | ||||
| 
 | ||||
| msgid "Terminated" | ||||
| msgstr "Beendet" | ||||
| 
 | ||||
| msgid "Error terminating VM" | ||||
| msgstr "Fehler beenden VM" | ||||
| 
 | ||||
|  | @ -739,6 +742,12 @@ msgid "There was an error processing your request. Please try again." | |||
| msgstr "Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte" | ||||
| " versuche es noch einmal." | ||||
| 
 | ||||
| #~ msgid "Close" | ||||
| #~ msgstr "Schliessen" | ||||
| 
 | ||||
| #~ msgid "Invoice Date" | ||||
| #~ msgstr "Rechnung Datum" | ||||
| 
 | ||||
| #~ msgid "VM %(VM_ID)s terminated successfully" | ||||
| #~ msgstr "VM %(VM_ID)s erfolgreich beendet" | ||||
| 
 | ||||
|  | @ -872,5 +881,5 @@ msgstr "Es gab einen Fehler bei der Bearbeitung Deine Anfrage. Bitte" | |||
| #~ "Your SSH private key was already generated and downloaded, if you lost " | ||||
| #~ "it, contact us. " | ||||
| #~ msgstr "" | ||||
| #~ "Dein privater SSH Key wurde bereits generiert und heruntergeladen. Falls " | ||||
| #~ "Du ihn verloren hast, kontaktiere uns." | ||||
| #~ "Dein privater SSH Key wurde bereits generiert und heruntergeladen. " | ||||
| #~ "Falls Du ihn verloren hast, kontaktiere uns." | ||||
|  |  | |||
|  | @ -17,10 +17,12 @@ | |||
|             <h1 class="dashboard-title-thin"> | ||||
|                 <img src="{% static 'hosting/img/billing.svg' %}" class="un-icon">{% blocktrans with page_header_text=page_header_text|default:"Invoice" %}{{page_header_text}}{% endblocktrans %} | ||||
|             </h1> | ||||
|             <div class="dashboard-container-options"> | ||||
|                 <button type="button" class="btn-plain btn-pdf" data-target="#order-detail{{order.pk}}"><img src="{% static 'hosting/img/icon-pdf.svg' %}" class="svg-img"></button> | ||||
|                 <button type="button" class="btn-plain btn-print"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button> | ||||
|             </div> | ||||
|             {% if order %} | ||||
|                 <div class="dashboard-container-options"> | ||||
|                     <button type="button" class="btn-plain btn-pdf" data-target="#order-detail{{order.pk}}"><img src="{% static 'hosting/img/icon-pdf.svg' %}" class="svg-img"></button> | ||||
|                     <button type="button" class="btn-plain btn-print"><img src="{% static 'hosting/img/icon-print.svg' %}" class="svg-img"></button> | ||||
|                 </div> | ||||
|             {% endif %} | ||||
|         </div> | ||||
|         <div class="order-details"> | ||||
|             {% if order %} | ||||
|  | @ -29,7 +31,7 @@ | |||
|                 </p> | ||||
|             {% endif %} | ||||
|             <p> | ||||
|                 <strong>{% trans "Invoice Date" %}:</strong> | ||||
|                 <strong>{% trans "Date" %}:</strong> | ||||
|                 <span id="order-created_at"> | ||||
|                     {% if order %} | ||||
|                         {{order.created_at|date:'Y-m-d H:i'}} | ||||
|  | @ -80,8 +82,7 @@ | |||
|                         {{order.last4}}<br> | ||||
|                         {{user.email}} | ||||
|                     {% else %} | ||||
|                         {{cc_brand|default:'Card'}} {% trans "ending in" %} **** | ||||
|                         {{cc_last4}}<br> | ||||
|                         {{cc_brand|default:_('Credit Card')}} {% trans "ending in" %} ****{{cc_last4}}<br> | ||||
|                         {% if request.user.is_authenticated %} | ||||
|                             {{request.user.email}} | ||||
|                         {% else %} | ||||
|  | @ -94,7 +95,12 @@ | |||
|             <div> | ||||
|                 <h4>{% trans "Order summary" %}</h4> | ||||
|                 <p> | ||||
|                     <strong>{% trans "Product" %}:</strong> {{vm.name}} | ||||
|                     <strong>{% trans "Product" %}:</strong>  | ||||
|                     {% if vm.name %} | ||||
|                         {{ vm.name }} | ||||
|                     {% else %} | ||||
|                         {{ request.session.template.name }} | ||||
|                     {% endif %} | ||||
|                 </p> | ||||
|                 <div class="row"> | ||||
|                     <div class="col-sm-6"> | ||||
|  | @ -132,19 +138,21 @@ | |||
|             {% endif %} | ||||
|         </div> | ||||
|         {% if not order %} | ||||
|             <form method="post" id="virtual_machine_create_form"> | ||||
|                 {% csrf_token %} | ||||
|                 <div class="row"> | ||||
|                     <div class="col-sm-8"> | ||||
|                         <div class="dcl-place-order-text">{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.</div> | ||||
|             {% block submit_btn %} | ||||
|                 <form method="post" id="virtual_machine_create_form"> | ||||
|                     {% csrf_token %} | ||||
|                     <div class="row"> | ||||
|                         <div class="col-sm-8"> | ||||
|                             <div class="dcl-place-order-text">{% blocktrans with vm_price=request.session.specs.price %}By clicking "Place order" this plan will charge your credit card account with the fee of {{ vm_price }}CHF/month{% endblocktrans %}.</div> | ||||
|                         </div> | ||||
|                         <div class="col-sm-4 order-confirm-btn text-right"> | ||||
|                             <button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal"> | ||||
|                                 {% trans "Place order" %} | ||||
|                             </button> | ||||
|                         </div> | ||||
|                     </div> | ||||
|                     <div class="col-sm-4 order-confirm-btn text-right"> | ||||
|                         <button class="btn choice-btn" id="btn-create-vm" data-href="{% url 'hosting:order-confirmation' %}" data-toggle="modal" data-target="#createvm-modal"> | ||||
|                             {% trans "Place order" %} | ||||
|                         </button> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </form> | ||||
|                 </form> | ||||
|             {% endblock submit_btn %} | ||||
|         {% endif %} | ||||
|     {% endif %} | ||||
| </div> | ||||
|  | @ -197,8 +205,10 @@ | |||
| {%endblock%} | ||||
| 
 | ||||
| {% block js_extra %} | ||||
|     <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script> | ||||
|     <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script> | ||||
|     <script src="{% static 'hosting/js/html2pdf.js' %}"></script> | ||||
|     <script src="{% static 'hosting/js/order.js' %}"></script> | ||||
|     {% if order %} | ||||
|         <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script> | ||||
|         <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js"></script> | ||||
|         <script src="{% static 'hosting/js/html2pdf.js' %}"></script> | ||||
|         <script src="{% static 'hosting/js/order.js' %}"></script> | ||||
|     {% endif %} | ||||
| {% endblock js_extra %} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue