tp_servicedesk/ui/views/ticket/edit.html.v1

60 lines
2.5 KiB
Plaintext

<h1 class="title">Edit Ticket Form</h1>
<form action="/ticket/{{ @PARAMS.id }}/update" method="POST">
<bulma type="H_FIELD_INPUT" label="Title:" name="title" value="{{@ticket.title}}"></bulma>
<bulma type="H_FIELD_INPUT" label="Created At:" name="created_at" value="{{@ticket.created_at}}"></bulma>
<bulma type="H_FIELD_TEXTAREA" label="Description:" name="description" value="{{@ticket.description}}"></bulma>
<bulma type="H_FIELD_SELECT_NEW" label="Priority:" name="priority_id"
options="priorities" option_value="id" option_name="name"
selected="{{@ticket.priority_id}}"></bulma>
<bulma type="H_FIELD_SELECT_NEW" label="Status:" name="status_id"
options="statuses" option_value="id" option_name="name"
selected="@ticket.status_id"></bulma>
<include href="/ui/parts/clipboard.html"></include>
<div class="block">
<h3 class="title is-5">Custom Fields</h3>
<!-- existing fields-->
<div class="block">
<repeat group="{{ @ticket_meta }}" value="{{ @m }}">
<div class="field is-grouped is-grouped-right">
<input type="hidden" name="meta_id[]" value=" {{ @m.id }}">
<div class="control">
<label class="label">Key:</label>
<input class="input" type="text" name="meta_key[]" value="{{ @m.meta_key }}"
placeholder="eg. Department">
</div>
<div class="control">
<label class="label">Value:</label>
<input class="input" type="text" name="meta_value[]" value="{{ @m.meta_value }}"
placeholder="eg. Finance">
</div>
</div>
</repeat>
</div>
<hr>
<!-- adding new custom meta -->
<div class="block">
<div class="field is-grouped is-grouped-right">
<div class="control">
<label class="label">Key:</label>
<input class="input" type="text" name="meta_key[]"
placeholder="eg. Department">
</div>
<div class="control">
<label class="label">Value:</label>
<input class="input" type="text" name="meta_value[]"
placeholder="eg. Finance">
</div>
</div>
</div>
</div>
<button class="button is-primary" type="submit">Save Ticket</button>
</div>
</form>