my $authtypecode = $input->param('authtypecode');
my $breedingid = $input->param('breedingid');
my $dbh = C4::Context->dbh;
if(!$authtypecode) {
$authtypecode = $authid ? Koha::Authorities->find($authid)->authtypecode : '';
// Create a new form that will be POSTed in the new window
var form = $('<form>').attr({
method: 'post',
action: "/cgi-bin/authorities/authorities.pl",
action: "/cgi-bin/koha/authorities/authorities.pl",
target: "new_auth_popup"
});
//add the authtypecode
value: $(this).val()
}));
$('body').append(form);
form.submit();
form.remove();
-