コード例 #1
0
 /**
  * Lists all RgnPostcode models.
  * @return mixed
  */
 public function actionDeleted()
 {
     if (RgnPostcodeAccess::allowDeleted() == FALSE) {
         throw RgnPostcodeAccess::exception('deleted');
     }
     $searchModel = new RgnPostcodeSearch();
     $dataProvider = $searchModel->searchDeleted($_GET);
     Tabs::clearLocalStorage();
     Url::remember();
     \Yii::$app->session['__crudReturnUrl'] = null;
     return $this->render('deleted', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel]);
 }
コード例 #2
0
ファイル: _search.php プロジェクト: AlvaCorp/yii2-boilerplate
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="rgn-postcode-search">

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

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

	<?php 
echo $form->field($model, 'status')->dropDownList(RgnPostcodeSearch::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' => ['rgnpostcodeform-district_id'], 'url' => Url::to(['/rgn-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' => ['rgnpostcodeform-city_id'], 'url' => Url::to(['/rgn-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' => ['rgnpostcodeform-province_id'], 'url' => Url::to(['/rgn-city/depdrop-options', 'selected' => $model->city_id]), 'loadingText' => 'Loading cities ...']]);
?>