|
@@ -1,5 +1,5 @@
|
|
|
-<div moe wide class="pt-2">
|
|
|
- <a class="" href="" show start>Update Note Reasons</a>
|
|
|
+<div moe wide class="">
|
|
|
+ <a class="" href="" show start><i class="fa fa-edit"></i></a>
|
|
|
<form url="/api/note/update-note-reasons">
|
|
|
<input type="hidden" name="uid" value="{{$note->uid}}">
|
|
|
<table class="table table-sm table-condensed" id="note-reasons-table">
|
|
@@ -17,9 +17,7 @@
|
|
|
<td><input type="text" class="form-control note-reason-icd" data-index="{{$loop->index}}" id="icd_{{$loop->index}}" name="noteReasonDTOs[{{$loop->index}}].code" value="{{$reason->code}}"></td>
|
|
|
<td><input type="text" class="form-control note-reason-description" data-index="{{$loop->index}}" id="description_{{$loop->index}}" name="noteReasonDTOs[{{$loop->index}}].description" value="{{$reason->description}}"></td>
|
|
|
<td>
|
|
|
- @if(!$loop->first)
|
|
|
- <a href="" class="btn-remove-row">-</a>
|
|
|
- @endif
|
|
|
+ <button class="btn btn-sm btn-info btn-remove-row">-</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@endforeach
|
|
@@ -28,21 +26,21 @@
|
|
|
<td><input type="text" class="form-control note-reason-icd" data-index="0" id="icd_0" name="noteReasonDTOs[0].code"></td>
|
|
|
<td><input type="text" class="form-control note-reason-description" data-index="0" id="description_0" name="noteReasonDTOs[0].description"></td>
|
|
|
<td>
|
|
|
- <a href="" class="btn-remove-row">-</a>
|
|
|
+ <button class="btn btn-sm btn-info btn-remove-row">-</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="data-row">
|
|
|
<td><input type="text" class="form-control note-reason-icd" data-index="1" id="icd_1" name="noteReasonDTOs[1].code"></td>
|
|
|
<td><input type="text" class="form-control note-reason-description" data-index="1" id="description_1" name="noteReasonDTOs[1].description"></td>
|
|
|
<td>
|
|
|
- <a href="" class="btn-remove-row">-</a>
|
|
|
+ <button class="btn btn-sm btn-info btn-remove-row">-</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr class="data-row">
|
|
|
<td><input type="text" class="form-control note-reason-icd" data-index="2" id="icd_2" name="noteReasonDTOs[2].code"></td>
|
|
|
<td><input type="text" class="form-control note-reason-description" data-index="2" id="description_2" name="noteReasonDTOs[2].description"></td>
|
|
|
<td>
|
|
|
- <a href="" class="btn-remove-row">-</a>
|
|
|
+ <button class="btn btn-sm btn-info btn-remove-row">-</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@endif
|
|
@@ -62,13 +60,13 @@
|
|
|
$(".btn-add-row").click(function() {
|
|
|
var rowCount = $('#note-reasons-table').find('tr').length;
|
|
|
var nextIndex = rowCount -1;
|
|
|
- var $clone = $('#note-reasons-table tr.data-row:first').clone();
|
|
|
- $($clone).find('input').attr('data-index', nextIndex);
|
|
|
- $($clone).find('input.note-reason-icd').attr('name','noteReasonDTOs['+nextIndex+'].code').val('');
|
|
|
- $($clone).find('input.note-reason-icd').attr('id','icd_'+nextIndex);
|
|
|
- $($clone).find('input.note-reason-description').attr('name','noteReasonDTOs['+nextIndex+'].description').val('');
|
|
|
- $($clone).find('input.note-reason-description').attr('id','description_'+nextIndex);
|
|
|
- $('#note-reasons-table').append($clone);
|
|
|
+ var clone = $('#note-reasons-table tr.data-row:first').clone();
|
|
|
+ clone.find('input').attr('data-index', nextIndex);
|
|
|
+ clone.find('input.note-reason-icd').attr('name','noteReasonDTOs['+nextIndex+'].code').val('');
|
|
|
+ clone.find('input.note-reason-icd').attr('id','icd_'+nextIndex);
|
|
|
+ clone.find('input.note-reason-description').attr('name','noteReasonDTOs['+nextIndex+'].description').val('');
|
|
|
+ clone.find('input.note-reason-description').attr('id','description_'+nextIndex);
|
|
|
+ $('#note-reasons-table').append(clone);
|
|
|
attachAutocompleterToField(nextIndex);
|
|
|
|
|
|
return false;
|