blob: 4ba65bd26f6ab56d91826b2a97054a1f66162329 [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">
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +01008 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +01009 <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>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010014 <div class="row mb-2">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010015 <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>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010024 <div class="row mb-4">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010025 <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>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010039 <div class="row mb-2">
40 <div class="offset-sm-2 col-sm-10">
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010041 <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>
Matthias Andreas Benkard1ba53812022-12-27 17:32:58 +010046 <div class="row">
47 <div class="offset-sm-2 col-sm-10">
48 <button class="btn btn-xs-lg d-block d-sm-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>
Matthias Andreas Benkard12a57352021-12-28 18:02:04 +010049 </div>
50 </div>
51</form>
52{% else %}
53 {{ parent() }}
54{% endif %}
55{% endblock %}