Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 1 | {% extends 'edit.twig' %} |
| 2 | |
| 3 | {% block inner_content %} |
| 4 | {% if result %} |
| 5 | <h4>{{ lang.edit.resource }}</h4> |
| 6 | <form class="form-horizontal" role="form" method="post" data-id="editrelayhost"> |
| 7 | <input type="hidden" value="0" name="active"> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 8 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 9 | <label class="control-label col-sm-2" for="hostname">{{ lang.add.hostname }}</label> |
| 10 | <div class="col-sm-10"> |
| 11 | <input type="text" class="form-control" name="hostname" value="{{ result.hostname }}" required> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 12 | <p class="text-muted">{{ lang.add.relayhost_wrapped_tls_info|raw }}</p> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 13 | </div> |
| 14 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 15 | <div class="row mb-2"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 16 | <label class="control-label col-sm-2" for="username">{{ lang.add.username }}</label> |
| 17 | <div class="col-sm-10"> |
| 18 | <input type="text" class="form-control" name="username" value="{{ result.username }}"> |
| 19 | </div> |
| 20 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 21 | <div class="row mb-4"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 22 | <label class="control-label col-sm-2" for="password">{{ lang.add.password }}</label> |
| 23 | <div class="col-sm-10"> |
| 24 | <input type="text" data-hibp="true" class="form-control" name="password" value="{{ result.password }}"> |
| 25 | </div> |
| 26 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 27 | <div class="row mb-2"> |
| 28 | <div class="offset-sm-2 col-sm-10"> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 29 | <div class="checkbox"> |
| 30 | <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label> |
| 31 | </div> |
| 32 | </div> |
| 33 | </div> |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame] | 34 | <div class="row mb-2"> |
| 35 | <div class="offset-sm-2 col-sm-10"> |
| 36 | <button class="btn btn-xs-lg d-block d-sm-inline btn-success" data-action="edit_selected" data-id="editrelayhost" data-item="{{ result.id }}" data-api-url='edit/relayhost' data-api-attr='{}' href="#">{{ lang.edit.save }}</button> |
Matthias Andreas Benkard | 12a5735 | 2021-12-28 18:02:04 +0100 | [diff] [blame] | 37 | </div> |
| 38 | </div> |
| 39 | </form> |
| 40 | {% else %} |
| 41 | {{ parent() }} |
| 42 | {% endif %} |
| 43 | {% endblock %} |