<% title (t 'registration.edit_profile') + ' - ' + @config.website_name %>
<%= bootstrap_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>  
	<div class="span6 offset3 media thumbnail" style="padding: 0px">
		<div class="login-panel panel panel-default" style="padding: 10px;">
		     <div class="panel-heading">
		         <h3 class="panel-title"><%= t 'registration.edit_profile'%></h3>
		     </div>
		     <div class="panel-body">
				  <%= f.alert_message "Please fix the errors below."%>
				  <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
				  	<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
				  <% end %>
				  <div class="form-inputs">
				    
	    			   <div class="fileupload fileupload-new pull-right" data-provides="fileupload" style="margin-top: 5px;">
	    					<div class="fileupload-preview thumbnail" data-trigger="fileinput" style="width: 140px; height: 140px;">
							<%=  image_tag @user.avatar.to_s if @user.avatar? %>
						</div>
						<br>
	    					<span class="btn btn-default btn-file btn-mini" style="width: 135px;">
	    						<span class="fileinput-new"></span>
	    						<span class="fileinput-exists"></span>
	    						<%= f.file_field :avatar, class: 'hidden', label: (t 'blog.select_image') %>
	    					</span>
	    			    </div>
				    
				    <%= f.text_field :first_name, label: (t 'registration.first_name'), required: true, autofocus: true, class: 'span4' %>
				    <%= f.text_field :last_name, label: (t 'registration.last_name'), required: false, class: 'span4' %>
				    <%= f.email_field :email, required: true, class: 'span4' %>
				    </div>
				    <hr>
				    <div class="form-inputs">
			    		    <%= f.form_group :title, class: "pull-left", style: 'margin-left: 0px; width: 30%;' do %>
			    		        <%= f.password_field :password, label: (t 'registration.password'), required: false, class: 'input-block-level' %>
			    		    <% end %>
			    		    <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %>
			    		        <%= f.password_field :password_confirmation, label: (t 'registration.password_confirmation'), required: false, class: 'input-block-level' %>
			    		    <% end %>
			    		    <%= f.form_group :slug, class: "pull-left", style: 'margin-left: 27px; width: 30%;' do %>
			    		        <%= f.password_field :current_password, label: (t 'registration.current_password'), required: false, class: 'input-block-level' %>
			    		    <% end %>
			         </div>
				    
				    
				    
				  </div>
				  <div class="clearfix"></div>
			  </div>
			  <div class="form-actions" style="margin: 0px; margin-top: 15px;">
			    <%= f.submit  (t 'registration.update') %>
			    <%= link_to ('<i class="fa fa-exclamation-triangle"></i> '+(t 'registration.cancel_account')).html_safe, delete_user_account_path, data: { confirm: (t 'registration.cancel_confirmation') }, method: :delete, class: 'btn btn-danger pull-right', id: "delete_account" %>
			  </div>
		     </div>
		 </div>
	</div>
<% end %>


