function TemplateFieldAddDialog(){var b=$(this);var a=false;var c=pwModalWindow(b.attr("href"),{},"large");c.load(function(){var e;var d=[];var f=c.contents();var g=0;f.find("#breadcrumbs ul.nav, #Inputfield_submit_save_field_copy").hide();f.find("#content form button.ui-button[type=submit]").each(function(){var k=$(this).text();var j=false;e=$(this);for(var h=0;h").val(j).text(f.find("#Inputfield_name").val()));$('#fieldgroup_fields option[value="'+j+'"]').attr("id","asm0option"+i).attr("data-desc",(f.find("#field_label").val())).attr("data-status",(f.find("#Inputfield_type option:selected").text()));$("#asmSelect0 option").eq(1).before($("").val(j).text(f.find("#Inputfield_name").val()));$("#asmSelect0").find("option:selected").removeAttr("selected");$('#asmSelect0 option[value="'+j+'"]').attr("rel","asm0option"+i).attr("selected","selected").addClass("asmOptionDisabled").attr("disabled","disabled").trigger("change").removeAttr("selected")},500)}}}c.setButtons(d)});return false}$(document).ready(function(){$("#wrap_fieldgroup_fields p.description a").click(TemplateFieldAddDialog)});