Fix License Settings tab visibility and update README (v0.5.6)

- License Settings tab now only shows for licensed and licensed-variable product types
- Fixed CSS that forced show_if_licensed to always display
- Improved JavaScript for proper tab show/hide on product type change
- Updated README.md with complete v0.5.x feature documentation:
  - Variable Licensed Products
  - Multi-Domain Licensing
  - Per-License Customer Secrets
  - Download Statistics
  - Configurable Rate Limiting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-27 11:29:56 +01:00
parent 279b0d5dd6
commit 5f51aafe3b
5 changed files with 79 additions and 19 deletions

View File

@@ -202,22 +202,28 @@ final class LicensedProductType
<script type="text/javascript">
jQuery(document).ready(function($) {
// Show/hide panels based on product type
$('select#product-type').change(function() {
if ($(this).val() === 'licensed') {
function toggleLicensedProductOptions() {
var productType = $('#product-type').val();
var isLicensed = productType === 'licensed';
var isLicensedVariable = productType === 'licensed-variable';
if (isLicensed || isLicensedVariable) {
$('.show_if_licensed').show();
$('.show_if_licensed-variable').show();
$('.general_options').show();
$('.pricing').show();
$('.general_tab').show();
} else {
$('.show_if_licensed').hide();
$('.show_if_licensed-variable').hide();
}
}).change();
}
// Show general tab for licensed products
$('#product-type').on('change', function() {
if ($(this).val() === 'licensed') {
$('.general_tab').show();
}
});
// Initial state on page load
toggleLicensedProductOptions();
// On product type change
$('#product-type').on('change', toggleLicensedProductOptions);
});
</script>
<?php