The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<!DOCTYPE html>
<HTML>
<!-- TODO: make sure this passes. May have to revisit how uploads are done -->

<HEAD>
 <TITLE>Yote System</TITLE>

    <script src="/yote/js"></script>
<script lang="javascript">

$().ready( function() { 

    $.yote.debug = true;
    $.yote.init();

    var tanl_app = $.yote.fetch_app( 'Yote::Test::TestAppNoLogin' );
    var tanl_app = $.yote.fetch_app( 'Yote::Test::TestAppNoLogin' );
    tanl_app.reset();
    var files = tanl_app.get_Files();

    $( '#scratch' ).append( '<HR><input type=file id="fileup2" name="file"> <input type=file id="fileup3" name="file"><button type=button id=fileup_b2>Upload</button><BR>' );
    
    $( '#fileup_b2' ).click( function() {
	tanl_app.Upload( { somevar : 'someval', 
			   somefile : $.yote.upload( '#fileup2' ),
			   somefile_2 : $.yote.upload( '#fileup3' ),
			 },
			 function(x) {
			     //refresh the app for now. build in autorefresh later
			     //tanl_app = $.yote.fetch_app( 'Yote::Test::TestAppNoLogin' );
			     if( files.length() == 0 ) {
				 alert( 'uploads failed' );
			     }
			     if( files.length() == 2 ) {
				 $( '#scratch' ).append( '<img src=' + files.get(0).Url() + '> and <img src=' + files.get(1).Url() + '>' );
			     } else if( files.length() == 1 ) {
				 $( '#scratch' ).append( '<img src=' + files.get(0).Url() + '> and none' );
			     }
			 },
		       function(e) { alert( "Got error " + e ); });
    } );
} );
</script>

</HEAD>
<BODY>
  <H1>Yote Admin</H1>
  <div class=maindiv>
    <div id=login>
    </div>
    <div id=apps>  
    </div>
  </div>
  
  <div id=scratch>
  </div>
  
</BODY>
</HTML>