|
Lines 22-34
$(document).ready(function(){
Link Here
|
| 22 |
$("input[name='disable_input']").click(function() { |
22 |
$("input[name='disable_input']").click(function() { |
| 23 |
var row = $(this).attr("id"); |
23 |
var row = $(this).attr("id"); |
| 24 |
row = row.replace("row","hint"); |
24 |
row = row.replace("row","hint"); |
| 25 |
var subfield = $(this).next(); |
25 |
var editor = $(this).parent().find("[name='field_value']"); |
| 26 |
if ($(this).is(":checked")){ |
26 |
if ($(this).is(":checked")) { |
| 27 |
$(this).val($(this).siblings("[name='subfield']").val()); |
27 |
$(this).val($(this).siblings("[name='subfield']").val()); |
| 28 |
$(subfield).prop('disabled', true); |
28 |
$(editor).prop('disabled', true); |
| 29 |
$("#"+row).html(_("This subfield will be deleted")); |
29 |
$("#"+row).html(_("This subfield will be deleted")); |
| 30 |
} else { |
30 |
} else { |
| 31 |
$(subfield).prop('disabled', false); |
31 |
$(editor).prop('disabled', false); |
| 32 |
$("#"+row).html(""); |
32 |
$("#"+row).html(""); |
| 33 |
} |
33 |
} |
| 34 |
}); |
34 |
}); |
| 35 |
- |
|
|