libreoffice.html.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * The libreoffice view file of custom module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(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 custom
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  14. <div id='mainContent' class="main-content">
  15. <div class="main-header">
  16. <h2><?php echo $lang->custom->libreOffice?></h2>
  17. </div>
  18. <form method="post" target="hiddenwin">
  19. <table class="table table-form">
  20. <tr>
  21. <th class="c-name"><?php echo $lang->custom->libreOfficeTurnon?></th>
  22. <td class='c-value'><?php echo html::radio('libreOfficeTurnon', $lang->custom->turnonList, $config->file->libreOfficeTurnon);?></td>
  23. </tr>
  24. <tr>
  25. <th><?php echo $lang->custom->type?></th>
  26. <?php if($config->requestType != 'PATH_INFO') unset($lang->custom->typeList['collabora']);?>
  27. <td><?php echo html::radio('convertType', $lang->custom->typeList, zget($config->file, 'convertType', 'libreoffice'))?></td>
  28. </tr>
  29. <tr class='libreofficeBox'>
  30. <th><?php echo $lang->custom->libreOfficePath?></th>
  31. <td><?php echo html::input('sofficePath', zget($config->file, 'sofficePath', ''), "class='form-control' autocomplete='off' placeholder='{$lang->custom->sofficePlaceholder}'")?></td>
  32. </tr>
  33. <tr class='collaboraBox hidden'>
  34. <th><?php echo $lang->custom->collaboraPath?></th>
  35. <td><?php echo html::input('collaboraPath', zget($config->file, 'collaboraPath', ''), "class='form-control' autocomplete='off' placeholder='{$lang->custom->collaboraPlaceholder}'")?></td>
  36. </tr>
  37. <tr>
  38. <td colspan='2' class='text-center form-actions'><?php echo html::submitButton();?></td>
  39. </tr>
  40. </table>
  41. </form>
  42. </div>
  43. <script>
  44. $(function()
  45. {
  46. $('#mainHeader #navbar li[data-id=custom]').removeClass('active');
  47. $('#mainHeader #navbar li[data-id=model]').removeClass('active');
  48. $(document).on('change', '[name=convertType]', function()
  49. {
  50. if($(this).prop('checked'))
  51. {
  52. if($(this).val() == 'libreoffice')
  53. {
  54. $('.libreofficeBox').removeClass('hidden');
  55. $('.collaboraBox').addClass('hidden');
  56. }
  57. else
  58. {
  59. $('.libreofficeBox').addClass('hidden');
  60. $('.collaboraBox').removeClass('hidden');
  61. }
  62. }
  63. });
  64. $('[name=convertType]').trigger('change');
  65. })
  66. </script>
  67. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>