Blame view

protected/modules/admin/views/message/edit.php 1.16 KB
a1684257   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  <?php
  /**
   * @var MessageController $this
   * @var array $new_messages
   * @var array $messages
   * @val string $languageName
   * @val string $languageCode
   */
  
  ?>
  <?php
  $form = $this->beginWidget('CActiveForm');
  ?>
  <table class="table table-bordered">
      <tr>
          <th>Сохранить</th>
          <th>Сообщение</th>
          <th>Перевод</th>
      </tr>
      <?php foreach ($messages as $message): ?>
  
      <tr>
          <td><?php echo CHtml::checkBox("message[{$message['id']}][save]", false) ?>
          </td>
          <td><?php echo $message['message'] ?>
          </td>
          <td><?php echo CHtml::textArea("message[{$message['id']}][translation]",
              $message['translation'],
              array(
                  'onchange' => "setTimeout(function(){ $('#" . CHtml::getIdByName("message[{$message['id']}][save]") . "').attr('checked','checked');},100);",
                  'class' => 'input-xxlarge',
  //                'cols'=>40,
  //                'rows'=>4,
              )
          ) ?>
          </td>
      </tr>
      <?php endforeach?>
  </table>
  <input type="submit" value="Сохранить отмеченные" class="btn-primary btn"/>
  <?php
  $this->endWidget();
  ?>