Beispiel #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = CustodianModel::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id_custodian' => $this->id_custodian]);
     $query->andFilterWhere(['like', 'name', $this->name]);
     return $dataProvider;
 }
 /**
  * Finds the Custodian model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Custodian the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Custodian::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Beispiel #3
0
 public function getCustodian()
 {
     return $this->hasOne(Custodian::className(), ['id_custodian' => 'id_custodian']);
 }
$control_agreement_text = '';
switch ($group->id_custodian) {
    case 1:
        $control_agreement_text = 'Pledged Asset Account Agreement';
        break;
    case 2:
        $control_agreement_text = 'Control Agreement for Collateral Accounts';
        break;
    case 3:
        $control_agreement_text = 'Pledged Asset Agreement for Collateral Loans';
        break;
    case 4:
        $control_agreement_text = 'Securities Account Control Agreement';
        break;
}
$custodian = Custodian::find()->andWhere(['id_custodian' => $group->id_custodian])->one();
if (is_array($user)) {
    //send to two clients
    $user_name = $user[0]->first_name . ' ' . $user[0]->last_name . ' and ' . $user[1]->first_name . ' ' . $user[1]->last_name;
} else {
    $user_name = $user->first_name . ' ' . $user->last_name;
}
?>
<div class="password-reset">
    <p><?php 
echo Yii::t('app', 'Dear ');
echo Html::encode($user_name);
echo Yii::t('app', ',');
?>
</p>
    <p><?php 
Beispiel #5
0
Pjax::begin(['id' => 'pjax-add-group']);
$form = ActiveForm::begin(['id' => 'add-group', 'enableAjaxValidation' => true]);
?>
      <div class="modal-header" >
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Add Group</h4>
      </div>
      <div class="modal-body">
       <!--弹出页面start-->
       	 <div class="panel-body" >
                 <input type="hidden" name="id" value="<?php 
echo $id;
?>
">
                 <?php 
echo $form->field($model, 'id_custodian')->dropDownList(ArrayHelper::map(Custodian::find()->all(), 'id_custodian', 'name'));
?>
				 <?php 
echo $form->field($model, 'group_id')->textInput(['maxlength' => true]);
?>
				 <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

         </div>

        <!--end-->
      	</div>
     	 <div class="modal-footer">
        		 <button type="button" class="btn btn-success" id="addgroup">Add</button>
        		 <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
Beispiel #6
0
            					<li><a class="icon expand-tool"><i class="fa fa-expand"></i></a></li>
           					<!--<li><a class="icon closed-tool"><i class="fa fa-times"></i></a></li>-->
          				</ul>
        				</div>
        				<div class="panel-body">
    					<?php 
$form = ActiveForm::begin();
?>
    					<?php 
echo $form->field($model, 'group_id')->textInput(['maxlength' => true]);
?>
              <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
    					<?php 
echo $form->field($model, 'id_custodian')->dropDownList(ArrayHelper::map(Custodian::find()->all(), 'id_custodian', 'name'), ['id' => 'id_custodian', 'prompt' => 'Select...']);
?>
    					<div class="form-group field-advisorgroup-id_advisor required">
	    					<label class="col-sm-3 control-label form-label" for="id_advisor">Id Advisor</label>
	    					<div class="col-sm-8">
		    					<?php 
echo Select2::widget(['name' => 'id_advisor', 'value' => ArrayHelper::map($model->advisors, 'id_advisor', 'id_advisor'), 'data' => ArrayHelper::map(Advisor::find()->all(), 'id_advisor', function ($item) {
    return $item->user->first_name;
}), 'options' => ['placeholder' => 'Select  ...', 'multiple' => true], 'pluginOptions' => ['maximumInputLength' => 10, 'ajax' => ['url' => Url::to(['get-all-advisor-list']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')]]]);
?>
	    					</div>
    					</div>
    					<div class="form-group">
       					<div class="col-sm-2"></div>
        						<div class="col-sm-10">
        							<?php