<commit_before><%
upload_field = type.name.underscore
-%>
<p id="upload_as_file">
    <b>File to upload</b>
    <span class="required">*</span><br/>
    <%= file_field upload_field, :data -%><br/>
	or <%= link_to_function "Register using a URL","$('#{upload_field}_data').value='';"+visual_effect(:toggle_blind,"upload_as_file")+";"+visual_effect(:toggle_blind,"upload_as_url") -%>
</p>

<p id="upload_as_url" style="display:none;">
	<b>Add via URL</b>
	<span class="required">*</span><br/>
	<%= text_field upload_field,:data_url,:size=>50 -%>
	<span id="test_url_result"></span>
	<%= link_to_remote "Test", 
		  :url=>{:action=>:test_asset_url,:controller=>:data_files},
          :method=>:post,
		  :with=>"$('#{upload_field}_data_url').serialize()",
		  :update=>'test_url_result',
          :before=>"show_ajax_loader('test_url_result');"          
	-%>
	<br/>
	<b>Store local copy?</b>
	<%= check_box_tag :local_copy -%><br/>
	or <%= link_to_function "Upload as a File","$('#{upload_field}_data_url').value='';"+visual_effect(:toggle_blind,"upload_as_url")+";"+visual_effect(:toggle_blind,"upload_as_file") -%>
</p><commit_msg>fixed attributes in upload form to match code changes in controller<commit_after><%
upload_field = type.name.underscore
-%>
<p id="upload_as_file">
    <b>File to upload</b>
    <span class="required">*</span><br/>
    <%= file_field upload_field, :data -%><br/>
	or <%= link_to_function "Register using a URL","$('#{upload_field}_data').value='';"+visual_effect(:toggle_blind,"upload_as_file")+";"+visual_effect(:toggle_blind,"upload_as_url") -%>
</p>

<p id="upload_as_url" style="display:none;">
	<b>Add via URL</b>
	<span class="required">*</span><br/>
	<%= text_field upload_field,:data_url,:size=>50 -%>
	<span id="test_url_result"></span>
	<%= link_to_remote "Test", 
		  :url=>{:action=>:test_asset_url,:controller=>:data_files},
          :method=>:post,
		  :with=>"$('#{upload_field}_data_url').serialize()",
		  :update=>'test_url_result',
          :before=>"show_ajax_loader('test_url_result');"          
	-%>
	<br/>
	<b>Store local copy?</b>
	<%= check_box upload_field, :local_copy -%><br/>
	or <%= link_to_function "Upload as a File","$('#{upload_field}_data_url').value='';"+visual_effect(:toggle_blind,"upload_as_url")+";"+visual_effect(:toggle_blind,"upload_as_file") -%>
</p>
{'fraction_non_alphanumeric': 0.22532188841201717, 'fraction_numerical': 0.0017167381974248926, 'mean_word_length': 6.1503067484662575, 'pattern_counts': {'":': 0, '<': 59, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4419257', 'n_tokens_mistral': 910, 'n_tokens_neox': 865, 'n_words': 118}