diff --git a/src/classes/XLite/View/Model/Attribute.php b/src/classes/XLite/View/Model/Attribute.php index de570cf912..aaf36f86e6 100644 --- a/src/classes/XLite/View/Model/Attribute.php +++ b/src/classes/XLite/View/Model/Attribute.php @@ -72,9 +72,7 @@ public function getModelId() protected function getFormFieldsForSectionDefault() { if ($this->getModelObject()->getId()) { - if ($this->getModelObject()->getAttributeValuesCount()) { - $this->schemaDefault['type'][self::SCHEMA_COMMENT] = 'There are products using this attribute!'; - } + $this->schemaDefault['type'][self::SCHEMA_COMMENT] = 'Before editing attriubutes specific for the chosen type you should save the changes'; if ( \XLite\Model\Attribute::TYPE_NUMBER == $this->getModelObject()->getType() @@ -83,14 +81,14 @@ protected function getFormFieldsForSectionDefault() self::SCHEMA_CLASS => 'XLite\View\FormField\Select\Decimals', self::SCHEMA_LABEL => 'Decimals', self::SCHEMA_REQUIRED => false, - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'edit-decimals', + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'edit-decimals custom-field', ); $this->schemaDefault['unit'] = array( self::SCHEMA_CLASS => 'XLite\View\FormField\Input\Text', self::SCHEMA_LABEL => 'Unit', self::SCHEMA_REQUIRED => false, self::SCHEMA_COMMENT => '(suffix)', - \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'edit-unit', + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'edit-unit custom-field', ); } @@ -105,6 +103,7 @@ protected function getFormFieldsForSectionDefault() self::SCHEMA_REQUIRED => false, 'rows' => 1, 'maxHeight' => 100, + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'custom-field', ); } @@ -116,6 +115,7 @@ protected function getFormFieldsForSectionDefault() self::SCHEMA_LABEL => 'Allowed attribute values and default one', self::SCHEMA_REQUIRED => false, \XLite\View\FormField\ItemsList::PARAM_LIST_CLASS => 'XLite\View\ItemsList\Model\AttributeOption', + \XLite\View\FormField\AFormField::PARAM_WRAPPER_CLASS => 'custom-field', ); } } diff --git a/src/skins/admin/en/attributes/script.js b/src/skins/admin/en/attributes/script.js index 21d734be60..63e28a03c7 100644 --- a/src/skins/admin/en/attributes/script.js +++ b/src/skins/admin/en/attributes/script.js @@ -18,8 +18,10 @@ popup.postprocessRequest = function(XMLHttpRequest, textStatus, data, isValid) { function () { if (jQuery(this).data('value') == jQuery(this).val()) { jQuery('.select-attributetypes .form-field-comment').hide(); + jQuery('li.custom-field').show(); } else { jQuery('.select-attributetypes .form-field-comment').show(); + jQuery('li.custom-field').hide(); } } ); diff --git a/src/skins/admin/en/attributes/style.css b/src/skins/admin/en/attributes/style.css index 7fc78d5098..ae9fa75125 100644 --- a/src/skins/admin/en/attributes/style.css +++ b/src/skins/admin/en/attributes/style.css @@ -206,6 +206,10 @@ div.group table.list th.actions.left { float: left; } +.ajax-container-loadable .model-properties div.table-value.values-value { + width: 400px; +} + .ajax-container-loadable div.button.submit { text-align: center; } @@ -218,10 +222,12 @@ div.group table.list th.actions.left { .ajax-container-loadable .select-attributetypes div.table-value .form-field-comment { background: url("../images/icon_warning_round.png") no-repeat scroll 20px center transparent; - padding: 1px 0 0 50px; + padding-left: 50px; color: #456583; float: left; display: none; + line-height: 12px; + max-width: 300px; } .ajax-container-loadable div.table-value .form-field-comment {