setcharterinfo.ipd.html.hook.php 637 B

1234567891011121314151617181920
  1. <?php
  2. namespace zin;
  3. global $app, $lang;
  4. $app->control->loadModel('charter');
  5. query('formBatchPanel')->each(function($node) use ($lang)
  6. {
  7. $items = $node->prop('items');
  8. $newItems = array();
  9. foreach($items as $key => $item)
  10. {
  11. $newItems[$key] = $item;
  12. if($key == 'level') $newItems['type'] = array('name' => 'type', 'label' => $lang->charter->type, 'control' => array('control' => 'radioList', 'items' => $lang->charter->typeList), 'width' => '80px');
  13. }
  14. $node->setProp('items', $newItems);
  15. });
  16. query('.form-actions')->before(html("<div class='p-2'>{$lang->custom->charter->tips->type}</div>"));