diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/InputElement.vue b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/InputElement.vue index 15cac8870..6edff7209 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/InputElement.vue +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/components/app/properties/InputElement.vue @@ -28,4 +28,8 @@ const theModel = computed({ + + + + diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/InputElement.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/InputElement.ts index b0940b7d0..c465f8296 100644 --- a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/InputElement.ts +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/InputElement.ts @@ -6,6 +6,8 @@ export default class InputElement extends BaseElement { required: boolean = false name: string = "" xmlType: string = "input" + minValue: int = 0 + maxValue: int = 0 constructor() { super(); @@ -19,6 +21,8 @@ export default class InputElement extends BaseElement { 'placeHolder': this.placeholder, 'default': this.default, 'name': this.name, + 'minValue': this.minValue, + 'maxValue': this.maxValue, 'required': this.required }) } @@ -29,5 +33,7 @@ export default class InputElement extends BaseElement { this.default = obj.default this.required = obj.required this.placeHolder = obj.placeHolder + this.minValue = obj.minValue + this.maxValue = obj.maxValue } } diff --git a/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts new file mode 100644 index 000000000..2cabe95f5 --- /dev/null +++ b/src/new/var/plugins/Custom/PSC/FormBuilder/FormBuilderTS/src/model/MediaElement.ts @@ -0,0 +1,27 @@ +import BaseElement from "./BaseElement"; + +export default class MediaElement extends BaseElement { + default: string = "" + name: string = "" + xmlType: string = "img" + + constructor() { + super(); + this.type = 8 + } + + public toJSON() { + return Object.assign( + super.toJSON(), + { + 'default': this.default, + 'name': this.name, + }) + } + + fromJSON(obj) { + super.fromJSON(obj) + this.name = obj.name + this.default = obj.default + } +} diff --git a/src/old/application/design/vorlagen/tailwindcss_wp/articletemplates/scripts/6.phtml b/src/old/application/design/vorlagen/tailwindcss_wp/articletemplates/scripts/6.phtml index 874b05a44..6d7604f27 100644 --- a/src/old/application/design/vorlagen/tailwindcss_wp/articletemplates/scripts/6.phtml +++ b/src/old/application/design/vorlagen/tailwindcss_wp/articletemplates/scripts/6.phtml @@ -15,30 +15,30 @@ } echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");'; } - if($this->layouterSession) { - echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");'; - } +if($this->layouterSession) { + echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");'; +} - ?> +?> window.onload = function() { load || $this->rebuy) { - echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");'; - } - if($this->layouterSession) { - echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");'; - } + if ($this->load || $this->rebuy) { + echo '$("#upload_mode").val("' . TP_Basket::getBasket()->getTempProduct($this->article->uuid)->getUploadMode() . '");'; + } +if($this->layouterSession) { + echo '$("#upload_mode").val("' . $this->layouterSession->layouter_modus . '");'; +} - ?> +?> $('#in_basket').removeClass('disabled'); }
-
-
+
+
Summe diff --git a/src/old/public/styles/vorlagen/tailwindcss_wp/js/calc.js b/src/old/public/styles/vorlagen/tailwindcss_wp/js/calc.js index 3366a06b0..9e445f715 100644 --- a/src/old/public/styles/vorlagen/tailwindcss_wp/js/calc.js +++ b/src/old/public/styles/vorlagen/tailwindcss_wp/js/calc.js @@ -66,7 +66,8 @@ $(function(){ method: 'post', data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), success: function(result){ - document.location="/basket"; + parent.postMessage({action: 'setBasketCount', data: 0}, '*'); + parent.postMessage({action: 'redirectBasket'}, '*'); } }); return false; @@ -78,7 +79,8 @@ $(function(){ method: 'post', data: JSON.stringify({productUUId: productUUId, values: formArray, count: 1, uploadMode: $('#upload_mode').val(), deliveryDate: delivery_date, deliveryInfo: delivery_info, xmlProduct: xmlProduct }), success: function(result){ - document.location="/basket"; + parent.postMessage({action: 'setBasketCount', data: 0}, '*'); + parent.postMessage({action: 'redirectBasket'}, '*'); } }); return false; @@ -435,13 +437,13 @@ function buildForm(elements, display_group = "", validElements = []) { } $element = $('
').addClass("form-controls"); - $inputGroup = $('
'); + $inputGroup = $('
'); $inputGroup.appendTo($element); $obj.appendTo($inputGroup); addOrReplaceFormElement(previousId, element.id, $container, $element, $label, element.valid, display_group); if(element.helpLink) { - $obj.after(''); + $obj.after(''); } previousId = element.id; @@ -482,6 +484,5 @@ function addOrReplaceFormElement(previousId, id, $container, $element, $label, v } } function modalopen(href) { - $('.help-modal').load(href,function(){ - $('#myModal').modal({show:true});}); + window.open(href); }