settings.html.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <!--
  2. Tor Client app for YunoHost
  3. Copyright (C) 2015 Émile Morel <emile@bleuchtang.fr>
  4. Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
  5. Contribute at https://github.com/labriqueinternet/torclient_ynh
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Affero General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Affero General Public License for more details.
  14. You should have received a copy of the GNU Affero General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <h2><?= _("Tor Client Configuration") ?></h2>
  18. <?php if($faststatus): ?>
  19. <span class="label label-success" data-toggle="tooltip" data-title="<?= _('This is a fast status. Click on More details to show the complete status.') ?>"><?= _('Running') ?></span>
  20. <?php else: ?>
  21. <span class="label label-danger" data-toggle="tooltip" data-title="<?= _('This is a fast status. Click on More details to show the complete status.') ?>"><?= _('Not Running') ?></span>
  22. <?php endif; ?>
  23. &nbsp; <img src="public/img/loading.gif" id="status-loading" alt="Loading..." /><a href="#" id="statusbtn" data-toggle="tooltip" data-title="<?= _('Loading complete status may take a few minutes. Be patient.') ?>"><?= _('More details') ?></a>
  24. <div id="status" class="alert alert-dismissible alert-info fade in" style="margin-top: 10px" role="alert">
  25. <button type="button" class="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  26. <div id="status-text"></div>
  27. </div>
  28. <hr />
  29. <div class="row">
  30. <div class="col-sm-offset-2 col-sm-8">
  31. <form method="post" enctype="multipart/form-data" action="?/settings" class="form-horizontal" role="form" id="form">
  32. <input type="hidden" name="_method" value="put" />
  33. <div class="panel panel-default">
  34. <div class="panel-heading">
  35. <h3 class="panel-title"><?= _("Service") ?></h3>
  36. </div>
  37. <div style="padding: 14px 14px 0 10px">
  38. <div class="form-group">
  39. <label for="service_enabled" class="col-sm-3 control-label"><?= _('Tor Enabled') ?></label>
  40. <div class="col-sm-9 input-group-btn">
  41. <div class="input-group">
  42. <input type="checkbox" class="form-control switch" name="service_enabled" id="service_enabled" value="1" <?= $service_enabled == 1 ? 'checked="checked"' : '' ?> />
  43. </div>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <?php if($wifi_device_id == -1): ?>
  48. <div class="alert alert-dismissible alert-warning fade in" style="margin: 2px 16px 17px" role="alert">
  49. <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  50. <strong><?= _('Notice') ?>:</strong> <?= _("You need to select an associated hotspot.") ?>
  51. </div>
  52. <?php endif; ?>
  53. <label for="wifi_device_id" class="col-sm-3 control-label"><?= _('Associated Hotspot') ?></label>
  54. <div class="col-sm-9 input-group-btn">
  55. <div class="input-group">
  56. <input type="text" name="wifi_device_id" id="wifi_device_id" value="<?= $wifi_device_id ?>" style="display: none" />
  57. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><?= empty($wifi_ssid) ? '<em>'._("None").'</em>' : $wifi_ssid ?> <span class="caret"></span></button>
  58. <ul class="dropdown-menu dropdown-menu-left" id="deviceidlist" role="menu">
  59. <?= $wifi_ssid_list ?>
  60. </ul>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <div style="text-align: center">
  68. <button type="submit" class="btn btn-default" data-toggle="tooltip" id="save" data-title="<?= _('Reloading may take a few minutes. Be patient.') ?>"><?= _('Save and reload') ?></button> <img src="public/img/loading.gif" id="save-loading" alt="Loading..." />
  69. </div>
  70. </div>
  71. </form>
  72. </div>
  73. </div>