office.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * The office view file of integration module of XXB.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd., www.zentao.net)
  6. * @license ZOSL (https://zpl.pub/page/zoslv1.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package integration
  9. * @version $Id$
  10. * @link https://xuanim.com
  11. */
  12. ?>
  13. <?php include '../../common/view/header.html.php';?>
  14. <div class='panel'>
  15. <div class='panel-heading'>
  16. <strong><?php echo $lang->integration->office;?></strong>
  17. </div>
  18. <form method="post" class="form-ajax" id="office-ajax-form">
  19. <table class="table table-form">
  20. <tr>
  21. <th class="w-120px"><?php echo $lang->integration->switch?></th>
  22. <td class='w-p50'><?php echo html::radio('officeEnabled', $lang->integration->switchList, zget(isset($config->integration->office) ? $config->integration->office : '', 'officeEnabled'));?></td>
  23. <td></td>
  24. </tr>
  25. <tr>
  26. <th><?php echo $lang->integration->type?></th>
  27. <td><?php echo $lang->integration->collabora?></td>
  28. </tr>
  29. <tr class='collaboraBox'>
  30. <th><?php echo $lang->integration->collaboraPath?></th>
  31. <td><?php echo html::input('collaboraPath', zget(isset($config->integration->office) ? $config->integration->office : '', 'collaboraPath', ''), "class='form-control' autocomplete='off' placeholder='{$lang->integration->placeholder->collabora}'")?></td>
  32. </tr>
  33. <tr>
  34. <th></th>
  35. <td colspan='2'><?php echo html::submitButton();?></td>
  36. </tr>
  37. </table>
  38. </form>
  39. </div>
  40. <script>
  41. $(function()
  42. {
  43. $.setAjaxForm('#office-ajax-form');
  44. $('[name=officeEnabled]').change(function()
  45. {
  46. if($(this).prop('checked'))
  47. {
  48. if($(this).val() == '1')
  49. {
  50. $('.collaboraBox').removeClass('hidden');
  51. }
  52. else
  53. {
  54. $('.collaboraBox').addClass('hidden');
  55. }
  56. }
  57. });
  58. $('[name=officeEnabled]').change();
  59. });
  60. </script>
  61. <?php include '../../common/view/footer.html.php';?>