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"> |
| 8 | <div class="form-group"> |
| 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> |
| 12 | <p class="help-block">{{ lang.add.relayhost_wrapped_tls_info|raw }}</p> |
| 13 | </div> |
| 14 | </div> |
| 15 | <div class="form-group"> |
| 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> |
| 21 | <div class="form-group"> |
| 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> |
| 27 | <div class="form-group"> |
| 28 | <div class="col-sm-offset-2 col-sm-10"> |
| 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> |
| 34 | <div class="form-group"> |
| 35 | <div class="col-sm-offset-2 col-sm-10"> |
| 36 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-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> |
| 37 | </div> |
| 38 | </div> |
| 39 | </form> |
| 40 | {% else %} |
| 41 | {{ parent() }} |
| 42 | {% endif %} |
| 43 | {% endblock %} |