HCE Project DC service web UI  0.2
Hierarchical Cluster Engine DC service web UI
 All Classes Namespaces Files Functions Variables Pages
editOperationsFields.php
Go to the documentation of this file.
1 <?php
2 $this->breadcrumbs = array(
3  UserModule::t('Rights') => array('//rights'),
4  UserModule::t('Sites') => array('//rights/usersSitesRights/index'),
5  'Edit operations fields',
6 );
7 $this->beginWidget('CActiveForm',
8  array(
9  'id' => 'SearchFilter',
10  'action' => Yii::app()->createUrl('//rights/UsersSitesRights/editOperationsFields'),
11  'method' => 'post',
12  )
13 );
14 ?>
15 <div>
16  <h2>Edit operations fields</h2>
17  <div>
18  <div>
19  <?php
20  $dynamicField = '<input type=checkbox name=RightsList[] value=__ checked=checked>&nbsp;__';
21  echo CHtml::textField('new_dynamic_field').
22  CHtml::button('Add', array(
23  'id' => 'add_dynamic_field',
24  'onclick' => 'dynamicField.add("'.$dynamicField.'")',
25  ));
26  ?>
27  </div>
28  <div id="dynamic_fields_list">
29  <?php
30  if (!empty($rightsList)) {
31  foreach ($rightsList as $right) {
32  echo '<div>'.CHtml::checkBox('RightsList[]', true, array(
33  'value' => $right,
34  )).
35  '&nbsp;'.$right.'&nbsp;'.
36  '<span id="remove_dynamic_field" class="link" onclick="dynamicField.remove(this)">x</span></div>';
37  }
38  }
39  ?>
40  </div>
41  </div>
42  <div>
43  <?php echo CHtml::submitButton('Save'); ?>
44  </div>
45 </div>
46 <?php $this->endWidget(); ?>