<?php use yii\bootstrap\Html; use app\components\DetailView; use app\helpers\ArrayHelper; use app\modules\job\models\Job; ?> <!-- MAIN --> <main id="main" class="main-container"> <!-- SECTION 1 --> <div class="section section-1"> <div class="container"> <div class="row jobs-posted"> <div class="section-title section-title-style-2"> <h2 class="title"> <?php echo Yii::t('job', "Job Informations"); ?> </h2> </div> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['code', ['attribute' => 'country_id', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobLocation::getOptions(), ArrayHelper::getValue($model, 'country_id'))], ['attribute' => 'category_ids', 'value' => $model->getCategoryNames(), 'format' => 'raw'], 'city_name', ['attribute' => 'annual_salary_from', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_from'))], ['attribute' => 'annual_salary_to', 'value' => ArrayHelper::getValue(\app\modules\job\models\JobSalary::getOptions(), ArrayHelper::getValue($model, 'annual_salary_to'))], ['attribute' => 'functions', 'value' => $model->getFunctionNames(), 'format' => 'raw'], ['attribute' => 'work_type', 'value' => ArrayHelper::getValue(app\modules\job\models\JobWorkType::getOptions(), ArrayHelper::getValue($model, 'work_type'))], ['attribute' => 'industry', 'value' => $model->getIndustryNames(), 'format' => 'raw'], 'company_name', 'company_description:html', 'description:html', 'seo_url', 'seo_title', 'seo_desc', ['attribute' => 'created_time', 'format' => ['datetime', 'php:m/d/Y H:i:s'], 'value' => $model->created_time->sec], ['attribute' => 'updated_time', 'format' => ['datetime', 'php:m/d/Y H:i:s'], 'value' => $model->updated_time->sec], ['attribute' => 'satus', 'value' => ArrayHelper::getValue(Job::getStatusOptions(), ArrayHelper::getValue($model, 'status'))], 'hits']]); ?> </div> </div> </div> <!-- # SECTION 1 --> </main> <!-- # MAIN -->
use app\components\ActiveForm; use yii\helpers\Html; ?> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'method' => 'post', 'layout' => 'horizontal', 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-3', 'wrapper' => 'col-sm-9', 'error' => 'help-block m-b-none', 'hint' => '']]]); ?> <p><a target="_blank" href="#">Job posting requirements</a></p> <?php echo $form->field($model, 'code')->textInput(['placeholder' => Yii::t('job', 'Enter a name for your reference only')]); echo $form->field($model, 'title')->textInput(['placeholder' => Yii::t('job', 'What type of position is this?')]); echo $form->field($model, 'category_ids')->listBox(\app\modules\job\models\Job::getCategoryOptions(), ['multiple' => true]); echo $form->field($model, 'country_id')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => Yii::t('job', '--- Select a location ---')]); echo $form->field($model, 'city_name')->textInput(); ?> <div class="form-group field-job-annual_salary_from"> <label for="job-annual_salary_from" class="control-label col-sm-3"><?php echo '<em class="required">*</em> ' . Yii::t('job', 'Annual Salary'); ?> </label> <div class="col-sm-9"> <div class="row"> <?php $annualSalary = \app\modules\job\models\JobSalary::getOptions(); ?> <div class="col-xs-6"> <?php
<td><?php echo Html::encode($model->title); ?> </td> </tr> <tr> <td colspan="2">Job Code</td> <td><?php echo Html::encode($model->code); ?> </td> </tr> <tr> <td colspan="2">Location</td> <td><?php echo ArrayHelper::getValue(\app\modules\job\models\JobLocation::getOptions(), ArrayHelper::getValue($model, 'country_id')); ?> </td> </tr> <tr> <td colspan="2">Jobs Industry</td> <td><?php echo $model->getIndustryNames(); ?> </td> </tr> <tr> <td colspan="2">Company Info</td> <td> <?php if (UserJob::canView()) {
echo $form->field($jobModel, 'agent_type')->inline(true)->radioList(\app\modules\job\models\UserJob::getAgentTypeOptions()); ?> <?php echo $form->field($model, 'first_name')->textInput(['placeholder' => Yii::t('account', 'First Name')]); ?> <?php echo $form->field($model, 'last_name')->textInput(['placeholder' => Yii::t('account', 'Last Name')]); ?> <?php echo $form->field($jobModel, 'agent_company_name')->textInput(['placeholder' => Yii::t('account', 'Company Name')]); ?> <?php echo $form->field($jobModel, 'agent_position')->textInput(['placeholder' => Yii::t('account', 'Position')]); ?> <?php echo $form->field($jobModel, 'agent_office_location')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']); ?> <?php echo $form->field($jobModel, 'agent_city_name')->textInput(['placeholder' => Yii::t('account', 'City Name')]); ?> <?php echo $form->field($jobModel, 'agent_website')->textInput(['placeholder' => Yii::t('account', 'Corporate Site')]); ?> <?php echo $form->field($model, 'email')->textInput(['placeholder' => Yii::t('account', 'Email')]); ?> <?php echo $form->field($model, 'password')->passwordInput(['placeholder' => Yii::t('account', 'Must be 6-20 characters in length.')]); ?> <?php echo $form->field($model, 'phone')->textInput(['placeholder' => Yii::t('account', '(Ex: 65-6666-7777) with country code, please.')]);
use app\components\ActiveForm; use yii\helpers\Html; use app\helpers\ArrayHelper; ?> <?php $form = ActiveForm::begin(['method' => 'GET', 'action' => ['search-seeker'], 'options' => ['id' => 'frm-search-seeker', 'name' => 'frm-search-seeker']]); ?> <?php $searchModel = new app\modules\job\models\UserJobSeekerResume(); $searchModel->scenario = 'search'; $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), 20); echo $form->field($searchModel, 'keyword')->textInput(['class' => 'form-control', 'placeholder' => 'keyword search'])->label(false); ?> <?php echo $form->field($searchModel, 'search_mode')->radioList($searchModel::getSearchModeOptions())->label(false); ?> <?php echo $form->field($searchModel, 'location')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['class' => 'form-control', 'prompt' => '---'])->label(false); echo $form->field($searchModel, 'functions')->dropDownList(\app\modules\job\models\JobFunction::getOptions(), ['class' => 'form-control', 'prompt' => '---'])->label(false); echo $form->field($searchModel, 'industries')->dropDownList(\app\modules\job\models\JobIndustry::getOptions(), ['class' => 'form-control', 'prompt' => '---'])->label(false); ?> <br> <input class="button button-primary" type="submit" name="agent-home-search" /> <?php ActiveForm::end();
/** * Finds the JobLocation model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $_id * @return JobLocation the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = JobLocation::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
public function getLocationModel() { return $this->hasOne(\app\modules\job\models\JobLocation::className(), ['_id' => 'location']); }
?> <?php $imageConfig = ['options' => ['accept' => 'uploads/*'], 'pluginOptions' => ['previewFileType' => 'image', 'showCaption' => FALSE, 'showRemove' => TRUE, 'showUpload' => FALSE, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="glyphicon glyphicon-camera"></i> ', 'browseLabel' => 'Select Photo', 'removeClass' => 'btn btn-danger', 'removeLabel' => "Delete", 'removeIcon' => '<i class="glyphicon glyphicon-trash"></i>', 'allowedFileExtensions' => ['jpg', 'gif', 'png', 'jpeg']]]; if (!empty($model->image)) { $imageConfig['pluginOptions']['initialPreview'] = [Html::img(LetHelper::getFileUploaded($model->image), ['class' => 'file-preview-image'])]; } echo $form->field($model, 'image')->widget(FileInput::classname(), $imageConfig); ?> <?php echo $form->field($jobModel, 'sex')->radioList($jobModel::getSexOptions()); ?> <?php echo $form->field($jobModel, 'birthday')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['startDate' => '01/01/1980', 'endDate' => '0d', 'autoclose' => true]]]); ?> <?php echo $form->field($jobModel, 'seeker_nationality')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']); ?> <?php echo $form->field($jobModel, 'seeker_salary')->dropDownList(\app\modules\job\models\JobSalary::getOptions(), ['prompt' => 'In US Dollars']); ?> <div class="form-group"> <div class="col-sm-9 col-sm-offset-3"> <?php echo Html::submitButton(Yii::t('account', 'Sign up'), ['class' => 'button button-primary']); ?> </div> </div> </form> </div> </div>
<div class="col-lg-12"> <div class="ibox float-e-margins"> <div class="ibox-title"> <h5><?php echo Yii::t('common', 'Information'); ?> </h5> </div> <div class="ibox-content"> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-2', 'wrapper' => 'col-sm-10', 'error' => 'help-block m-b-none', 'hint' => '']]]); $tabs = [['label' => Yii::t('common', 'General information'), 'content' => $form->field($modelUser, 'display_name')->textInput() . $form->field($modelUser, 'email')->textInput() . $form->field($modelUser, 'password')->passwordInput() . $form->field($modelUser, 'phone')->textInput() . $form->field($modelUser, 'status')->widget(SwitchInput::classname(), ['containerOptions' => []]), 'active' => true]]; if ($modelUserJob->role == 'seeker') { $tabs[] = ['label' => Yii::t('common', 'Extra information'), 'content' => $form->field($modelUserJob, 'sex')->radioList($modelUserJob::getSexOptions()) . $form->field($modelUserJob, 'birthday')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['startDate' => '01/01/1980', 'endDate' => '0d', 'autoclose' => true]]]) . $form->field($modelUserJob, 'seeker_nationality')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']) . $form->field($modelUserJob, 'seeker_salary')->dropDownList(\app\modules\job\models\JobSalary::getOptions(), ['prompt' => 'In US Dollars'])]; } else { $tabs[] = ['label' => Yii::t('common', 'Extra information'), 'content' => $form->field($modelUserJob, 'recruiter_type')->dropDownList(\app\modules\job\models\UserJob::getAgentTypeOptions()) . $form->field($modelUserJob, 'recruiter_company_name') . $form->field($modelUserJob, 'recruiter_position') . $form->field($modelUserJob, 'recruiter_office_location')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => '---']) . $form->field($modelUserJob, 'recruiter_city_name') . $form->field($modelUserJob, 'recruiter_website') . $form->field($modelUserJob, 'recruiter_jobs_industry')->listBox(\app\modules\job\models\JobIndustry::getOptions()) . $form->field($modelUserJob, 'recruiter_summary')]; } $tabs[] = ['label' => Yii::t('common', 'VIP information'), 'content' => $form->field($modelUserJob, 'vip') . $form->field($modelUserJob, 'vip_from')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]]) . $form->field($modelUserJob, 'vip_to')->widget(DateControl::classname(), ['type' => DateControl::FORMAT_DATE, 'ajaxConversion' => false, 'options' => ['pluginOptions' => ['autoclose' => true]]])]; echo Html::hiddenInput('save_type', 'save'); echo yii\bootstrap\Tabs::widget(['items' => $tabs]); ActiveForm::end(); ?> <?php /* $form = ActiveForm::begin([ 'id' => 'formDefault', 'layout' => 'horizontal',
<?php use yii\helpers\Url; use yii\helpers\Html; use app\helpers\ArrayHelper; use app\components\GridView; ?> <style type="text/css"> /*.ibox-title, .kv-panel-before{display: none;}*/ </style> <?php echo GridView::widget(['panel' => ['tableOptions' => ['id' => 'listCandidate']], 'pjax' => true, 'dataProvider' => $dataProvider, 'toolbar' => [['content' => Html::a('<i class="glyphicon glyphicon-repeat"></i>', [''], ['data-pjax' => 0, 'class' => 'btn btn-default', 'title' => Yii::t('kvgrid', 'Reset Grid')])]], 'columns' => [['attribute' => 'candidate_id', 'format' => 'raw', 'value' => function ($model, $key, $index, $widget) { if (\app\modules\job\models\UserFavourite::isFavourite($model->_id, 'seeker', Yii::$app->user->id)) { $class = "favourites"; $title = Yii::t('job', 'Remove from favourites list?'); } else { $class = "un-favourites"; $title = Yii::t('job', 'Add to favourites list?'); } return Html::a('<i class="fa fa-star"></i>', ['account/favourite'], ['title' => $title, 'class' => $class, 'onclick' => 'js:favourite($(this)); return false', 'data-id' => $model->_id, 'data-type' => 'seeker']) . ' ' . Html::a($model->candidate_id, ['/job/account/public-profile', 'display_name' => $model->user->display_name], ['title' => Yii::t('job', 'View detail'), 'class' => 'view-detail']); }], ['attribute' => 'latest_company'], ['attribute' => 'latest_position'], ['attribute' => 'location', 'value' => function ($model, $key, $index, $widget) { return ArrayHelper::getValue(\app\modules\job\models\JobLocation::getOptions(), ArrayHelper::getValue($model, 'location')); }]], 'responsive' => true, 'hover' => true]);
<div class="tab-content"> <div role="tabpanel" class="tab-pane active"> <div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2"> <?php $form = ActiveForm::begin(['id' => 'formDefault', 'layout' => 'horizontal', 'options' => ['enctype' => 'multipart/form-data'], 'fieldConfig' => ['horizontalCssClasses' => ['label' => 'col-sm-3', 'wrapper' => 'col-sm-9', 'error' => 'help-block m-b-none', 'hint' => '']]]); ?> <fieldset> <legend><?php echo Yii::t('job', 'Personal Info.'); ?> </legend> <?php echo $form->field($model, 'nationality')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => Yii::t('job', 'Nationality')]); ?> <?php echo $form->field($model, 'location')->dropDownList(\app\modules\job\models\JobLocation::getOptions(), ['prompt' => Yii::t('job', 'Current Location')]); ?> <div class="form-group"> <?php echo Html::label(Yii::t('job', 'Contact number'), null, ['class' => 'control-label col-sm-3']); ?> <div class="col-sm-5"> <?php echo $form->field($model, 'phone_country', ['template' => '{label}<div class="col-sm-12">{input}{error}{hint}</div>'])->dropDownList($model->getCountryCodeOptions(), ['prompt' => Yii::t('job', 'Country Code')])->label(false); ?> </div> <div class="col-sm-4"> <?php echo $form->field($modelUser, 'phone', ['template' => '{label}<div class="col-sm-12">{input}{error}{hint}</div>'])->textInput(['placeholder' => Yii::t('job', '999-999-999')])->label(false); ?>