<!-- BEGIN resources/new_data_file.tt -->
[% META title = "Resources &raquo; New data file" %]
    
    [% IF error %]
        <p class="error">Error: [% error %]</p>
    [% END %]
    
    <h2>Upload New Data File</h2>
	
	[% INCLUDE site/snippets/help.tt file = 'newdatafile' %]
    
    <script language="javascript" type="text/javascript">
        function retreiveFile(s) {
            s.value = "  Retreiving file ...  ";
	 		return true;
        }
		function sendFile(s) {
			s.value = "  Sending...  ";
			return true;
		}
    // End -->
    </script>
    
    <div class="indent">
        <form method="post" action="[% app_url %]/resources/get_data_file"
            onSubmit="return retreiveFile(this.dataFileUrl)">
			<input type="hidden" name="method" value="url" />
            <p>
                <span class="title">A. Remote file</span>
                (must be .zip or .csv file):
            </p>
            <p class="indent">
                <input name="url" type="text" size="70" />
                <input type='submit' value='Submit' name='dataFileUrl' class='button' />
                <br />
                <a href="[% c.cfg('settings').cfh_downloads %]" target="_blank">
					view data files</a>
            </p>
        </form>
        
        <form method="post" action="[% app_url %]/resources/get_data_file"
            enctype="multipart/form-data" onsubmit="return sendFile(this.dataFile)">
			<input type="hidden" name="method" value="upload" />
            <p>
                <span class="title">B. Local file</span>
                (must be .zip or .csv file):
            </p>
            <p class="indent">
                <input type="file" name="data_file" size="30" />
                <input type='submit' value='Submit' name='dataFile' class='button' />
            </p>    
        </form>
    </div>
<!-- END resources/new_data_file.tt -->