Blame view

frontend/views/site/options.php 734 Bytes
0012685b   Yarik   Многоязычные опции
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
  <?php
  
  /* @var $this yii\web\View */
  
  $this->title = 'My Yii Application';
  ?>
  <div id="content">
      <form action="" method="post">
      	<input type="hidden" name="_csrf" value="<?=Yii::$app->request->getCsrfToken()?>" />
      	<?php foreach($options['option_values'] as $key => $val) {
      	   ?>
      	   <input type="hidden" name="options[<?=$key?>][option_id]" value="<?php 
      	       if(empty($val->optionValue)) {
      	           echo $key;
      	       } else {
      	           echo $val->optionValue->option_id;   
      	       }
      	   ?>" />
      	   <label for="options[<?=$key?>][option_value]"><?=$key?></label>
      	   <input type="text" name="options[<?=$key?>][option_value]" />
      	   <?php
      	}?>
      </form>
  </div>