<div class="line-content">
	<span class="header-line">Sites to add :</span>
	<span class="content-line">
		<%= form_for @site_request, :url => {:action => "add_sites"} do |f| %>
			<% x = 0 %>
			<% @site_request.sites_to_add.each_with_index do |sid,i| %>
				<% site = RegisteredSite.where(:site_domain => sid).first rescue nil %> 
				<div class="site_added_item">
					<% if !site.nil? %>
						<% x = 1 %>
						<input type="checkbox" name="site_request[sites_added][]" value="<%= site.id %>" id="check_<%= i.to_s %>" >
						<label for="check_<%= i %>"><%= site.title %></label>
					<% else %>
						<span><%= sid %><span class="label label-default">Site not found</span></span>
					<% end %>
					<a href="http://<%= sid %>" target="_blank"><i class="icons-export"></i></a>
				</div>
			<% end %>
			<% @site_request.sites_added.each_with_index do |sid,i| %>
				<% site = RegisteredSite.find(sid) rescue nil %> 
				<div class="site_added_item success">
					<span><%= site.title %><span class="label label-default">Site Already Added</span></span>
					<a href="http://<%= site.site_domain %>" target="_blank"><i class="icons-export"></i></a>
				</div>
			<% end %>
			<% if x > 0 %>
				<%= f.submit "Add Sites", :class => "btn btn-primary" %>
			<% end %>
			<% if !@site_request.completed %>
				<a href="<%= complete_request_admin_client_management_path(@site_request.id) %>" class="btn btn-info">Complete Request</a>
			<% end %>
		<% end %>
	</span>
</div>