root 4 лет назад
Родитель
Сommit
de66c94b08

+ 94 - 3
check_configure_nextcloud.tpl

@@ -23,7 +23,6 @@
                 if( this.responseText.trim() == 'yes') {
                     console.log("Response: " + this.responseText);
                     $(customFields[4]).prop("disabled",false);
-                    $(customFields[5]).prop("disabled",true);
                     $(customFields[2]).addClass('has-success');
                     $(customFields[2]).css('background-color', '#0f03');;
                     $("#hintHead").text('');
@@ -37,7 +36,7 @@
                     $(customFields[5]).prop("disabled",true);
                     $(customFields[2]).addClass('has-error');
                     $(customFields[2]).css('background-color', '#f003');;
-                    $("#hintHead").text('Benutzername ' + $(customFields[2]).val() + ' nicht verfügbar!');
+                    $("#hintHead").text('Der Benutzername ' + $(customFields[2]).val() + ' ist nicht verfügbar!');
                     $("#hintLength").text('');
                     $("#hintNumeric").text('');
                     $("#hintSymbols").text('');
@@ -67,9 +66,98 @@
                 }
             }
         };
-        xhttp.open("GET", "modules/servers/nextcloud/nextcloudUserAvailable.php?name=" + username + '&pid=' + pid, true);
+        xhttp.open("GET", "modules/servers/nextcloud/nextCloudUserAvailable.php?name=" + username + '&pid=' + pid, true);
         xhttp.send();
     };
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    {literal}
+    function checkEMail ( email, pid) {
+        var mailRegex = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;
+	var validEMail = email.match(mailRegex);
+        if(validEMail == null) {
+            console.log("Invalid EMail: "+email);
+            $(customFields[4]).prop("disabled",true);
+            $(customFields[5]).prop("disabled",true);
+            $(customFields[3]).addClass('has-error');
+            $(customFields[3]).css('background-color', '#f003');;
+            $("#hintHead").text('Bitte eine gültige E-Mail-Adresse angeben.');
+            $("#hintLength").text('');
+            $("#hintNumeric").text('');
+            $("#hintSymbols").text('');
+            $("#hintUpperLower").text('');
+            return;
+        }
+        var xhttp = new XMLHttpRequest();
+        var success = false;
+        console.log("E-Mail: " + email);
+        xhttp.open("GET", "modules/servers/nextcloud/nextCloudEMailAvailable.php?email=" + email + '&pid=' + pid, false);
+        xhttp.send();
+
+	console.log("Ready State: " + xhttp.readyState);
+	console.log("Status:      " + xhttp.status);
+        if (xhttp.readyState == 4 && xhttp.status == 200) {
+                if( xhttp.responseText.trim() == 'yes') {
+                    $(customFields[4]).prop("disabled",false);
+                    $(customFields[5]).prop("disabled",true);
+                    $(customFields[3]).addClass('has-success');
+                    $(customFields[3]).css('background-color', '#0f03');;
+                    $("#hintHead").text('');
+                    $("#hintLength").text('');
+                    $("#hintNumeric").text('');
+                    $("#hintSymbols").text('');
+                    $("#hintUpperLower").text('');
+                } else if (xhttp.responseText.trim() == 'no') {
+                    console.log("Response: " + xhttp.responseText);
+                    $(customFields[4]).prop("disabled",true);
+                    $(customFields[5]).prop("disabled",true);
+                    $(customFields[3]).addClass('has-error');
+                    $(customFields[3]).css('background-color', '#f003');;
+                    $("#hintHead").text('E-Mail ' + $(customFields[3]).val() + ' nicht verfügbar!');
+                    $("#hintLength").text('');
+                    $("#hintNumeric").text('');
+                    $("#hintSymbols").text('');
+                    $("#hintUpperLower").text('');
+                } else if (xhttp.responseText.trim() == 'invalid') {
+                    console.log("Response: " + xhttp.responseText);
+                    $(customFields[4]).prop("disabled",true);
+                    $(customFields[5]).prop("disabled",true);
+                    $(customFields[3]).addClass('has-error');
+                    $(customFields[3]).css('background-color', '#f003');;
+                    $("#hintHead").text('Die E-Mail Adresse ist ungültig.');
+                    $("#hintLength").text('');
+                    $("#hintNumeric").text('');
+                    $("#hintSymbols").text('');
+                    $("#hintUpperLower").text('');
+                } else {
+                    console.log("Response: " + xhttp.responseText);
+                    $(customFields[4]).prop("disabled",true);
+                    $(customFields[5]).prop("disabled",true);
+                    $(customFields[3]).addClass('has-error');
+                    $(customFields[3]).css('background-color', '#f003');;
+                    $("#hintHead").text('Bei der Abfrage ist ein Fehler aufgetreten, es kann nicht fortgefahren werden. Bitte kontaktieren Sie den Support');
+                    $("#hintLength").text('');
+                    $("#hintNumeric").text('');
+                    $("#hintSymbols").text('');
+                    $("#hintUpperLower").text('');
+                }
+        }
+
+        
+    };
+    {/literal}
+    
+    
+    
+    
     jQuery(document).ready(function(){
         customFields = $("*[id^='customfield']");
         $("#btnCompleteProductConfig").prop("disabled",true);
@@ -83,6 +171,9 @@
         $(customFields[2]).blur(function () {
             checkUserName( $(customFields[2]).val(), {$productinfo['pid']});
         });
+        $(customFields[3]).blur(function () {
+            checkEMail( $(customFields[3]).val(), {$productinfo['pid']});
+        });
         $(customFields[4]).focus (function () {
             $("#hintHead").text('Tipps für ein gutes Passwort');
             $("#hintLength").text('Benutzen Sie mindestens 8 Zeichen');

+ 2 - 1
common.tpl

@@ -1,3 +1,4 @@
 <link rel="stylesheet" type="text/css" href="{$WEB_ROOT}/templates/orderforms/{$carttpl}/css/all.min.css?v={$versionHash}" />
 <link rel="stylesheet" type="text/css" href="{$WEB_ROOT}/templates/orderforms/{$carttpl}/css/style.css" />
-<script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/{$carttpl}/js/scripts.min.js?v={$versionHash}"></script>
+<!-- <script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/{$carttpl}/js/scripts.min.js?v={$versionHash}"></script> -->
+<script type="text/javascript" src="{$WEB_ROOT}/templates/orderforms/{$carttpl}/js/scripts.js?v={$versionHash}"></script>

+ 4 - 2
configure_groupware.tpl

@@ -1,3 +1,5 @@
+<!-- Start of Template configure_groupware.tpl -->
+
 {include file="orderforms/{$carttpl}/common.tpl"}
 <script>
 var _localLang = {
@@ -323,7 +325,7 @@ var _localLang = {
                                         <div class="form-group">
                                         <div class="alert alert-info">
                                             <h5 style="margin:0px;">Erweiterte Nutzungsbedingungen für Thurmail Business</h5>
-                                            Der Service darf nur für eine Domain genutzt werden, für die der Nutzer Inhaber ist oder von diesem beauftragt wurde.
+                                            Der Service darf nur für eine Domain genutzt werden, für die der Nutzer Inhaber ist, oder von diesem beauftragt wurde.
                                         </div>
                                         {$customfields[1].input}
                                         <label for="customfield{$customfields[1].id}"> {$customfields[1].name}</label>
@@ -349,7 +351,7 @@ var _localLang = {
                                             <div class="panel-body">
                                                <input type="checkbox" name="addons[{$addon.id}]"{if $addon.status} checked{/if} />
                                                 <span class="panel-addon-name">{$addon.name}</span>
-												<span class="panel-addon-price">{$addon.pricing}</span>
+						<span class="panel-addon-price">{$addon.pricing}</span>
                                                 <p class="text-muted">{$addon.description}</p>
                                             </div>
                                         </div>

+ 11 - 3
configure_nextcloud.tpl

@@ -1,3 +1,5 @@
+<!-- Start of Template configure_nextcloud.tpl -->
+
 {*
 This is the orderform template for the nextcloud product
 This template requires a list of custom fields in exact this order:
@@ -24,6 +26,8 @@ var _localLang = {
 	{include file="templates/orderforms/{$carttpl}/layouts/head.tpl"}
 {/if}
 
+
+
 <div id="order-standard_cart">
 
     <div class="row">
@@ -450,18 +454,22 @@ var _localLang = {
                                     {$output}
                                 </div>
                             {/foreach}
-							
-							
+			    <!-- Addon Products -->
                             <div class="row addon-products">
                                 {foreach $addons as $addon}
+                                    <!-- Addon Products {$addon.name} -->
                                     <div class="col-sm-{if count($addons) > 1}6{else}12{/if}"">
                                         <div class="panel panel-default panel-addon{if $addon.status} panel-addon-selected{/if}">
                                             <div class="panel-body">
                                                <input type="checkbox" name="addons[{$addon.id}]"{if $addon.status} checked{/if} />
                                                 <span class="panel-addon-name">{$addon.name}</span>
-												<span class="panel-addon-price">{$addon.pricing}</span>
+						<span class="panel-addon-price">{$addon.pricing}</span>
                                                 <p class="text-muted">{$addon.description}</p>
                                             </div>
+                                            <div class="panel-add">
+                                        	<i class="fas fa-plus"></i>
+                                        	{$LANG.addtocart}
+                                            </div>
                                         </div>
                                     </div>
                                 {/foreach}

+ 2 - 0
configure_privat_mail.tpl

@@ -1,5 +1,7 @@
 {include file="orderforms/{$carttpl}/common.tpl"}
 
+<!-- Start of Template configure_private_mail.tpl -->
+
 <script>
 var _localLang = {
     'addToCart': '{$LANG.orderForm.addToCart|escape}',

+ 2 - 0
configure_seafile.tpl

@@ -1,3 +1,5 @@
+<!-- Start of Template configure_seafile.tpl -->
+
 {*
 This is the orderform template for the seafile product
 This template requires a list of custom fields in exact this order:

+ 3 - 0
configure_thurvcloud.tpl

@@ -1,5 +1,6 @@
 {include file="orderforms/{$carttpl}/common.tpl"}
 
+<!-- Start of Template configure_thurvcloud.tpl -->
 <script>
 var _localLang = {
     'addToCart': '{$LANG.orderForm.addToCart|escape}',
@@ -11,6 +12,8 @@ var _localLang = {
 	{include file="templates/orderforms/{$carttpl}/layouts/head.tpl"}
 {/if}
 
+
+
 <div id="order-standard_cart">
 
     <div class="row">

+ 1 - 1
configureproduct.tpl

@@ -1,5 +1,5 @@
 {* 
-route configureproduct by gorupname
+route configureproduct by group id or name
 *}
 
 {* 

+ 30 - 17
configureproduct_default.tpl

@@ -11,20 +11,21 @@ var _localLang = {
 	{include file="templates/orderforms/{$carttpl}/layouts/head.tpl"}
 {/if}
 
+
+<!-- configureproduct_default.tpl -->
 <div id="order-standard_cart">
 
     <div class="row">
 
         <div class="col-md-12">
-			{if file_exists("templates/orderforms/{$carttpl}/layouts/head.tpl")}
-			{else}
-            <div class="header-lined">
-                <h1>{$LANG.orderconfigure}</h1>
-            </div>
-			{/if}
-			
-			{include file="orderforms/{$carttpl}/sidebar-categories-collapsed.tpl"}
-
+		{if file_exists("templates/orderforms/{$carttpl}/layouts/head.tpl")}
+		{else}
+        	    <div class="header-lined">
+            		<h1>{$LANG.orderconfigure}</h1>
+        	    </div>
+		{/if}
+		
+		{include file="orderforms/{$carttpl}/sidebar-categories-collapsed.tpl"}
         </div>
 
         <div class="col-md-12">
@@ -208,7 +209,6 @@ var _localLang = {
 
                             </div>
                         {/if}
-
                         {if $configurableoptions}
                             <div class="sub-heading">
                                 <span>{$LANG.orderconfigpackage}</span>
@@ -264,7 +264,8 @@ var _localLang = {
                                         {elseif $configoption.optiontype eq 4}
                                             <div class="col-sm-12">
                                                 <div class="form-group">
-                                                    <label for="inputConfigOption{$configoption.id}">{$configoption.optionname}</label>
+
+                                                    <label for="inputConfigOption{$configoption.id}">{$configoption.optionname|unescape:"html"}</label>
                                                     {if $configoption.qtymaximum}
                                                         {if !$rangesliderincluded}
                                                             <script type="text/javascript" src="{$orderform.assetPath.js}/ion.rangeSlider.min.js"></script>
@@ -352,18 +353,30 @@ var _localLang = {
                                     {$output}
                                 </div>
                             {/foreach}
-							
-							
+			    <!-- Product Addons -->
                             <div class="row addon-products">
                                 {foreach $addons as $addon}
+                            	    <!-- Product Addon {$addon.name} -->
                                     <div class="col-sm-{if count($addons) > 1}6{else}12{/if}"">
                                         <div class="panel panel-default panel-addon{if $addon.status} panel-addon-selected{/if}">
                                             <div class="panel-body">
-                                               <input type="checkbox" name="addons[{$addon.id}]"{if $addon.status} checked{/if} />
+                                                <input type="checkbox" name="addons[{$addon.id}]"{if $addon.status} checked{/if} />
                                                 <span class="panel-addon-name">{$addon.name}</span>
-												<span class="panel-addon-price">{$addon.pricing}</span>
+						<span class="panel-addon-price">{$addon.pricing}</span>
                                                 <p class="text-muted">{$addon.description}</p>
                                             </div>
+                                            {if $addon.allowsQuantity === 2}
+                                        	<div class="alert alert-info text-center">
+                                        	    <table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
+                                        		<tr><td valign="top"><i class="fas fa-info-circle" style="font-size:120%"></i></td>
+                    					    <td valign="top">
+                                        	    		Es sind multiple Quantitäten bestellbar<br />
+                                        			Mehrere Clients können im nächsten Dialog ausgewählt werden
+                                        		    </td>
+                                        		</tr>
+                                        	    </table>
+                                        	</div>
+                                    	    {/if}
                                         </div>
                                     </div>
                                 {/foreach}
@@ -372,8 +385,8 @@ var _localLang = {
                         {/if}
 
                         <div class="alert alert-warning text-center">
-                            <i class="fas fa-question-circle"></i>
-                            {$LANG.orderForm.haveQuestionsContact} <a href="contact.php" target="_blank" class="alert-link">{$LANG.orderForm.haveQuestionsClickHere}</a>
+                    		<i class="fas fa-question-circle">
+                    		{$LANG.orderForm.haveQuestionsContact} <a href="contact.php" target="_blank" class="alert-link">{$LANG.orderForm.haveQuestionsClickHere}</a>
                         </div>
 
                     </div>

+ 1 - 0
js/PasswordStrength.js

@@ -0,0 +1 @@
+../../../croster/thurdata/js/PasswordStrength.js

+ 1 - 0
js/jquery.payment.js

@@ -0,0 +1 @@
+../../../croster/thurdata/js/jquery.payment.js

+ 1 - 1
ordersummary.tpl

@@ -10,7 +10,7 @@
     {foreach $producttotals.configoptions as $configoption}
         {if $configoption}
             <div class="clearfix">
-                <span class="pull-left float-left">&nbsp;&raquo; {$configoption.name}: {$configoption.optionname}</span>
+                <span class="pull-left float-left">&nbsp;&raquo; {$configoption.name|unescape:"html"}: {$configoption.optionname|unescape:"html"}</span>
                 <span class="pull-right float-right">{$configoption.recurring}{if $configoption.setup} + {$configoption.setup} {$LANG.ordersetupfee}{/if}</span>
             </div>
         {/if}

+ 0 - 3
products.tpl

@@ -1,9 +1,6 @@
 {include file="orderforms/{$carttpl}/common.tpl"}
 
 <!-- Start of Template: orderforms/thurdata/products.tpl -->
-{*
-{debug}
-*}
 
 	{if count($products) < 4}
 	<style rel="stylesheet" type="text/css">

+ 46 - 41
viewcart.tpl

@@ -327,11 +327,14 @@
                                                         {/if}
                                                         <div class="col-sm-4 item-price">
                                                             <span>{$product.pricing.totalTodayExcludingTaxSetup}</span>
-                                                            <span class="cycle">{$product.billingcyclefriendly}</span>
-                                                            {if $product.pricing.productonlysetup}
-                                                                {$product.pricing.productonlysetup->toPrefixed()} {$LANG.ordersetupfee}
-                                                            {/if}
-                                                            {if $product.proratadate}<br />({$LANG.orderprorata} {$product.proratadate}){/if}
+                                                            <span class="cycle">
+                                                        	    {$product.billingcyclefriendly}
+                                                        	    {if $product.pricing.productonlysetup}
+                                                        		    <br />
+                                                            		    + {$product.pricing.productonlysetup->toPrefixed()} {$LANG.ordersetupfee}
+                                                        	    {/if}
+                                                        	    {if $product.proratadate}<br />({$LANG.orderprorata} {$product.proratadate}){/if}
+                                                            </span>
                                                         </div>
                                                         <div class="col-sm-1 hidden-xs d-none d-sm-block">
                                                             <button type="button" class="btn btn-icon btn-xs" data-toggle="tooltip" data-placement="top" data-trigger="manual" title="{$LANG.orderForm.remove}" onclick="removeItem('p', '{$num}')">
@@ -340,42 +343,44 @@
                                                         </div>
                                                     </div>
 
-                                                    {foreach $product.addons as $addonnum => $addon}
-                                                        <div class="item-addons">
-                                                            <div class="row">
-                                                                <div class="{if $showAddonQtyOptions}col-sm-5{else}col-sm-7{/if}">
-                                                                    <span class="item-group">
-                                                                        {$LANG.orderaddon}
-                                                                    </span>
-                                                                    <span class="item-title">
-                                                                        {$addon.name}
-                                                                    </span>
-                                                                    {if $addon.setup}
-                                                                        <span class="item-setup">
-                                                                            {$addon.setup} {$LANG.ordersetupfee}
-                                                                        </span>
-                                                                    {/if}
-                                                                </div>
-																{if $showAddonQtyOptions}
-																	<div class="col-sm-2 item-qty">
-																		{if $addon.allowqty === 2}
-																			<input type="number" name="paddonqty[{$num}][{$addonnum}]" value="{$addon.qty}" class="form-control text-center" min="0" />
-																			<button type="submit" class="btn btn-xs">
-																				{$LANG.orderForm.update}
-																			</button>
-																		{/if}
-																	</div>
-																{/if}
-                                                                <div class="col-sm-4 item-price">
-                                                                    <span>{$addon.totaltoday}</span>
-                                                                    <span class="cycle">{$addon.billingcyclefriendly}</span>
-                                                                </div>
-                                                            </div>
-                                                        </div>
-                                                    {/foreach}
-                                                </div>
-
-                                            {/foreach}
+                                                    {foreach $product.addons as $addonnum => $addon}
+                                                        <div class="item-addons">
+                                                            <div class="row">
+                                                                <div class="{if $showAddonQtyOptions}col-sm-3{else}col-sm-6{/if}">
+                                                                    <span class="item-group">
+                                                                        {$LANG.orderaddon}
+                                                                    </span>
+                                                                    <span class="item-title">
+                                                                        {$addon.name}
+                                                                    </span>
+                                                                    {if $addon.setup}
+                                                                        <span class="item-setup">
+                                                                            {$addon.setup} {$LANG.ordersetupfee}
+                                                                        </span>
+                                                                    {/if}
+                                                                </div>
+                                                                <!-- Addon Quantity Options -->
+								{if $showAddonQtyOptions}
+								    <div class="col-sm-4 item-qty" style="padding-top: 15px; font-size:13px;">
+									{if $addon.allowqty === 2}
+										Anzahl&nbsp; <input type="number" name="paddonqty[{$num}][{$addonnum}]" value="{$addon.qty}" class="form-control text-center" style="width:53px;height:25px !important; padding-left:1px; padding-right:1px;" min="0" />
+										<!-- <button type="submit" class="btn btn-xs"> -->
+										<button type="submit" class="btn btn-default btn-xs" style="height:25px !important; padding-top: 2px;">
+										    {$LANG.orderForm.update}
+										</button>
+									{/if}
+								    </div>
+								{/if}
+                                                                <div class="col-sm-4 item-price">
+                                                                    <span>{$addon.totaltoday}</span>
+                                                                    <span class="cycle">{$addon.billingcyclefriendly}</span>
+                                                                </div>
+                                                                <div class="col-sm-1 hidden-xs d-none d-sm-block">.</div>
+                                                            </div>
+                                                        </div>
+                                                    {/foreach}
+                                                </div>
+                                            {/foreach}
 
                                             {foreach $addons as $num => $addon}
                                                 <div class="panel-body">