<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\captcha\Captcha;
/* @var $this yii\web\View */

$this->title = 'Create';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="site-create">
    <h1><?= Html::encode($this->title) ?></h1>
    <?php $form = ActiveForm::begin(['id' => 'create-form']); ?>
    <div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'company_name'); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'address'); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'zipcode'); ?>
			</div>
		</div>
	</div>
    <div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'phone'); ?>
			</div>
		</div>
	</div>
    <div class="row">
     	<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'email')->textInput(['autofocus' => true]); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'website'); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'description')->textarea(['rows' => '6']); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
            	<?php $preferences = ['high' => 'High', 'medium' => 'Medium', 'low' => 'Low'] ?>
				<?= $form->field($location, 'preference')->dropDownList($preferences, ['prompt' => '-- Select --']); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'country'); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<?= $form->field($location, 'state'); ?>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="form-group">
            <div class="col-lg-6">
				<div class="col-lg-3">
					<?= HTML::submitButton('Add Location', ['id' => 'create-form-btn', 'class' => 'btn btn-primary']); ?>
				</div>
				<div class="col-lg-9">
					<a href="<?php echo yii::$app->homeURL; ?>" class="btn btn-primary">Go Back</a>
				</div>
			</div>

		</div>
	</div>
    <?php ActiveForm::end(); ?>
</div>