Lines 1-10
Link Here
|
1 |
var core = [ [% whole.core %] ]; |
1 |
var core = [ [% whole.core %] ]; |
|
|
2 |
var opac = [ [% opac %] ]; |
2 |
document.addEventListener('DOMContentLoaded', function() { |
3 |
document.addEventListener('DOMContentLoaded', function() { |
3 |
$('#add-new-fields').click(function(e) { |
4 |
$('#add-new-fields').click(function(e) { |
4 |
e.preventDefault(); |
5 |
e.preventDefault(); |
5 |
var row = '<li class="form-horizontal">' + |
6 |
var row = '<li class="form-horizontal">' + |
6 |
'<input type="text" class="custom-name" name="custom_key">' + |
7 |
'<input type="text" class="custom-name ' + |
7 |
'<input type="text" id="custom-value" name="custom_value"> '+ |
8 |
( opac ? 'form-control input-fluid custom-field-input' : '') + |
|
|
9 |
'" name="custom_key" placeholder="key">' + |
10 |
'<input type="text" id="custom-value" name="custom_value" class="' + |
11 |
( opac ? 'form-control input-fluid custom-field-input' : '') +'" placeholder="value"> ' + |
8 |
'<button type="button" class="btn btn-danger btn-sm ' + |
12 |
'<button type="button" class="btn btn-danger btn-sm ' + |
9 |
'delete-new-field">' + |
13 |
'delete-new-field">' + |
10 |
'<span class="fa fa-delete">' + |
14 |
'<span class="fa fa-delete">' + |
11 |
- |
|
|