$("input[name='disable_input']").click(function() {
var row = $(this).attr("id");
row = row.replace("row","hint");
- var subfield = $(this).next();
- if ($(this).is(":checked")){
+ var editor = $(this).parent().find("[name='field_value']");
+ if ($(this).is(":checked")) {
$(this).val($(this).siblings("[name='subfield']").val());
- $(subfield).prop('disabled', true);
+ $(editor).prop('disabled', true);
$("#"+row).html(_("This subfield will be deleted"));
} else {
- $(subfield).prop('disabled', false);
+ $(editor).prop('disabled', false);
$("#"+row).html("");
}
});