blob: 36534bbc36281aa55b064c74c9aebc8c403b7b7b [file] [log] [blame]
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01001{% 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="editresource">
7 <input type="hidden" value="0" name="active">
8 <div class="form-group">
9 <label class="control-label col-sm-2" for="description">{{ lang.add.description }}</label>
10 <div class="col-sm-10">
11 <input type="text" class="form-control" name="description" value="{{ result.description }}" required>
12 </div>
13 </div>
14 <div class="form-group">
15 <label class="control-label col-sm-2" for="domain">{{ lang.edit.kind }}</label>
16 <div class="col-sm-10">
17 <select name="kind" title="{{ lang.edit.select }}" required>
18 <option value="location"{% if result.kind == 'location' %} selected{% endif %}>Location</option>
19 <option value="group"{% if result.kind == 'group' %} selected{% endif %}>Group</option>
20 <option value="thing"{% if result.kind == 'thing' %} selected{% endif %}>Thing</option>
21 </select>
22 </div>
23 </div>
24 <div class="form-group">
25 <label class="control-label col-sm-2" for="multiple_bookings_select">{{ lang.add.multiple_bookings }}</label>
26 <div class="col-sm-10">
27 <select name="multiple_bookings_select" id="editSelectMultipleBookings" title="{{ lang.add.select }}" required>
28 <option value="0"{% if result.multiple_bookings == 0 %} selected{% endif %}>{{ lang.mailbox.booking_null }}</option>
29 <option value="-1"{% if result.multiple_bookings == -1 %} selected{% endif %}>{{ lang.mailbox.booking_ltnull }}</option>
30 <option value="custom"{% if result.multiple_bookings >= 1 %} selected{% endif %}>{{ lang.mailbox.booking_custom }}</option>
31 </select>
32 <div style="display:none" id="multiple_bookings_custom_div">
33 <hr>
34 <input type="number" class="form-control" name="multiple_bookings_custom" id="multiple_bookings_custom"{% if result.multiple_bookings >= 1 %} value="{{ result.multiple_bookings }}"{% endif %}>
35 </div>
36 <input type="hidden" name="multiple_bookings" id="multiple_bookings">
37 </div>
38 </div>
39 <div class="form-group">
40 <div class="col-sm-offset-2 col-sm-10">
41 <div class="checkbox">
42 <label><input type="checkbox" value="1" name="active"{% if result.active == '1' %} checked{% endif %}> {{ lang.edit.active }}</label>
43 </div>
44 </div>
45 </div>
46 <div class="form-group">
47 <div class="col-sm-offset-2 col-sm-10">
48 <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="editresource" data-item="{{ result.name }}" data-api-url='edit/resource' data-api-attr='{}' href="#">{{ lang.edit.save }}</button>
49 </div>
50 </div>
51</form>
52{% else %}
53 {{ parent() }}
54{% endif %}
55{% endblock %}