[BUGFIX] Fields are not enabled properly
authorAlex Kellner <alexander.kellner@in2code.de>
Thu, 8 Oct 2015 11:42:12 +0000 (13:42 +0200)
committerAlex Kellner <alexander.kellner@in2code.de>
Thu, 8 Oct 2015 11:42:12 +0000 (13:42 +0200)
Replaced replaceProp(property) with prop(property, false) in JavaScript

Related: #70035

Classes/UserFunc/GetPowermailFields.php
Resources/Public/JavaScript/PowermailCondition.js

index 529777a..0ac4bbf 100644 (file)
@@ -215,7 +215,7 @@ class GetPowermailFields {
         * @return string
         */
        protected function getLabelFromFieldProperties(array $properties) {
-               return $properties['title'] . ' , {' . $properties['marker'] . '}, uid' . $properties['uid'];
+               return $properties['title'] . ', {' . $properties['marker'] . '}, uid' . $properties['uid'];
        }
 
        /**
index 5dc02cc..989da29 100644 (file)
@@ -55,7 +55,7 @@ function PowermailCondition($formElement) {
         */
        this.sendFormValuesToPowermailCond = function() {
                var formToSend = $(that.$formElement.get(0));
-               var tempEnabledFields = formToSend.find(':disabled').removeProp('disabled');
+               var tempEnabledFields = formToSend.find(':disabled').prop('disabled', false);
                var dataToSend = new FormData(that.$formElement.get(0));
                tempEnabledFields.prop('disabled', true);
                jQuery.ajax({
@@ -116,7 +116,7 @@ function PowermailCondition($formElement) {
         * @returns {void}
         */
        this.showField = function($field) {
-               $field.removeProp('disabled');
+               $field.prop('disabled', false);
                $field.closest('.powermail_fieldwrap').show();
                that.rerequireField($field);
        };
@@ -161,7 +161,7 @@ function PowermailCondition($formElement) {
         */
        this.derequireField = function($field) {
                if ($field.prop('required') || $field.data('parsley-required')) {
-                       $field.removeProp('required');
+                       $field.prop('required', false);
                        $field.removeAttr('data-parsley-required');
                        $field.data('powermailcond-required', 'required');
                }