/**
  * Lists all Postcode models.
  * @return mixed
  */
 public function actionDeleted()
 {
     if (PostcodeAccess::allowDeleted() == FALSE) {
         throw PostcodeAccess::exception('deleted');
     }
     $searchModel = new PostcodeSearch();
     $dataProvider = $searchModel->searchDeleted($_GET);
     Tabs::clearLocalStorage();
     Url::remember();
     \Yii::$app->session['__crudReturnUrl'] = null;
     return $this->render('deleted', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
Example #2
0
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="postcode-search">

	<?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

	<?php 
echo $form->field($model, 'id');
?>

	<?php 
echo $form->field($model, 'status')->dropDownList(PostcodeSearch::optsstatus());
?>

	<?php 
echo $form->field($model, 'postcode');
?>

	<?php 
echo $form->field($model, 'subdistrict_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type subdistrict', 'depends' => ['postcodeform-district_id'], 'url' => Url::to(['/region/subdistrict/depdrop-options', 'selected' => $model->subdistrict_id]), 'loadingText' => 'Loading subdistricts ...']]);
?>
	<?php 
echo $form->field($model, 'district_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type district', 'depends' => ['postcodeform-city_id'], 'url' => Url::to(['/region/district/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading districts ...']]);
?>
	<?php 
echo $form->field($model, 'city_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type city', 'depends' => ['postcodeform-province_id'], 'url' => Url::to(['/region/city/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading cities ...']]);
?>
Example #3
0
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="postcode-search">

	<?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>

	<?php 
echo $form->field($model, 'id');
?>

	<?php 
echo $form->field($model, 'recordStatus')->dropDownList(PostcodeSearch::optsRecordStatus());
?>

	<?php 
echo $form->field($model, 'postcode');
?>

	<?php 
echo $form->field($model, 'subdistrict_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type subdistrict', 'depends' => ['postcodeform-district_id'], 'url' => Url::to(['/region/subdistrict/depdrop-options', 'selected' => $model->subdistrict_id]), 'loadingText' => 'Loading subdistricts ...']]);
?>
	<?php 
echo $form->field($model, 'district_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type district', 'depends' => ['postcodeform-city_id'], 'url' => Url::to(['/region/district/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading districts ...']]);
?>
	<?php 
echo $form->field($model, 'city_id')->widget(DepDrop::classname(), ['data' => [], 'type' => DepDrop::TYPE_SELECT2, 'select2Options' => ['pluginOptions' => ['multiple' => FALSE, 'allowClear' => TRUE, 'tags' => TRUE, 'maximumInputLength' => 255]], 'pluginOptions' => ['initialize' => TRUE, 'placeholder' => 'Select or type city', 'depends' => ['postcodeform-province_id'], 'url' => Url::to(['/region/city/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading cities ...']]);
?>