{% extends "WebBundle::layout.html.twig" %}
{% set subtitle =   "Change password"  %}
{% set og_description =  "Change password" %}
{% set og_type =  "null" %}
{% set og_image =  "null" %}
{% set keywords =  "null" %}
{% block title %}Change password{% endblock %}
{% trans_default_domain 'FOSUserBundle' %}
{% block body %}
	<div class="row content-section">
		<div class="col-md-12" >
			<div class="actor-header-bg" style=" background-image: url('{{(app.user.media.type == "link" )? app.user.media.url : asset(app.user.media.link)}}');">
				<div class="movie-header actor-header">
					<div class="movie-title">{{app.user.name}}</div>
				</div>
			</div>
			<img class="actor-logo" src="{{(app.user.media.type == "link" )? app.user.media.url : asset(app.user.media.link)|imagine_filter("user_image")}}">
		</div>
		<div class="col-md-3" >
			<a href="{{path("fos_user_profile_show")}}" class="btn btn-block btn-sm play-btn"><i class="fas fa-user"></i> My Profile</a>
			<a href="{{path("fos_user_myprofile_edit")}}" class="btn btn-block btn-sm play-btn"><i class="fas fa-user-edit"></i> Edit Profile</a>
			<a href="{{path("user_user_subscriptions")}}" class="btn btn-block btn-sm play-btn"><i class="fas fa-star"></i> My Subscription</a>
			{% if app.user.type == "email" %}
				<a href="{{path("fos_user_change_password")}}" class="btn btn-block btn-sm play-btn"><i class="fas fa-user-lock"></i> Change password</a>
			{% endif %}
			<a href="{{path("fos_user_security_logout")}}" class="btn btn-block btn-sm play-btn"><i class="fas fa-sign-out-alt"></i> Logout</a>
		</div>
		<div class="col-md-9">
			<h3>Change Password</h3>
			<br>
			{{ form_start(form, { 'action': path('fos_user_change_password'), 'attr': { 'class': 'fos_user_change_password' } }) }}
		
			<div class="form-group">
				{{form_widget(form.current_password,{"attr":{"class":"form-control","placeholder":"Current password"}})}}
				<span class="validate-input">{{form_errors(form.current_password)}}</span>
			</div>
			<div class="form-group">
				{{form_widget(form.plainPassword.first,{"attr":{"class":"form-control","placeholder":"New password"}})}}
				<span class="validate-input">{{form_errors(form.plainPassword.first)}}</span>
			</div>
			<div class="form-group">
				{{form_widget(form.plainPassword.second,{"attr":{"class":"form-control","placeholder":"Repeat new password"}})}}
				<span class="validate-input">{{form_errors(form.plainPassword.second)}}</span>
			</div>
			<button  class="btn btn-raised btn-primary float-right">{{ 'Change password'|trans }}</button>
			{{ form_end(form) }}
		</div>
	{% endblock %}