1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes: #3318 - Increases length of platform name and slug to 64 characters (#3353)

This commit is contained in:
Daniel Sheppard
2019-09-06 13:01:27 -05:00
committed by GitHub
parent 9c6dbd7337
commit 050f2478d3
4 changed files with 31 additions and 4 deletions

View File

@@ -47,9 +47,10 @@ $(document).ready(function() {
});
if (slug_field) {
var slug_source = $('#id_' + slug_field.attr('slug-source'));
var slug_length = slug_field.attr('maxlength');
slug_source.on('keyup change', function() {
if (slug_field && !slug_field.attr('_changed')) {
slug_field.val(slugify($(this).val(), 50));
slug_field.val(slugify($(this).val(), (slug_length ? slug_length : 50)));
}
})
}