-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #941 from Benbb96/fix-938
Disabled merged_to field in edit ticket + Fix datepicker
- Loading branch information
Showing
3 changed files
with
52 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,52 @@ | ||
{% extends "helpdesk/base.html" %}{% load i18n bootstrap4form %} | ||
{% extends "helpdesk/base.html" %} | ||
|
||
{% load i18n bootstrap4form %} | ||
|
||
{% block helpdesk_title %}{% trans "Edit Ticket" %}{% endblock %} | ||
|
||
{% block helpdesk_breadcrumb %} | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'helpdesk:list' %}">{% trans "Tickets" %}</a> | ||
</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'helpdesk:list' %}{{ ticket.id }}/">{{ ticket.queue.slug }}-{{ ticket.id }}</a> | ||
</li> | ||
<li class="breadcrumb-item active">{% trans "Edit Ticket" %}</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'helpdesk:list' %}">{% trans "Tickets" %}</a> | ||
</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{% url 'helpdesk:list' %}{{ ticket.id }}/">{{ ticket.queue.slug }}-{{ ticket.id }}</a> | ||
</li> | ||
<li class="breadcrumb-item active">{% trans "Edit Ticket" %}</li> | ||
{% endblock %} | ||
|
||
{% block helpdesk_body %} | ||
<div class="col-xs-6"> | ||
<div class="panel panel-default"> | ||
|
||
<div class="panel-body"><h2>{% trans "Edit a Ticket" %}</h2> | ||
|
||
<p>{% trans "Unless otherwise stated, all fields are required." %} {% trans "Please provide as descriptive a title and description as possible." %}</p> | ||
|
||
<p><strong>{% trans "Note" %}:</strong> {% blocktrans %}Editing a ticket does <em>not</em> send an e-mail to the ticket owner or submitter. No new details should be entered, this form should only be used to fix incorrect details or clean up the submission.{% endblocktrans %}</p> | ||
|
||
<form method='post' action='./'> | ||
<fieldset> | ||
{{ form|bootstrap4form }} | ||
{% comment %} | ||
{% for field in form %} | ||
{% if field.is_hidden %} | ||
{{ field }} | ||
{% else %} | ||
<dt><label for='id_{{ field.name }}'>{{ field.label }}</label>{% if not field.field.required %} <span class='form_optional'>{% trans "(Optional)" %}</span>{% endif %}</dt> | ||
<dd>{{ field }}</dd> | ||
{% if field.errors %}<dd class='error'>{{ field.errors }}</dd>{% endif %} | ||
{% if field.help_text %}<dd class='form_help_text'>{{ field.help_text }}</dd>{% endif %}</label> | ||
{% endif %} | ||
{% endfor %} | ||
</dl> | ||
{% endcomment %} | ||
<div class='buttons form-group'> | ||
<input type='submit' class="btn btn-primary btn-sm" value='{% trans "Save Changes" %}' /> | ||
<a href='{{ ticket.get_absolute_url }}'><button class="btn btn-danger">{% trans "Cancel Changes" %}</button></a> | ||
<div class="col-xs-6"> | ||
<div class="panel panel-default"> | ||
<div class="panel-body"><h2>{% trans "Edit a Ticket" %}</h2> | ||
<p> | ||
{% trans "Unless otherwise stated, all fields are required." %} | ||
{% trans "Please provide as descriptive a title and description as possible." %} | ||
</p> | ||
<p> | ||
<strong>{% trans "Note" %}:</strong> | ||
{% blocktrans %}Editing a ticket does <em>not</em> send an e-mail to the ticket owner or submitter. No new details should be entered, this form should only be used to fix incorrect details or clean up the submission.{% endblocktrans %} | ||
</p> | ||
<form method='post'> | ||
{% csrf_token %} | ||
<fieldset> | ||
{{ form|bootstrap4form }} | ||
<div class='buttons form-group'> | ||
<input type='submit' class="btn btn-primary btn-sm" value='{% trans "Save Changes" %}'/> | ||
<a href='{{ ticket.get_absolute_url }}'> | ||
<button class="btn btn-danger">{% trans "Cancel Changes" %}</button> | ||
</a> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</fieldset> | ||
|
||
{% csrf_token %}</form> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
$( function() { | ||
$( "#id_due_date" ).datepicker({dateFormat: 'yy-mm-dd'}); | ||
} ); | ||
</script> | ||
{% endblock %} | ||
|
||
{% block helpdesk_js %} | ||
<script> | ||
$(() => { | ||
$("#id_due_date").datepicker({dateFormat: 'yy-mm-dd'}); | ||
}) | ||
</script> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters