admin.html.php 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * The admin view file of conference 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 Wenrui LI <liwenrui@easycorp.ltd>
  8. * @package conference
  9. * @version $Id$
  10. * @link https://xuanim.com
  11. */
  12. ?>
  13. <?php
  14. include $app->getModuleRoot() . 'common/view/header.html.php';
  15. ?>
  16. <div class='panel'>
  17. <div class="panel-heading">
  18. <?php echo $lang->conference->common; ?>
  19. </div>
  20. <form method='post' id='ajaxForm' class="form-ajax<?php if ($enabled) echo ' conference-enabled'; ?>">
  21. <table class="table table-form">
  22. <tr>
  23. <th class="w-150px"><?php echo $lang->conference->enabled; ?></th>
  24. <td class="w-400px">
  25. <?php if ($type != 'edit') : ?>
  26. <div class="checkbox-primary disabled <?php if ($enabled) echo 'checked'; ?>">
  27. <label><?php echo $lang->conference->enabledTip; ?></label>
  28. </div>
  29. <?php else : ?>
  30. <div class="checkbox-primary">
  31. <input type="checkbox" name="enabled" id='enabled' value="true" <?php if ($enabled) echo 'checked'; ?> <?php if ($type != 'edit') echo 'disabled'; ?>>
  32. <label for='enabled'><?php echo $lang->conference->enabledTip; ?></label>
  33. </div>
  34. <?php endif; ?>
  35. </td>
  36. <td></td>
  37. </tr>
  38. <?php if ($type == 'edit' || $enabled) : ?>
  39. <tr class='edit-row common-row'>
  40. <th class="w-120px"><?php echo $lang->conference->domain; ?></th>
  41. <td class="w-400px code">
  42. <?php if ($type == 'edit') : ?>
  43. <div class='required required-wrapper'></div>
  44. <?php echo html::input('domain', $domain, "class='form-control'"); ?>
  45. <?php else : echo empty($domain) ? $lang->conference->notset : $domain;
  46. endif; ?>
  47. </td>
  48. <?php if($type == 'edit'): ?>
  49. <td class="text-muted" style="padding-left: 20px;"><?php echo $lang->conference->serverAddrTip; ?></td>
  50. <?php endif; ?>
  51. </tr>
  52. <?php endif; ?>
  53. <tr>
  54. <th></th>
  55. <td colspan='2'>
  56. <?php if ($type == 'edit') echo html::submitButton(); ?>
  57. <?php if ($type != 'edit') echo '<a class="btn btn-primary" href="' . helper::createLink('conference', 'admin', 'type=edit') . '">' . $lang->edit; ?>
  58. </td>
  59. </tr>
  60. </table>
  61. </form>
  62. </div>
  63. <style>
  64. .edit-row {
  65. display: none
  66. }
  67. #ajaxForm.conference-enabled .edit-row {
  68. display: table-row
  69. }
  70. </style>
  71. <script>
  72. $(function() {
  73. $('#enabled').on('change', function() {
  74. $('#ajaxForm').toggleClass('conference-enabled', $('#enabled').is(':checked'));
  75. });
  76. });
  77. </script>
  78. <?php include $app->getModuleRoot() . 'common/view/footer.html.php'; ?>