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

* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate.

* Toggles the disabled state of auto_increment_prefix

To insert a prefix you had to toggle the checkbox, save the settings and reload. With this script it is immediate. Fixes #1390
This commit is contained in:
Andrea Bergamasco 2017-02-16 06:51:30 +01:00 committed by snipe
parent c67b44b3d5
commit 9975d55249

View file

@ -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