<div class="control-group">
  <label class="control-label muted"><%= t("client_management.#{field_name}") %></label>
  <div class="controls">
    <label style="float: left;border-color: #666666" class="btn">
      <%= f.file_field field_name , :style=>"position: absolute;width: 0.00000001em;",:class=>field_name %>
      <% if f.object[field_name].blank?%>
      	<%= t('client_management.select_file') %>
      <% else %>
      	<%= t('client_management.change_file') %>
      <% end %>
    </label>
    <div class="filename <%=field_name%>" style="float: left;margin-left: 0.3em; "><%= f.object[field_name] %></div>
  </div>
</div>
<script type="text/javascript">
	$("input[type=\"file\"].<%=field_name%>").change(function(){
	    var file_name = "";
	    if($(this).prop("files").length != 0){
	      file_name = $(this).prop("files")[0].name;
	    }
	    $(this).parent().next(".filename.<%=field_name%>").text(file_name)
	})
</script>