diff --git a/digitalglarus/models.py b/digitalglarus/models.py index 1cfd1c0b..2e12e265 100644 --- a/digitalglarus/models.py +++ b/digitalglarus/models.py @@ -1,4 +1,5 @@ + import calendar from datetime import datetime, date, timedelta from dateutil.relativedelta import relativedelta diff --git a/digitalglarus/static/digitalglarus/css/price.css b/digitalglarus/static/digitalglarus/css/price.css index 12a0e2f0..1a019740 100644 --- a/digitalglarus/static/digitalglarus/css/price.css +++ b/digitalglarus/static/digitalglarus/css/price.css @@ -71,7 +71,7 @@ padding-right: 15px; padding-top: 15px; padding-bottom: 30px; - margin-top: 80px; + margin-top: 10px; margin-bottom: 30px; margin-left: 10px; margin-right: 10px; @@ -174,7 +174,7 @@ padding-right: 15px; padding-top: 15px; padding-bottom: 15px; - margin-top: 80px; + margin-top: 0px; margin-bottom: 30px; margin-left: 10px; margin-right: 10px; diff --git a/digitalglarus/static/digitalglarus/css/ungleich.css b/digitalglarus/static/digitalglarus/css/ungleich.css index 7742e5cd..03a2b47c 100644 --- a/digitalglarus/static/digitalglarus/css/ungleich.css +++ b/digitalglarus/static/digitalglarus/css/ungleich.css @@ -64,8 +64,8 @@ } .ungleich-gallery-text-carousel .carousel-indicators li, .text-carousel .carousel-indicators li { - width: 5px; - height: 5px; + width: 10px; + height: 10px; margin: 10px; border: 0; border-radius: 50%; diff --git a/digitalglarus/static/digitalglarus/js/payment.js b/digitalglarus/static/digitalglarus/js/payment.js index 0d95a109..7e30a667 100644 --- a/digitalglarus/static/digitalglarus/js/payment.js +++ b/digitalglarus/static/digitalglarus/js/payment.js @@ -28,6 +28,7 @@ $( document ).ready(function() { var hasCreditcard = window.hasCreditcard; + hasCreditcard= true; console.log("has creditcard"); console.log("has creditcard"); console.log("has creditcard"); @@ -40,9 +41,11 @@ $( document ).ready(function() { e.preventDefault(); if (hasCreditcard) { $('#billing-form').submit(); + console.log("has creditcard2"); } else  { $('#payment-form').submit(); + console.log("has creditcard3"); } @@ -73,7 +76,7 @@ $( document ).ready(function() { /* Visual feedback */ $form.find('[type=submit]').html('Validating '); - + console.log("submiting2"); var PublishableKey = window.stripeKey; Stripe.setPublishableKey(PublishableKey); Stripe.card.createToken($form, function stripeResponseHandler(status, response) { diff --git a/digitalglarus/templates/digitalglarus/booking_orders_detail.html b/digitalglarus/templates/digitalglarus/booking_orders_detail.html index a91ec55a..a84428bd 100644 --- a/digitalglarus/templates/digitalglarus/booking_orders_detail.html +++ b/digitalglarus/templates/digitalglarus/booking_orders_detail.html @@ -84,7 +84,7 @@ Go to my page - +

- {% if credit_card_data.last4 and credit_card_data.cc_brand %} + {% if credit_card_data.last4 %}
-

Credit Card

+

Credit CardNew

Last 4: *****{{credit_card_data.last4}}

Type: {{credit_card_data.cc_brand}}

{% else %} +

Credit Card (Last used)

@@ -146,7 +147,11 @@

Dates {{start_date}} - {{end_date}}

- Change dates + + Change dates + + +


Total days: {{booking_days}}

@@ -164,8 +169,8 @@
- I accept the Digital Glarus Terms and Conditions, Community Guidelines and Privacy Policy - + I accept the Digital Glarus Terms and Conditions, Community Guidelines and Privacy Policy +
@@ -203,6 +208,72 @@
+ + + + + + {% if stripe_key %} diff --git a/digitalglarus/templates/digitalglarus/booking_payment2.html b/digitalglarus/templates/digitalglarus/booking_payment2.html new file mode 100644 index 00000000..758f918a --- /dev/null +++ b/digitalglarus/templates/digitalglarus/booking_payment2.html @@ -0,0 +1,301 @@ +{% extends "new_base_glarus.html" %} +{% load staticfiles bootstrap3 i18n %} +{% block content %} + + + +
+ +
+
+
+ + + + +
+
+
+
+
+ Digital Glarus
+ In der Au 7 Schwanden 8762 Switzerland +
info@digitalglarus.ch +
+ (044) 534-66-22 +

 

+
+
+

 

+
+
+
+
+ + + + + +{% if stripe_key %} + + +{%endif%} + +{% if credit_card_data.last4 and credit_card_data.cc_brand %} + + +{%endif%} + + +{% endblock %} \ No newline at end of file diff --git a/digitalglarus/templates/digitalglarus/confirm_reset_password.html b/digitalglarus/templates/digitalglarus/confirm_reset_password.html index 40a93730..d8a1c4c2 100644 --- a/digitalglarus/templates/digitalglarus/confirm_reset_password.html +++ b/digitalglarus/templates/digitalglarus/confirm_reset_password.html @@ -24,7 +24,7 @@
-

Still have trouble? Contact us for technical support.

+

Still have trouble? Contact us .

diff --git a/digitalglarus/templates/digitalglarus/credit_card_edit_confirmation.html b/digitalglarus/templates/digitalglarus/credit_card_edit_confirmation.html new file mode 100644 index 00000000..3fea39d2 --- /dev/null +++ b/digitalglarus/templates/digitalglarus/credit_card_edit_confirmation.html @@ -0,0 +1,113 @@ +{% extends "new_base_glarus.html" %} +{% load staticfiles cms_tags bootstrap3%} +{% block title %}crowdfunding{% endblock %} + +{% block content %} + + + +
+
+
+
+ + +
+

Update your credit card information

+
+

Do you want to update your credit card information ?

+
+
+ + + + + + +
+ + +
+
+
+ + + +
+
+
+
+
+
+ Digital Glarus
+ In der Au 7 Schwanden 8762 Switzerland +
info@digitalglarus.ch +
+ (044) 534-66-22 +

 

+
+
+

 

+
+
+
+
+{% endblock %} \ No newline at end of file diff --git a/digitalglarus/templates/digitalglarus/dist/remodal-default-theme.css b/digitalglarus/templates/digitalglarus/dist/remodal-default-theme.css new file mode 100644 index 00000000..ee8385c0 --- /dev/null +++ b/digitalglarus/templates/digitalglarus/dist/remodal-default-theme.css @@ -0,0 +1,311 @@ +/* + * Remodal - v1.1.0 + * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. + * http://vodkabears.github.io/remodal/ + * + * Made by Ilya Makarov + * Under MIT License + */ + +/* ========================================================================== + Remodal's default mobile first theme + ========================================================================== */ + +/* Default theme styles for the background */ + +.remodal-bg.remodal-is-opening, +.remodal-bg.remodal-is-opened { + -webkit-filter: blur(3px); + filter: blur(3px); +} + +/* Default theme styles of the overlay */ + +.remodal-overlay { + background: rgba(43, 46, 56, 0.9); +} + +.remodal-overlay.remodal-is-opening, +.remodal-overlay.remodal-is-closing { + -webkit-animation-duration: 0.3s; + animation-duration: 0.3s; + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +.remodal-overlay.remodal-is-opening { + -webkit-animation-name: remodal-overlay-opening-keyframes; + animation-name: remodal-overlay-opening-keyframes; +} + +.remodal-overlay.remodal-is-closing { + -webkit-animation-name: remodal-overlay-closing-keyframes; + animation-name: remodal-overlay-closing-keyframes; +} + +/* Default theme styles of the wrapper */ + +.remodal-wrapper { + padding: 10px 10px 0; +} + +/* Default theme styles of the modal dialog */ + +.remodal { + box-sizing: border-box; + width: 100%; + margin-bottom: 10px; + padding: 35px; + + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + + color: #2b2e38; + background: #fff; +} + +.remodal.remodal-is-opening, +.remodal.remodal-is-closing { + -webkit-animation-duration: 0.3s; + animation-duration: 0.3s; + -webkit-animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +.remodal.remodal-is-opening { + -webkit-animation-name: remodal-opening-keyframes; + animation-name: remodal-opening-keyframes; +} + +.remodal.remodal-is-closing { + -webkit-animation-name: remodal-closing-keyframes; + animation-name: remodal-closing-keyframes; +} + +/* Vertical align of the modal dialog */ + +.remodal, +.remodal-wrapper:after { + vertical-align: middle; +} + +/* Close button */ + +.remodal-close { + position: absolute; + top: 0; + left: 0; + + display: block; + overflow: visible; + + width: 35px; + height: 35px; + margin: 0; + padding: 0; + + cursor: pointer; + -webkit-transition: color 0.2s; + transition: color 0.2s; + text-decoration: none; + + color: #95979c; + border: 0; + outline: 0; + background: transparent; +} + +.remodal-close:hover, +.remodal-close:focus { + color: #2b2e38; +} + +.remodal-close:before { + font-family: Arial, "Helvetica CY", "Nimbus Sans L", sans-serif !important; + font-size: 25px; + line-height: 35px; + + position: absolute; + top: 0; + left: 0; + + display: block; + + width: 35px; + + content: "\00d7"; + text-align: center; +} + +/* Dialog buttons */ + +.remodal-confirm, +.remodal-cancel { + font: inherit; + + display: inline-block; + overflow: visible; + + min-width: 110px; + margin: 0; + padding: 12px 0; + + cursor: pointer; + -webkit-transition: background 0.2s; + transition: background 0.2s; + text-align: center; + vertical-align: middle; + text-decoration: none; + + border: 0; + outline: 0; +} + +.remodal-confirm { + color: #fff; + background: #81c784; +} + +.remodal-confirm:hover, +.remodal-confirm:focus { + background: #66bb6a; +} + +.remodal-cancel { + color: #fff; + background: #e57373; +} + +.remodal-cancel:hover, +.remodal-cancel:focus { + background: #ef5350; +} + +/* Remove inner padding and border in Firefox 4+ for the button tag. */ + +.remodal-confirm::-moz-focus-inner, +.remodal-cancel::-moz-focus-inner, +.remodal-close::-moz-focus-inner { + padding: 0; + + border: 0; +} + +/* Keyframes + ========================================================================== */ + +@-webkit-keyframes remodal-opening-keyframes { + from { + -webkit-transform: scale(1.05); + transform: scale(1.05); + + opacity: 0; + } + to { + -webkit-transform: none; + transform: none; + + opacity: 1; + } +} + +@keyframes remodal-opening-keyframes { + from { + -webkit-transform: scale(1.05); + transform: scale(1.05); + + opacity: 0; + } + to { + -webkit-transform: none; + transform: none; + + opacity: 1; + } +} + +@-webkit-keyframes remodal-closing-keyframes { + from { + -webkit-transform: scale(1); + transform: scale(1); + + opacity: 1; + } + to { + -webkit-transform: scale(0.95); + transform: scale(0.95); + + opacity: 0; + } +} + +@keyframes remodal-closing-keyframes { + from { + -webkit-transform: scale(1); + transform: scale(1); + + opacity: 1; + } + to { + -webkit-transform: scale(0.95); + transform: scale(0.95); + + opacity: 0; + } +} + +@-webkit-keyframes remodal-overlay-opening-keyframes { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@keyframes remodal-overlay-opening-keyframes { + from { + opacity: 0; + } + to { + opacity: 1; + } +} + +@-webkit-keyframes remodal-overlay-closing-keyframes { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +@keyframes remodal-overlay-closing-keyframes { + from { + opacity: 1; + } + to { + opacity: 0; + } +} + +/* Media queries + ========================================================================== */ + +@media only screen and (min-width: 641px) { + .remodal { + max-width: 700px; + } +} + +/* IE8 + ========================================================================== */ + +.lt-ie9 .remodal-overlay { + background: #2b2e38; +} + +.lt-ie9 .remodal { + width: 700px; +} diff --git a/digitalglarus/templates/digitalglarus/dist/remodal.css b/digitalglarus/templates/digitalglarus/dist/remodal.css new file mode 100644 index 00000000..92a000ca --- /dev/null +++ b/digitalglarus/templates/digitalglarus/dist/remodal.css @@ -0,0 +1,93 @@ +/* + * Remodal - v1.1.0 + * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. + * http://vodkabears.github.io/remodal/ + * + * Made by Ilya Makarov + * Under MIT License + */ + +/* ========================================================================== + Remodal's necessary styles + ========================================================================== */ + +/* Hide scroll bar */ + +html.remodal-is-locked { + overflow: hidden; + + -ms-touch-action: none; + touch-action: none; +} + +/* Anti FOUC */ + +.remodal, +[data-remodal-id] { + display: none; +} + +/* Necessary styles of the overlay */ + +.remodal-overlay { + position: fixed; + z-index: 9999; + top: -5000px; + right: -5000px; + bottom: -5000px; + left: -5000px; + + display: none; +} + +/* Necessary styles of the wrapper */ + +.remodal-wrapper { + position: fixed; + z-index: 10000; + top: 0; + right: 0; + bottom: 0; + left: 0; + + display: none; + overflow: auto; + + text-align: center; + + -webkit-overflow-scrolling: touch; +} + +.remodal-wrapper:after { + display: inline-block; + + height: 100%; + margin-left: -0.05em; + + content: ""; +} + +/* Fix iPad, iPhone glitches */ + +.remodal-overlay, +.remodal-wrapper { + -webkit-backface-visibility: hidden; + backface-visibility: hidden; +} + +/* Necessary styles of the modal dialog */ + +.remodal { + position: relative; + + outline: none; + + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + text-size-adjust: 100%; +} + +.remodal-is-initialized { + /* Disable Anti-FOUC */ + display: inline-block; +} diff --git a/digitalglarus/templates/digitalglarus/dist/remodal.js b/digitalglarus/templates/digitalglarus/dist/remodal.js new file mode 100644 index 00000000..b738f55d --- /dev/null +++ b/digitalglarus/templates/digitalglarus/dist/remodal.js @@ -0,0 +1,785 @@ +/* + * Remodal - v1.1.0 + * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. + * http://vodkabears.github.io/remodal/ + * + * Made by Ilya Makarov + * Under MIT License + */ + +!(function(root, factory) { + if (typeof define === 'function' && define.amd) { + define(['jquery'], function($) { + return factory(root, $); + }); + } else if (typeof exports === 'object') { + factory(root, require('jquery')); + } else { + factory(root, root.jQuery || root.Zepto); + } +})(this, function(global, $) { + + 'use strict'; + + /** + * Name of the plugin + * @private + * @const + * @type {String} + */ + var PLUGIN_NAME = 'remodal'; + + /** + * Namespace for CSS and events + * @private + * @const + * @type {String} + */ + var NAMESPACE = global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.NAMESPACE || PLUGIN_NAME; + + /** + * Animationstart event with vendor prefixes + * @private + * @const + * @type {String} + */ + var ANIMATIONSTART_EVENTS = $.map( + ['animationstart', 'webkitAnimationStart', 'MSAnimationStart', 'oAnimationStart'], + + function(eventName) { + return eventName + '.' + NAMESPACE; + } + + ).join(' '); + + /** + * Animationend event with vendor prefixes + * @private + * @const + * @type {String} + */ + var ANIMATIONEND_EVENTS = $.map( + ['animationend', 'webkitAnimationEnd', 'MSAnimationEnd', 'oAnimationEnd'], + + function(eventName) { + return eventName + '.' + NAMESPACE; + } + + ).join(' '); + + /** + * Default settings + * @private + * @const + * @type {Object} + */ + var DEFAULTS = $.extend({ + hashTracking: true, + closeOnConfirm: true, + closeOnCancel: true, + closeOnEscape: true, + closeOnOutsideClick: true, + modifier: '', + appendTo: null + }, global.REMODAL_GLOBALS && global.REMODAL_GLOBALS.DEFAULTS); + + /** + * States of the Remodal + * @private + * @const + * @enum {String} + */ + var STATES = { + CLOSING: 'closing', + CLOSED: 'closed', + OPENING: 'opening', + OPENED: 'opened' + }; + + /** + * Reasons of the state change. + * @private + * @const + * @enum {String} + */ + var STATE_CHANGE_REASONS = { + CONFIRMATION: 'confirmation', + CANCELLATION: 'cancellation' + }; + + /** + * Is animation supported? + * @private + * @const + * @type {Boolean} + */ + var IS_ANIMATION = (function() { + var style = document.createElement('div').style; + + return style.animationName !== undefined || + style.WebkitAnimationName !== undefined || + style.MozAnimationName !== undefined || + style.msAnimationName !== undefined || + style.OAnimationName !== undefined; + })(); + + /** + * Is iOS? + * @private + * @const + * @type {Boolean} + */ + var IS_IOS = /iPad|iPhone|iPod/.test(navigator.platform); + + /** + * Current modal + * @private + * @type {Remodal} + */ + var current; + + /** + * Scrollbar position + * @private + * @type {Number} + */ + var scrollTop; + + /** + * Returns an animation duration + * @private + * @param {jQuery} $elem + * @returns {Number} + */ + function getAnimationDuration($elem) { + if ( + IS_ANIMATION && + $elem.css('animation-name') === 'none' && + $elem.css('-webkit-animation-name') === 'none' && + $elem.css('-moz-animation-name') === 'none' && + $elem.css('-o-animation-name') === 'none' && + $elem.css('-ms-animation-name') === 'none' + ) { + return 0; + } + + var duration = $elem.css('animation-duration') || + $elem.css('-webkit-animation-duration') || + $elem.css('-moz-animation-duration') || + $elem.css('-o-animation-duration') || + $elem.css('-ms-animation-duration') || + '0s'; + + var delay = $elem.css('animation-delay') || + $elem.css('-webkit-animation-delay') || + $elem.css('-moz-animation-delay') || + $elem.css('-o-animation-delay') || + $elem.css('-ms-animation-delay') || + '0s'; + + var iterationCount = $elem.css('animation-iteration-count') || + $elem.css('-webkit-animation-iteration-count') || + $elem.css('-moz-animation-iteration-count') || + $elem.css('-o-animation-iteration-count') || + $elem.css('-ms-animation-iteration-count') || + '1'; + + var max; + var len; + var num; + var i; + + duration = duration.split(', '); + delay = delay.split(', '); + iterationCount = iterationCount.split(', '); + + // The 'duration' size is the same as the 'delay' size + for (i = 0, len = duration.length, max = Number.NEGATIVE_INFINITY; i < len; i++) { + num = parseFloat(duration[i]) * parseInt(iterationCount[i], 10) + parseFloat(delay[i]); + + if (num > max) { + max = num; + } + } + + return max; + } + + /** + * Returns a scrollbar width + * @private + * @returns {Number} + */ + function getScrollbarWidth() { + if ($(document.body).height() <= $(window).height()) { + return 0; + } + + var outer = document.createElement('div'); + var inner = document.createElement('div'); + var widthNoScroll; + var widthWithScroll; + + outer.style.visibility = 'hidden'; + outer.style.width = '100px'; + document.body.appendChild(outer); + + widthNoScroll = outer.offsetWidth; + + // Force scrollbars + outer.style.overflow = 'scroll'; + + // Add inner div + inner.style.width = '100%'; + outer.appendChild(inner); + + widthWithScroll = inner.offsetWidth; + + // Remove divs + outer.parentNode.removeChild(outer); + + return widthNoScroll - widthWithScroll; + } + + /** + * Locks the screen + * @private + */ + function lockScreen() { + if (IS_IOS) { + return; + } + + var $html = $('html'); + var lockedClass = namespacify('is-locked'); + var paddingRight; + var $body; + + if (!$html.hasClass(lockedClass)) { + $body = $(document.body); + + // Zepto does not support '-=', '+=' in the `css` method + paddingRight = parseInt($body.css('padding-right'), 10) + getScrollbarWidth(); + + $body.css('padding-right', paddingRight + 'px'); + $html.addClass(lockedClass); + } + } + + /** + * Unlocks the screen + * @private + */ + function unlockScreen() { + if (IS_IOS) { + return; + } + + var $html = $('html'); + var lockedClass = namespacify('is-locked'); + var paddingRight; + var $body; + + if ($html.hasClass(lockedClass)) { + $body = $(document.body); + + // Zepto does not support '-=', '+=' in the `css` method + paddingRight = parseInt($body.css('padding-right'), 10) - getScrollbarWidth(); + + $body.css('padding-right', paddingRight + 'px'); + $html.removeClass(lockedClass); + } + } + + /** + * Sets a state for an instance + * @private + * @param {Remodal} instance + * @param {STATES} state + * @param {Boolean} isSilent If true, Remodal does not trigger events + * @param {String} Reason of a state change. + */ + function setState(instance, state, isSilent, reason) { + + var newState = namespacify('is', state); + var allStates = [namespacify('is', STATES.CLOSING), + namespacify('is', STATES.OPENING), + namespacify('is', STATES.CLOSED), + namespacify('is', STATES.OPENED)].join(' '); + + instance.$bg + .removeClass(allStates) + .addClass(newState); + + instance.$overlay + .removeClass(allStates) + .addClass(newState); + + instance.$wrapper + .removeClass(allStates) + .addClass(newState); + + instance.$modal + .removeClass(allStates) + .addClass(newState); + + instance.state = state; + !isSilent && instance.$modal.trigger({ + type: state, + reason: reason + }, [{ reason: reason }]); + } + + /** + * Synchronizes with the animation + * @param {Function} doBeforeAnimation + * @param {Function} doAfterAnimation + * @param {Remodal} instance + */ + function syncWithAnimation(doBeforeAnimation, doAfterAnimation, instance) { + var runningAnimationsCount = 0; + + var handleAnimationStart = function(e) { + if (e.target !== this) { + return; + } + + runningAnimationsCount++; + }; + + var handleAnimationEnd = function(e) { + if (e.target !== this) { + return; + } + + if (--runningAnimationsCount === 0) { + + // Remove event listeners + $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) { + instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); + }); + + doAfterAnimation(); + } + }; + + $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) { + instance[elemName] + .on(ANIMATIONSTART_EVENTS, handleAnimationStart) + .on(ANIMATIONEND_EVENTS, handleAnimationEnd); + }); + + doBeforeAnimation(); + + // If the animation is not supported by a browser or its duration is 0 + if ( + getAnimationDuration(instance.$bg) === 0 && + getAnimationDuration(instance.$overlay) === 0 && + getAnimationDuration(instance.$wrapper) === 0 && + getAnimationDuration(instance.$modal) === 0 + ) { + + // Remove event listeners + $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) { + instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); + }); + + doAfterAnimation(); + } + } + + /** + * Closes immediately + * @private + * @param {Remodal} instance + */ + function halt(instance) { + if (instance.state === STATES.CLOSED) { + return; + } + + $.each(['$bg', '$overlay', '$wrapper', '$modal'], function(index, elemName) { + instance[elemName].off(ANIMATIONSTART_EVENTS + ' ' + ANIMATIONEND_EVENTS); + }); + + instance.$bg.removeClass(instance.settings.modifier); + instance.$overlay.removeClass(instance.settings.modifier).hide(); + instance.$wrapper.hide(); + unlockScreen(); + setState(instance, STATES.CLOSED, true); + } + + /** + * Parses a string with options + * @private + * @param str + * @returns {Object} + */ + function parseOptions(str) { + var obj = {}; + var arr; + var len; + var val; + var i; + + // Remove spaces before and after delimiters + str = str.replace(/\s*:\s*/g, ':').replace(/\s*,\s*/g, ','); + + // Parse a string + arr = str.split(','); + for (i = 0, len = arr.length; i < len; i++) { + arr[i] = arr[i].split(':'); + val = arr[i][1]; + + // Convert a string value if it is like a boolean + if (typeof val === 'string' || val instanceof String) { + val = val === 'true' || (val === 'false' ? false : val); + } + + // Convert a string value if it is like a number + if (typeof val === 'string' || val instanceof String) { + val = !isNaN(val) ? +val : val; + } + + obj[arr[i][0]] = val; + } + + return obj; + } + + /** + * Generates a string separated by dashes and prefixed with NAMESPACE + * @private + * @param {...String} + * @returns {String} + */ + function namespacify() { + var result = NAMESPACE; + + for (var i = 0; i < arguments.length; ++i) { + result += '-' + arguments[i]; + } + + return result; + } + + /** + * Handles the hashchange event + * @private + * @listens hashchange + */ + function handleHashChangeEvent() { + var id = location.hash.replace('#', ''); + var instance; + var $elem; + + if (!id) { + + // Check if we have currently opened modal and animation was completed + if (current && current.state === STATES.OPENED && current.settings.hashTracking) { + current.close(); + } + } else { + + // Catch syntax error if your hash is bad + try { + $elem = $( + '[data-' + PLUGIN_NAME + '-id="' + id + '"]' + ); + } catch (err) {} + + if ($elem && $elem.length) { + instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)]; + + if (instance && instance.settings.hashTracking) { + instance.open(); + } + } + + } + } + + /** + * Remodal constructor + * @constructor + * @param {jQuery} $modal + * @param {Object} options + */ + function Remodal($modal, options) { + var $body = $(document.body); + var $appendTo = $body; + var remodal = this; + + remodal.settings = $.extend({}, DEFAULTS, options); + remodal.index = $[PLUGIN_NAME].lookup.push(remodal) - 1; + remodal.state = STATES.CLOSED; + + remodal.$overlay = $('.' + namespacify('overlay')); + + if (remodal.settings.appendTo !== null && remodal.settings.appendTo.length) { + $appendTo = $(remodal.settings.appendTo); + } + + if (!remodal.$overlay.length) { + remodal.$overlay = $('
').addClass(namespacify('overlay') + ' ' + namespacify('is', STATES.CLOSED)).hide(); + $appendTo.append(remodal.$overlay); + } + + remodal.$bg = $('.' + namespacify('bg')).addClass(namespacify('is', STATES.CLOSED)); + + remodal.$modal = $modal + .addClass( + NAMESPACE + ' ' + + namespacify('is-initialized') + ' ' + + remodal.settings.modifier + ' ' + + namespacify('is', STATES.CLOSED)) + .attr('tabindex', '-1'); + + remodal.$wrapper = $('
') + .addClass( + namespacify('wrapper') + ' ' + + remodal.settings.modifier + ' ' + + namespacify('is', STATES.CLOSED)) + .hide() + .append(remodal.$modal); + $appendTo.append(remodal.$wrapper); + + // Add the event listener for the close button + remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="close"]', function(e) { + e.preventDefault(); + + remodal.close(); + }); + + // Add the event listener for the cancel button + remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="cancel"]', function(e) { + e.preventDefault(); + + remodal.$modal.trigger(STATE_CHANGE_REASONS.CANCELLATION); + + if (remodal.settings.closeOnCancel) { + remodal.close(STATE_CHANGE_REASONS.CANCELLATION); + } + }); + + // Add the event listener for the confirm button + remodal.$wrapper.on('click.' + NAMESPACE, '[data-' + PLUGIN_NAME + '-action="confirm"]', function(e) { + e.preventDefault(); + + remodal.$modal.trigger(STATE_CHANGE_REASONS.CONFIRMATION); + + if (remodal.settings.closeOnConfirm) { + remodal.close(STATE_CHANGE_REASONS.CONFIRMATION); + } + }); + + // Add the event listener for the overlay + remodal.$wrapper.on('click.' + NAMESPACE, function(e) { + var $target = $(e.target); + + if (!$target.hasClass(namespacify('wrapper'))) { + return; + } + + if (remodal.settings.closeOnOutsideClick) { + remodal.close(); + } + }); + } + + /** + * Opens a modal window + * @public + */ + Remodal.prototype.open = function() { + var remodal = this; + var id; + + // Check if the animation was completed + if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) { + return; + } + + id = remodal.$modal.attr('data-' + PLUGIN_NAME + '-id'); + + if (id && remodal.settings.hashTracking) { + scrollTop = $(window).scrollTop(); + location.hash = id; + } + + if (current && current !== remodal) { + halt(current); + } + + current = remodal; + lockScreen(); + remodal.$bg.addClass(remodal.settings.modifier); + remodal.$overlay.addClass(remodal.settings.modifier).show(); + remodal.$wrapper.show().scrollTop(0); + remodal.$modal.focus(); + + syncWithAnimation( + function() { + setState(remodal, STATES.OPENING); + }, + + function() { + setState(remodal, STATES.OPENED); + }, + + remodal); + }; + + /** + * Closes a modal window + * @public + * @param {String} reason + */ + Remodal.prototype.close = function(reason) { + var remodal = this; + + // Check if the animation was completed + if (remodal.state === STATES.OPENING || remodal.state === STATES.CLOSING) { + return; + } + + if ( + remodal.settings.hashTracking && + remodal.$modal.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1) + ) { + location.hash = ''; + $(window).scrollTop(scrollTop); + } + + syncWithAnimation( + function() { + setState(remodal, STATES.CLOSING, false, reason); + }, + + function() { + remodal.$bg.removeClass(remodal.settings.modifier); + remodal.$overlay.removeClass(remodal.settings.modifier).hide(); + remodal.$wrapper.hide(); + unlockScreen(); + + setState(remodal, STATES.CLOSED, false, reason); + }, + + remodal); + }; + + /** + * Returns a current state of a modal + * @public + * @returns {STATES} + */ + Remodal.prototype.getState = function() { + return this.state; + }; + + /** + * Destroys a modal + * @public + */ + Remodal.prototype.destroy = function() { + var lookup = $[PLUGIN_NAME].lookup; + var instanceCount; + + halt(this); + this.$wrapper.remove(); + + delete lookup[this.index]; + instanceCount = $.grep(lookup, function(instance) { + return !!instance; + }).length; + + if (instanceCount === 0) { + this.$overlay.remove(); + this.$bg.removeClass( + namespacify('is', STATES.CLOSING) + ' ' + + namespacify('is', STATES.OPENING) + ' ' + + namespacify('is', STATES.CLOSED) + ' ' + + namespacify('is', STATES.OPENED)); + } + }; + + /** + * Special plugin object for instances + * @public + * @type {Object} + */ + $[PLUGIN_NAME] = { + lookup: [] + }; + + /** + * Plugin constructor + * @constructor + * @param {Object} options + * @returns {JQuery} + */ + $.fn[PLUGIN_NAME] = function(opts) { + var instance; + var $elem; + + this.each(function(index, elem) { + $elem = $(elem); + + if ($elem.data(PLUGIN_NAME) == null) { + instance = new Remodal($elem, opts); + $elem.data(PLUGIN_NAME, instance.index); + + if ( + instance.settings.hashTracking && + $elem.attr('data-' + PLUGIN_NAME + '-id') === location.hash.substr(1) + ) { + instance.open(); + } + } else { + instance = $[PLUGIN_NAME].lookup[$elem.data(PLUGIN_NAME)]; + } + }); + + return instance; + }; + + $(document).ready(function() { + + // data-remodal-target opens a modal window with the special Id + $(document).on('click', '[data-' + PLUGIN_NAME + '-target]', function(e) { + e.preventDefault(); + + var elem = e.currentTarget; + var id = elem.getAttribute('data-' + PLUGIN_NAME + '-target'); + var $target = $('[data-' + PLUGIN_NAME + '-id="' + id + '"]'); + + $[PLUGIN_NAME].lookup[$target.data(PLUGIN_NAME)].open(); + }); + + // Auto initialization of modal windows + // They should have the 'remodal' class attribute + // Also you can write the `data-remodal-options` attribute to pass params into the modal + $(document).find('.' + NAMESPACE).each(function(i, container) { + var $container = $(container); + var options = $container.data(PLUGIN_NAME + '-options'); + + if (!options) { + options = {}; + } else if (typeof options === 'string' || options instanceof String) { + options = parseOptions(options); + } + + $container[PLUGIN_NAME](options); + }); + + // Handles the keydown event + $(document).on('keydown.' + NAMESPACE, function(e) { + if (current && current.settings.closeOnEscape && current.state === STATES.OPENED && e.keyCode === 27) { + current.close(); + } + }); + + // Handles the hashchange event + $(window).on('hashchange.' + NAMESPACE, handleHashChangeEvent); + }); +}); diff --git a/digitalglarus/templates/digitalglarus/dist/remodal.min.js b/digitalglarus/templates/digitalglarus/dist/remodal.min.js new file mode 100644 index 00000000..c5978d8c --- /dev/null +++ b/digitalglarus/templates/digitalglarus/dist/remodal.min.js @@ -0,0 +1,10 @@ +/* + * Remodal - v1.1.0 + * Responsive, lightweight, fast, synchronized with CSS animations, fully customizable modal window plugin with declarative configuration and hash tracking. + * http://vodkabears.github.io/remodal/ + * + * Made by Ilya Makarov + * Under MIT License + */ + +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof exports?b(a,require("jquery")):b(a,a.jQuery||a.Zepto)}(this,function(a,b){"use strict";function c(a){if(w&&"none"===a.css("animation-name")&&"none"===a.css("-webkit-animation-name")&&"none"===a.css("-moz-animation-name")&&"none"===a.css("-o-animation-name")&&"none"===a.css("-ms-animation-name"))return 0;var b,c,d,e,f=a.css("animation-duration")||a.css("-webkit-animation-duration")||a.css("-moz-animation-duration")||a.css("-o-animation-duration")||a.css("-ms-animation-duration")||"0s",g=a.css("animation-delay")||a.css("-webkit-animation-delay")||a.css("-moz-animation-delay")||a.css("-o-animation-delay")||a.css("-ms-animation-delay")||"0s",h=a.css("animation-iteration-count")||a.css("-webkit-animation-iteration-count")||a.css("-moz-animation-iteration-count")||a.css("-o-animation-iteration-count")||a.css("-ms-animation-iteration-count")||"1";for(f=f.split(", "),g=g.split(", "),h=h.split(", "),e=0,c=f.length,b=Number.NEGATIVE_INFINITY;eb&&(b=d);return b}function d(){if(b(document.body).height()<=b(window).height())return 0;var a,c,d=document.createElement("div"),e=document.createElement("div");return d.style.visibility="hidden",d.style.width="100px",document.body.appendChild(d),a=d.offsetWidth,d.style.overflow="scroll",e.style.width="100%",d.appendChild(e),c=e.offsetWidth,d.parentNode.removeChild(d),a-c}function e(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)||(c=b(document.body),a=parseInt(c.css("padding-right"),10)+d(),c.css("padding-right",a+"px"),e.addClass(f))}}function f(){if(!x){var a,c,e=b("html"),f=k("is-locked");e.hasClass(f)&&(c=b(document.body),a=parseInt(c.css("padding-right"),10)-d(),c.css("padding-right",a+"px"),e.removeClass(f))}}function g(a,b,c,d){var e=k("is",b),f=[k("is",u.CLOSING),k("is",u.OPENING),k("is",u.CLOSED),k("is",u.OPENED)].join(" ");a.$bg.removeClass(f).addClass(e),a.$overlay.removeClass(f).addClass(e),a.$wrapper.removeClass(f).addClass(e),a.$modal.removeClass(f).addClass(e),a.state=b,!c&&a.$modal.trigger({type:b,reason:d},[{reason:d}])}function h(a,d,e){var f=0,g=function(a){a.target===this&&f++},h=function(a){a.target===this&&0===--f&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())};b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].on(r,g).on(s,h)}),a(),0===c(e.$bg)&&0===c(e.$overlay)&&0===c(e.$wrapper)&&0===c(e.$modal)&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(a,b){e[b].off(r+" "+s)}),d())}function i(a){a.state!==u.CLOSED&&(b.each(["$bg","$overlay","$wrapper","$modal"],function(b,c){a[c].off(r+" "+s)}),a.$bg.removeClass(a.settings.modifier),a.$overlay.removeClass(a.settings.modifier).hide(),a.$wrapper.hide(),f(),g(a,u.CLOSED,!0))}function j(a){var b,c,d,e,f={};for(a=a.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),b=a.split(","),e=0,c=b.length;e").addClass(k("overlay")+" "+k("is",u.CLOSED)).hide(),e.append(f.$overlay)),f.$bg=b("."+k("bg")).addClass(k("is",u.CLOSED)),f.$modal=a.addClass(q+" "+k("is-initialized")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).attr("tabindex","-1"),f.$wrapper=b("
").addClass(k("wrapper")+" "+f.settings.modifier+" "+k("is",u.CLOSED)).hide().append(f.$modal),e.append(f.$wrapper),f.$wrapper.on("click."+q,'[data-remodal-action="close"]',function(a){a.preventDefault(),f.close()}),f.$wrapper.on("click."+q,'[data-remodal-action="cancel"]',function(a){a.preventDefault(),f.$modal.trigger(v.CANCELLATION),f.settings.closeOnCancel&&f.close(v.CANCELLATION)}),f.$wrapper.on("click."+q,'[data-remodal-action="confirm"]',function(a){a.preventDefault(),f.$modal.trigger(v.CONFIRMATION),f.settings.closeOnConfirm&&f.close(v.CONFIRMATION)}),f.$wrapper.on("click."+q,function(a){var c=b(a.target);c.hasClass(k("wrapper"))&&f.settings.closeOnOutsideClick&&f.close()})}var n,o,p="remodal",q=a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.NAMESPACE||p,r=b.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(a){return a+"."+q}).join(" "),s=b.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(a){return a+"."+q}).join(" "),t=b.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},a.REMODAL_GLOBALS&&a.REMODAL_GLOBALS.DEFAULTS),u={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},v={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},w=function(){var a=document.createElement("div").style;return void 0!==a.animationName||void 0!==a.WebkitAnimationName||void 0!==a.MozAnimationName||void 0!==a.msAnimationName||void 0!==a.OAnimationName}(),x=/iPad|iPhone|iPod/.test(navigator.platform);m.prototype.open=function(){var a,c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(a=c.$modal.attr("data-remodal-id"),a&&c.settings.hashTracking&&(o=b(window).scrollTop(),location.hash=a),n&&n!==c&&i(n),n=c,e(),c.$bg.addClass(c.settings.modifier),c.$overlay.addClass(c.settings.modifier).show(),c.$wrapper.show().scrollTop(0),c.$modal.focus(),h(function(){g(c,u.OPENING)},function(){g(c,u.OPENED)},c))},m.prototype.close=function(a){var c=this;c.state!==u.OPENING&&c.state!==u.CLOSING&&(c.settings.hashTracking&&c.$modal.attr("data-remodal-id")===location.hash.substr(1)&&(location.hash="",b(window).scrollTop(o)),h(function(){g(c,u.CLOSING,!1,a)},function(){c.$bg.removeClass(c.settings.modifier),c.$overlay.removeClass(c.settings.modifier).hide(),c.$wrapper.hide(),f(),g(c,u.CLOSED,!1,a)},c))},m.prototype.getState=function(){return this.state},m.prototype.destroy=function(){var a,c=b[p].lookup;i(this),this.$wrapper.remove(),delete c[this.index],a=b.grep(c,function(a){return!!a}).length,0===a&&(this.$overlay.remove(),this.$bg.removeClass(k("is",u.CLOSING)+" "+k("is",u.OPENING)+" "+k("is",u.CLOSED)+" "+k("is",u.OPENED)))},b[p]={lookup:[]},b.fn[p]=function(a){var c,d;return this.each(function(e,f){d=b(f),null==d.data(p)?(c=new m(d,a),d.data(p,c.index),c.settings.hashTracking&&d.attr("data-remodal-id")===location.hash.substr(1)&&c.open()):c=b[p].lookup[d.data(p)]}),c},b(document).ready(function(){b(document).on("click","[data-remodal-target]",function(a){a.preventDefault();var c=a.currentTarget,d=c.getAttribute("data-remodal-target"),e=b('[data-remodal-id="'+d+'"]');b[p].lookup[e.data(p)].open()}),b(document).find("."+q).each(function(a,c){var d=b(c),e=d.data("remodal-options");e?("string"==typeof e||e instanceof String)&&(e=j(e)):e={},d[p](e)}),b(document).on("keydown."+q,function(a){n&&n.settings.closeOnEscape&&n.state===u.OPENED&&27===a.keyCode&&n.close()}),b(window).on("hashchange."+q,l)})}); \ No newline at end of file diff --git a/digitalglarus/templates/digitalglarus/edit_credit_card.html b/digitalglarus/templates/digitalglarus/edit_credit_card.html new file mode 100644 index 00000000..8fbe2224 --- /dev/null +++ b/digitalglarus/templates/digitalglarus/edit_credit_card.html @@ -0,0 +1,293 @@ +{% extends "new_base_glarus.html" %} +{% load staticfiles bootstrap3 i18n %} +{% block content %} + + + +
+ +
+
+
+ + + + +
+
+
+
+
+ Digital Glarus
+ In der Au 7 Schwanden 8762 Switzerland +
info@digitalglarus.ch +
+ (044) 534-66-22 +

 

+
+
+

 

+
+
+
+
+ + +{% if stripe_key %} + +{%endif%} + + + + +{% endblock %} \ No newline at end of file diff --git a/digitalglarus/templates/digitalglarus/login.html b/digitalglarus/templates/digitalglarus/login.html index 41f859d6..2465c751 100644 --- a/digitalglarus/templates/digitalglarus/login.html +++ b/digitalglarus/templates/digitalglarus/login.html @@ -1,3 +1,4 @@ + {% extends "new_base_glarus.html" %} {% load staticfiles bootstrap3 i18n %} {% block content %} diff --git a/digitalglarus/templates/digitalglarus/membership_deactivated.html b/digitalglarus/templates/digitalglarus/membership_deactivated.html index 9eeb5c39..408a9350 100644 --- a/digitalglarus/templates/digitalglarus/membership_deactivated.html +++ b/digitalglarus/templates/digitalglarus/membership_deactivated.html @@ -44,8 +44,9 @@
{% csrf_token %} + Go back - Go back + @@ -59,7 +60,7 @@ - + + +
diff --git a/digitalglarus/templates/digitalglarus/membership_payment.html b/digitalglarus/templates/digitalglarus/membership_payment.html index 1ff64b0b..0e68be43 100644 --- a/digitalglarus/templates/digitalglarus/membership_payment.html +++ b/digitalglarus/templates/digitalglarus/membership_payment.html @@ -19,18 +19,17 @@ padding-right: 1.5em } - @media screen and (min-width: 768px) { - } +@media screen and (min-width: 768px) { - #cancel-subscription-modal .modal-dialog {width:1000px;} - -.glyphicon-flag { + cancel-subscription-modal .modal-dialog {width:1000px;} + + .glyphicon-flag { font-size: 44px; display: block; text-align: center; margin: 30px auto 30px; color: #88c7d7; - + } .price2 { @@ -38,7 +37,47 @@ -moz-background-size: cover; } + + cancel-subscription-modal .modal-body { + max-height: 800px; + } + } +@media screen and (min-width: 780px) { + + cancel-subscription-modal .modal-dialog {width:1000px;} + + .glyphicon-flag { + font-size: 44px; + display: block; + text-align: center; + margin: 30px auto 30px; + color: #88c7d7; + + } + .price2 { + + + -webkit-background-size: cover; + -moz-background-size: cover; + +} + + +} + + +@media screen and (min-width: 982px) { + + cancel-subscription-modal .modal-dialog {width:600px;} + + + cancel-subscription-modal .modal-body { + max-height: 600px; + } + +} + @@ -81,7 +120,8 @@
- + +
@@ -211,19 +251,23 @@ -