#access_admin()
#set ($obj = $packagelists)
#set ($r = $obj.load($params.key))
#set ($Integer = 0)
#set ($obj.priority = $Integer.parseInt($params.priority))
#set ($obj.description = $params.description)
#if ($params.autoUpdate)
#set ($obj.autoUpdate=true)
#else
#set ($obj.autoUpdate=false)
#end
#if ($params.atomic)
#set ($obj.atomic=true)
#else
#set ($obj.atomic=false)
#end
#if ($params.approvalRequired)
#set ($obj.approvalRequired=true)
#else
#set ($obj.approvalRequired=false)
#end
#if ($params.approved)
#set ($obj.approved=true)
#else
#set ($obj.approved=false)
#end
#set ($origin=$obj.class.newInstance())
#set ($dummy=$origin.load($params.origin))
#if ($dummy)
#set ($obj.origin=$origin.id)
#else
#set ($obj.origin=0)
#end
$obj.save()
#return_to_index("packagelists")
