<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use app\models\Category;
/* @var $this yii\web\View */
/* @var $model app\models\Job */
/* @var $form ActiveForm */
?>
<div class="row">
    <div class="col-md-6 col-md-offset-3">
    <h3 class="text-info">Modifier une offre</h3>
    <hr>
        <?php $form = ActiveForm::begin(); ?>
            <?= $form->field($job, 'category_id')->label('Catégorie*')
                ->dropDownList(Category::find()
                ->select(['name','id'])
                ->indexBy('id')
                ->column(),['prompt'=>'Veuillez choisir une catégorie:'])?>
            <?= $form->field($job, 'title')->label('Titre*') ?>
            <?= $form->field($job, 'description')->label('Déscription*')->textArea(['rows'=>'6','cols'=>'50']) ?>
            <?= $form->field($job, 'type')->label('Type*')->dropDownList([
                    'CDI'=>'CDI',
                    'CDD'=>'CDD'
                ],['prompt'=>'Veuillez choisir un type:']
                )?>
            <?= $form->field($job, 'competences')->label('Compétences*') ?>
            <?= $form->field($job, 'salary')->label('Salaire*') ?>
            <?= $form->field($job, 'city')->label('Ville*') ?>
            <?= $form->field($job, 'contact_email')->label('Email*') ?>
            <?= $form->field($job, 'contact_phone')->label('Téléphone*') ?>
            <?= $form->field($job, 'is_published')->label('Publier*')->radioList([
                    1=>'Oui',
                    0=>'Non'
                ]
                ) ?>
            <div class="form-group">
                <?= Html::submitButton('Valider', ['class' => 'btn btn-primary']) ?>
            </div>
        <?php ActiveForm::end(); ?>
    </div>
</div><!-- jobs-create -->
