<div class="container-fluid profile">
	<div class="page-header">
		<h1>${toolbar.profile}</h1>
	</div>
	<form name="profileForm" ng-submit="save()" class="form-horizontal">
		<div class="control-group">
			<label class="control-label" for="email">${profile.user_name}</label>
			<div class="controls horizontal-align">
				<span>{{user.name}}</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="email">${profile.email}</label>
			<div class="controls">
				<input type="email" id="email" ng-model="user.email" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="password">${profile.change_password}</label>
			<div class="controls">
				<input type="password" name="password" id="password" ng-model="user.password"
					ng-minlength="6" />
				<span class="help-inline" ng-show="profileForm.password.$error.minlength">${profile.minimum_6_chars}</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="password">${profile.confirm_password}</label>
			<div class="controls">
				<input type="password" name="password_c" id="password_c" ng-model="password_c"
					ui-validate="'$value==user.password'" ui-validate-watch="'user.password'">
				<span class="help-inline" ng-show="profileForm.password_c.$error.validator">${profile.passwords_do_not_match}</span>
			</div>
		</div>
		
		<div class="control-group">
			<label class="control-label" for="password">${profile.api_key}</label>
			<div class="controls horizontal-align">
				<span ng-show="user.apiKey">{{user.apiKey}}</span>
				<span ng-show="!user.apiKey">${profile.api_key_not_generated}</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="password">${profile.generate_new_api_key}</label>
			<div class="controls">
				<input type="checkbox" name="newApiKey" id="newApiKey" ng-model="newApiKey">
				<span class="help-block">${profile.generate_new_api_key_info}</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="password">${profile.opml_export}</label>
			<div class="controls horizontal-align">
				<a href="rest/feed/export" download="commafeed_opml.xml">${global.download}</a>
			</div>
		</div>

		<div class="form-actions">
			<button type="submit" class="btn btn-primary">${global.save}</button>
			<button type="button" class="btn" ng-click="cancel()">${global.cancel}</button>
			<button type="button" class="btn btn-danger" ng-click="deleteAccount()">${profile.delete_account}</button>
		</div>
	</form>
</div>