Skip to content

A free open source IT asset/license management system

jQuery script to toggle the disabled state of auto_increment_prefix (#3292)

Andrea Bergamasco9975d552494b
diff --git a/resources/views/settings/edit.blade.php b/resources/views/settings/edit.blade.php
index 63f362a278..abf60a1a90 100755
--- a/resources/views/settings/edit.blade.php
+++ b/resources/views/settings/edit.blade.php
@@ -975,5 +975,11 @@
<script>
//color picker with addon
$(".header-color").colorpicker();
+// toggle the disabled state of asset id prefix
+$('#auto_increment_assets').on('ifChecked', function(){
+ $('#auto_increment_prefix').prop('disabled', false).focus();
+}).on('ifUnchecked', function(){
+ $('#auto_increment_prefix').prop('disabled', true);
+});
</script>
@stop