package SGN::View::Mason::Commands;
use strict;
use vars qw($m $c);
HTML::Mason::Component::FileBased->new(
'code' => sub {
use utf8; local $SGN::View::Mason::Commands::m = $HTML::Mason::Commands::m;
HTML::Mason::Exception::Params->throw
    ( error =>
      "Odd number of parameters passed to component expecting name/value pairs"
    ) if @_ % 2;
my ( $object_type, $object_id, $form_name, $server_side_script, $form_div_name, $js_object_name, $page_url, $alternate_new_button, $alternate_ghosted_new_button, $alternate_delete_button, $alternate_ghosted_delete_button, $alternate_ghosted_edit_button, $alternate_edit_button );
{
    my %pos;
    for ( my $x = 0; $x < @_; $x += 2 )
    {
        $pos{ $_[$x] } = $x + 1;
    }

    foreach my $arg ( qw( object_type form_name server_side_script form_div_name js_object_name ) )
    {
        HTML::Mason::Exception::Params->throw
            ( error => "no value sent for required parameter '$arg'" )
                unless exists $pos{$arg};
    }
#line 66 "/home/production/cxgn/sgn/mason/page/form.mas"
    $object_type = $_[ $pos{'object_type'} ];
#line 67 "/home/production/cxgn/sgn/mason/page/form.mas"
     $object_id = exists $pos{'object_id'} ? $_[ $pos{'object_id'} ] :  undef;
#line 68 "/home/production/cxgn/sgn/mason/page/form.mas"
    $form_name = $_[ $pos{'form_name'} ];
#line 69 "/home/production/cxgn/sgn/mason/page/form.mas"
    $server_side_script = $_[ $pos{'server_side_script'} ];
#line 70 "/home/production/cxgn/sgn/mason/page/form.mas"
    $form_div_name = $_[ $pos{'form_div_name'} ];
#line 71 "/home/production/cxgn/sgn/mason/page/form.mas"
    $js_object_name = $_[ $pos{'js_object_name'} ];
#line 72 "/home/production/cxgn/sgn/mason/page/form.mas"
     $page_url = exists $pos{'page_url'} ? $_[ $pos{'page_url'} ] :  '';
#line 73 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_new_button = exists $pos{'alternate_new_button'} ? $_[ $pos{'alternate_new_button'} ] :  undef;
#line 74 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_ghosted_new_button = exists $pos{'alternate_ghosted_new_button'} ? $_[ $pos{'alternate_ghosted_new_button'} ] :  undef;
#line 75 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_delete_button = exists $pos{'alternate_delete_button'} ? $_[ $pos{'alternate_delete_button'} ] :  undef;
#line 76 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_ghosted_delete_button = exists $pos{'alternate_ghosted_delete_button'} ? $_[ $pos{'alternate_ghosted_delete_button'} ] :  undef;
#line 77 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_ghosted_edit_button = exists $pos{'alternate_ghosted_edit_button'} ? $_[ $pos{'alternate_ghosted_edit_button'} ] :  undef;
#line 78 "/home/production/cxgn/sgn/mason/page/form.mas"
     $alternate_edit_button = exists $pos{'alternate_edit_button'} ? $_[ $pos{'alternate_edit_button'} ] :  undef;
}
$m->debug_hook( $m->current_comp->path ) if ( HTML::Mason::Compiler::IN_PERL_DB() );

#line 1 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '

' );
#line 64 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '
' );
#line 80 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '
' );
#line 81 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->comp(   '/util/import_javascript.mas', classes => ["CXGN.Page.Form.JSFormPage"]   
); #line 81 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '

<table><tr><td><div id="' );
#line 83 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $form_div_name  );
#line 83 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '_buttons" >[loading edit links...]</div>
</td></tr></table>
<div id="' );
#line 85 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $form_div_name  );
#line 85 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '" >[loading...]</div>

<script language="javascript" type="text/javascript">

  var ' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( ' = new CXGN.Page.Form.JSFormPage( \'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $object_id  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\' , \'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $object_type  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\', \'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $server_side_script  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\', \'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $form_div_name  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\', \'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\',\'' );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $page_url  );
#line 89 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 90 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_new_button)) { 
$m->print( '     ' );
#line 91 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 91 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setNewButton(\'' );
#line 91 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_new_button  );
#line 91 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 92 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '
' );
#line 94 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_ghosted_new_button)) { 
$m->print( '     ' );
#line 95 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 95 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setGhostedNewButton(\'' );
#line 95 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_ghosted_new_button  );
#line 95 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 96 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '
' );
#line 98 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_delete_button)) { 
$m->print( '     ' );
#line 99 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 99 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setDeleteButton(\'' );
#line 99 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_delete_button  );
#line 99 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 100 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '
' );
#line 102 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_ghosted_delete_button)) { 
$m->print( '     ' );
#line 103 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 103 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setGhostedDeleteButton(\'' );
#line 103 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_ghosted_delete_button  );
#line 103 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 104 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '
' );
#line 106 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_edit_button)) { 
$m->print( '     ' );
#line 107 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 107 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setEditButton(\'' );
#line 107 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_edit_button  );
#line 107 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 108 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '
' );
#line 110 "/home/production/cxgn/sgn/mason/page/form.mas"
 if (defined($alternate_ghosted_edit_button)) { 
$m->print( '     ' );
#line 111 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 111 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.setGhostedEditButton(\'' );
#line 111 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $alternate_ghosted_edit_button  );
#line 111 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '\');
' );
#line 112 "/home/production/cxgn/sgn/mason/page/form.mas"
 }
$m->print( '

  ' );
#line 115 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print(  $js_object_name  );
#line 115 "/home/production/cxgn/sgn/mason/page/form.mas"
$m->print( '.render();
  
</script>  


' );
;return;
},
'declared_args' => {
  '$alternate_delete_button' => { default => ' undef' },
  '$alternate_edit_button' => { default => ' undef' },
  '$alternate_ghosted_delete_button' => { default => ' undef' },
  '$alternate_ghosted_edit_button' => { default => ' undef' },
  '$alternate_ghosted_new_button' => { default => ' undef' },
  '$alternate_new_button' => { default => ' undef' },
  '$form_div_name' => { default => undef },
  '$form_name' => { default => undef },
  '$js_object_name' => { default => undef },
  '$object_id' => { default => ' undef' },
  '$object_type' => { default => undef },
  '$page_url' => { default => ' \'\'' },
  '$server_side_script' => { default => undef }
},
'load_time' => 1763082844,

)
;