set.html.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * The set view file of block module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package block
  9. * @version $Id$
  10. * @link https://www.zentao.net
  11. */
  12. ?>
  13. <?php
  14. if($type != 'html')
  15. {
  16. include 'setmodule.html.php';
  17. die();
  18. }
  19. if($type == 'html')
  20. {
  21. $webRoot = $config->webRoot;
  22. $jsRoot = $webRoot . "js/";
  23. $themeRoot = $webRoot . "theme/";
  24. include '../../common/view/kindeditor.html.php';
  25. }
  26. ?>
  27. <?php include 'publicform.html.php';?>
  28. <?php echo html::hidden('actionLink', $this->createLink('block', 'set', "id=$id&type=$type&source=$source"));?>
  29. <?php if($type == 'html'):?>
  30. <div class="form-group">
  31. <label for="html" class="col-sm-3"><?php echo $lang->block->lblHtml;?></label>
  32. <div class='col-sm-7'><?php echo html::textarea('html', $block ? $block->params->html : '', "class='form-control' rows='10'")?></div>
  33. </div>
  34. <?php endif;?>
  35. <script>
  36. $(function()
  37. {
  38. options = $('#modules').find("option").text();
  39. if($('#title').val() == '') $('#title').val($('#modules').find("option:selected").text());
  40. })
  41. </script>