diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 66b699ca0..f360002d4 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -203,36 +203,59 @@ // Add another asset tag + serial combination if the plus sign is clicked $(document).ready(function() { - var max_fields = 10; //maximum input boxes allowed + var max_fields = 3; //maximum input boxes allowed var wrapper = $(".input_fields_wrap"); //Fields wrapper var add_button = $(".add_field_button"); //Add button ID - var box_html = ''; + var x = 1; //initial text box count + var base_increment = $("#asset_tag").val(); + var incremented_tag = base_increment.replace(/[^\d]/g, ''); + + - var x = 1; //initial text box count $(add_button).click(function(e){ //on add input button click - e.preventDefault(); - if(x < max_fields){ //max input box allowed - x++; //text box increment - box_html += '