settings.html.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!--
  2. PirateBox app for YunoHost
  3. Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
  4. Contribute at https://github.com/jvaubourg/piratebox_ynh
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU Affero General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU Affero General Public License for more details.
  13. You should have received a copy of the GNU Affero General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. -->
  16. <h2><?= T_("PirateBox Configuration") ?></h2>
  17. <?php if($faststatus): ?>
  18. <span class="label label-success" data-toggle="tooltip" data-title="<?= T_('This is a fast status. Click on More details to show the complete status.') ?>"><?= T_('Running') ?></span>
  19. <?php else: ?>
  20. <span class="label label-danger" data-toggle="tooltip" data-title="<?= T_('This is a fast status. Click on More details to show the complete status.') ?>"><?= T_('Not Running') ?></span>
  21. <?php endif; ?>
  22. &nbsp; <img src="public/img/loading.gif" id="status-loading" alt="Loading..." /><a href="#" id="statusbtn" data-toggle="tooltip" data-title="<?= T_('Loading complete status may take a few minutes. Be patient.') ?>"><?= T_('More details') ?></a> &middot; <a href="http://<?= $opt_domain ?>:4280">PirateBox</a>
  23. <div id="status" class="alert alert-dismissible alert-info fade in" style="margin-top: 10px" role="alert">
  24. <button type="button" class="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  25. <div id="status-text"></div>
  26. </div>
  27. <hr />
  28. <div class="row">
  29. <div class="col-sm-offset-2 col-sm-8">
  30. <form method="post" enctype="multipart/form-data" action="?/settings" class="form-horizontal" role="form" id="form">
  31. <input type="hidden" name="_method" value="put" />
  32. <div class="panel panel-default">
  33. <div class="panel-heading">
  34. <h3 class="panel-title"><?= T_("Service") ?></h3>
  35. </div>
  36. <div style="padding: 14px 14px 0 10px">
  37. <div class="form-group">
  38. <label for="service_enabled" class="col-sm-3 control-label"><?= T_('PirateBox Enabled') ?></label>
  39. <div class="col-sm-9 input-group-btn">
  40. <div class="input-group">
  41. <input type="checkbox" class="form-control switch" name="service_enabled" id="service_enabled" value="1" <?= $service_enabled == 1 ? 'checked="checked"' : '' ?> />
  42. </div>
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. <label for="wifi_device_id" class="col-sm-3 control-label"><?= T_('Hotspot') ?></label>
  47. <div class="col-sm-9 input-group-btn">
  48. <div class="input-group">
  49. <input type="text" name="wifi_device_id" id="wifi_device_id" value="<?= $wifi_device_id ?>" style="display: none" />
  50. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><?= $wifi_ssid ?> <span class="caret"></span></button>
  51. <ul class="dropdown-menu dropdown-menu-left" id="deviceidlist" role="menu">
  52. <?= $wifi_ssid_list ?>
  53. </ul>
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="panel panel-default enabled" <?= $service_enabled == 0 ? 'style="display: none"' : '' ?>>
  60. <div class="panel-heading">
  61. <h3 class="panel-title"><?= T_("PirateBox") ?></h3>
  62. </div>
  63. <div style="padding: 14px 14px 0 10px">
  64. <div class="form-group">
  65. <label for="opt_name" class="col-sm-3 control-label"><?= T_('Name') ?></label>
  66. <div class="col-sm-9">
  67. <input type="text" class="form-control" name="opt_name" id="opt_name" placeholder="PirateBox" value="<?= htmlentities($opt_name) ?>" />
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label for="opt_renaming" class="col-sm-3 control-label"><?= T_('Renaming Allowed') ?></label>
  72. <div class="col-sm-9 input-group-btn">
  73. <div class="input-group">
  74. <input type="checkbox" class="form-control switch" name="opt_renaming" id="opt_renaming" value="1" <?= $opt_renaming == 1 ? 'checked="checked"' : '' ?> />
  75. </div>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label for="opt_deleting" class="col-sm-3 control-label"><?= T_('Deleting Allowed') ?></label>
  80. <div class="col-sm-9 input-group-btn">
  81. <div class="input-group">
  82. <input type="checkbox" class="form-control switch" name="opt_deleting" id="opt_deleting" value="1" <?= $opt_deleting == 1 ? 'checked="checked"' : '' ?> />
  83. </div>
  84. </div>
  85. </div>
  86. <div class="form-group">
  87. <label for="opt_chat" class="col-sm-3 control-label"><?= T_('Chat Enabled') ?></label>
  88. <div class="col-sm-9 input-group-btn">
  89. <div class="input-group">
  90. <input type="checkbox" class="form-control switch" name="opt_chat" id="opt_chat" value="1" <?= $opt_chat == 1 ? 'checked="checked"' : '' ?> />
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="form-group">
  97. <div style="text-align: center">
  98. <button type="submit" class="btn btn-default" data-toggle="tooltip" id="save" data-title="<?= T_('Reloading may take a few minutes. Be patient.') ?>"><?= T_('Save and reload') ?></button> <img src="public/img/loading.gif" id="save-loading" alt="Loading..." />
  99. </div>
  100. </div>
  101. </form>
  102. </div>
  103. </div>