<div class="b-page-form" ng-controller="userCtrl">
	<div class="container">
		<div ng-include="'views/part/top-button.html?ver=3'"></div>

		<div class="row">
			<div class="col-xs-12">
				<h2 class="h-title title text-center">{{getLocale('Select a restaurant for')}}</h2>
			</div>
		</div>

		<form action="#" ng-controller="userRestaurantCtrl" name="userRestaurantForm" novalidate>
			<div class="row" ng-show="loadRestaurant">
				<div class="col-xs-12">
					<div class="b-load m-load-catalog text-center">
						<div class="load-circle"></div>
						<p>{{getLocale('Load restaurants')}}</p>
					</div>
				</div>
			</div>
			<div class="row" ng-show="!loadRestaurant">
				<div class="col-sm-6 col-sm-offset-3">
					<div class="form-group">
						<select id="restaurant-self" class="h-full-width h-input" ng-model="restaurantUser" required
								ng-class="{ 'error-field': userRestaurantForm.restaurant.$invalid && formValidAddress }" name="restaurant" >
							<option ng-repeat="item in restaurantArray" value="{{ item.id }}">{{ item.name }}</option>
						</select>

						<p class="error-message error-message-field" ng-show="userRestaurantForm.restaurant.$invalid && formValidAddress">{{getLocale('Error. Empty field')}}</p>
					</div>
				</div>
			</div>
			<div class="row" ng-show="!loadRestaurant">
				<div class="col-sm-6 col-sm-offset-3">
					<div class="form-group">
						<a ng-class="{'disabled-btn': !userRestaurantForm.$valid }" href="javascript: void(0);"
							   class="js-submit pull-right btn" ng-click="toSaveInfoUser('#/catalog', $event)">
									{{getLocale('Go to order')}}
						</a>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>