I replaced the code in the `item.edit` file of the Products Attributes plugin with the code below, which I prepared and which works. Is it correct?
<h3 id="title-product-attributes" class="product-attributes-h3"><?php _e('Products attributes', 'products_attributes') ; ?></h3>
<table class="product-attributes">
<tr id="row-make">
<?php if( Session::newInstance()->_getForm('pp_make') != '' ) { $detail['s_make'] = Session::newInstance()->_getForm('pp_make'); } ?>
<td><label for="prodMake"><?php _e('Make', 'products_attributes'); ?></label></td>
<td><input type="text" name="prodMake" id="prodMake" value="<?php if(@$detail['s_make'] != ''){echo @$detail['s_make']; } ?>" size="20" /></td>
</tr>
<tr id="row-model">
<?php if( Session::newInstance()->_getForm('pp_model') != '' ) { $detail['s_model'] = Session::newInstance()->_getForm('pp_model'); } ?>
<td><label for="prodModel"><?php _e('Model', 'products_attributes'); ?></label></td>
<td><input type="text" name="prodModel" id="prodModel" value="<?php if(@$detail['s_model']){echo @$detail['s_model']; } ?>" size="20" /></td>
</tr>
</table>
<script type="text/javascript">
jQuery(document).ready(function($) {
var statusField = $('[name="sCondition"]');
function checkStatus() {
if (statusField.val() == '2') {
$('#title-product-attributes').show();
$('#row-make').show();
$('#row-model').show();
} else {
$('#title-product-attributes').hide();
$('#row-make').hide();
$('#row-model').hide();
}
}
checkStatus();
statusField.on('change', function() {
checkStatus();
});
});
</script>