mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 19:51:30 +00:00
updated streamline-setup v2
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
$(document).ready(function () {
|
||||
var max_fields = 4; //maximum reference area/name divs allowed
|
||||
var x = 1; //initial reference area/name div count
|
||||
|
||||
$(".add_field").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
if (x < max_fields) {
|
||||
x++;
|
||||
var copy = $('.copy').clone();
|
||||
copy.attr("class", 'row input_fields_wrap');
|
||||
copy.attr("id", 'copy' + x);
|
||||
copy.append('<a href="#" class="remove_field" style="color: maroon"><sup>X</sup></a>');
|
||||
copy.insertAfter('.copy');
|
||||
}
|
||||
});
|
||||
|
||||
$(".input_fields_wrap").on("click", ".remove_field", function (e) {
|
||||
e.preventDefault();
|
||||
$(this).parent('div').remove();
|
||||
x--;
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user