mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-25 17:33:08 +01:00
* Further form improvements, this time in the 'Edit Ticket' area.
This commit is contained in:
parent
3f7c918161
commit
dce7731957
2
forms.py
2
forms.py
@ -99,6 +99,6 @@ class TicketForm(forms.Form):
|
|||||||
|
|
||||||
if t.submitter_email:
|
if t.submitter_email:
|
||||||
from helpdesk.lib import send_multipart_mail
|
from helpdesk.lib import send_multipart_mail
|
||||||
send_multipart_mail('helpdesk/emails/submitter_newticket', context, '%s %s' % (t.ticket, t.title), t.submitter_email,, q.from_address)
|
send_multipart_mail('helpdesk/emails/submitter_newticket', context, '%s %s' % (t.ticket, t.title), t.submitter_email, q.from_address)
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
@ -47,6 +47,10 @@ dd.form_help_text {
|
|||||||
font-size: 95%;
|
font-size: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dt {
|
||||||
|
padding-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
.row_tablehead {
|
.row_tablehead {
|
||||||
background-color: #6593C0;
|
background-color: #6593C0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -181,3 +185,7 @@ a img {
|
|||||||
border: none;
|
border: none;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textarea#commentBox {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
nic = new nicEditor({buttonList: ['bold','italic','underline','strikeThrough','undo','redo','subscript','superscript','html']}).panelInstance('commentBox');
|
nic = new nicEditor({buttonList: ['bold','italic','underline','strikeThrough','undo','redo','subscript','superscript','html']}).panelInstance('commentBox');
|
||||||
$("#ShowFurtherEditOptions").click(function() {
|
$("#ShowFurtherEditOptions").click(function() {
|
||||||
$("#FurtherEditOptions").toggle();
|
$("#FurtherEditOptions").fadeIn();
|
||||||
|
$("#ShowFurtherOptPara").hide();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
$('#id_preset').change(function() {
|
$('#id_preset').change(function() {
|
||||||
@ -19,14 +20,13 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style type='text/css'>#commentBox { width: 100%; }</style>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block helpdesk_body %}
|
{% block helpdesk_body %}
|
||||||
|
|
||||||
<table width='100%'>
|
<table width='100%'>
|
||||||
<tr class='row_tablehead'><td>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status_display }}]</td><td align='right'><a href='#edit'><img src='{{ MEDIA_URL }}/helpdesk/buttons/edit.png' alt='Edit' title='Edit' width='60' height='15' /></a><a href='?delete'><img src='{{ MEDIA_URL }}/helpdesk/buttons/delete.png' alt='Delete' title='Delete' width='60' height='15' /></a></td></tr>
|
<tr class='row_tablehead'><td>{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status_display }}]</td><td align='right'><a href='#edit'><img src='{{ MEDIA_URL }}/helpdesk/buttons/edit.png' alt='Edit' title='Edit' width='60' height='15' /></a><a href='?delete'><img src='{{ MEDIA_URL }}/helpdesk/buttons/delete.png' alt='Delete' title='Delete' width='60' height='15' /></a></td></tr>
|
||||||
<tr class='row_columnheads'><td colspan='2'>Queue: {{ ticket.queue }}</td></tr>
|
<tr class='row_columnheads'><th colspan='2'>Queue: {{ ticket.queue }}</th></tr>
|
||||||
|
|
||||||
<tr class='row_odd'>
|
<tr class='row_odd'>
|
||||||
<th>Submitted On</th>
|
<th>Submitted On</th>
|
||||||
@ -80,52 +80,69 @@ Changed {{ change.field }} from {{ change.old_value }} to {{ change.new_value }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<form method='post' action='update/'>
|
|
||||||
<h3>Respond to this ticket</h3>
|
<h3>Respond to this ticket</h3>
|
||||||
|
|
||||||
<label for='id_preset'>Use a Pre-set Reply</label> <select name='preset' id='id_preset'><option value=''>------</option>{% for preset in preset_replies %}<option value='{{ preset.id }}'>{{ preset.name }}</option>{% endfor %}</select>
|
<form method='post' action='update/'>
|
||||||
|
|
||||||
<textarea rows='8' cols='70' name='comment' id='commentBox'></textarea>
|
<fieldset>
|
||||||
<p>New Status
|
<dl>
|
||||||
{% ifequal ticket.status 1 %}
|
<dt><label for='id_preset'>Use a Pre-set Reply</label> <span class='form_optional'>(Optional)</span></dt>
|
||||||
<input type='radio' name='new_status' value='1' id='st_open' checked='checked'><label for='st_open' class='active'>Open</label> »
|
<dd><select name='preset' id='id_preset'><option value=''>------</option>{% for preset in preset_replies %}<option value='{{ preset.id }}'>{{ preset.name }}</option>{% endfor %}</select></dd>
|
||||||
<input type='radio' name='new_status' value='3' id='st_resolved'><label for='st_resolved'>Resolved</label> »
|
<dd class='form_help_text'>Selecting a pre-set reply will over-write your comment below. You can then modify the pre-set reply to your liking before saving this update.</dd>
|
||||||
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label>
|
|
||||||
{% endifequal %}
|
|
||||||
{% ifequal ticket.status 2 %}
|
|
||||||
<input type='radio' name='new_status' value='2' id='st_reopened' checked='checked'><label for='st_reopened' class='active'>Reopened</label> »
|
|
||||||
<input type='radio' name='new_status' value='3' id='st_resolved'><label for='st_resolved'>Resolved</label> »
|
|
||||||
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label>
|
|
||||||
{% endifequal %}
|
|
||||||
{% ifequal ticket.status 3 %}
|
|
||||||
<input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>Reopened</label> «
|
|
||||||
<input type='radio' name='new_status' value='3' id='st_resolved' checked='checked'><label for='st_resolved' class='active'>Resolved</label> »
|
|
||||||
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label>
|
|
||||||
{% endifequal %}
|
|
||||||
|
|
||||||
{% ifequal ticket.status 4 %}
|
<dt><label for='commentBox'>Comment / Resolution</label></dt>
|
||||||
<input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>Reopened</label> «
|
<dd><textarea rows='8' cols='70' name='comment' id='commentBox'></textarea></dd>
|
||||||
<input type='radio' name='new_status' value='4' id='st_closed' checked='checked'><label for='st_closed'>Closed</label>
|
<dd class='form_help_text'>You can use the ticket and queue template variables in your message.</dd>
|
||||||
{% endifequal %}
|
|
||||||
|
|
||||||
<p><a href='#' id='ShowFurtherEditOptions'>Change Other Details</a></p>
|
<dt><label>New Status</label></dt>
|
||||||
|
{% ifequal ticket.status 1 %}
|
||||||
|
<dd><input type='radio' name='new_status' value='1' id='st_open' checked='checked'><label for='st_open' class='active'>Open</label> »
|
||||||
|
<input type='radio' name='new_status' value='3' id='st_resolved'><label for='st_resolved'>Resolved</label> »
|
||||||
|
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label></dd>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal ticket.status 2 %}
|
||||||
|
<dd><input type='radio' name='new_status' value='2' id='st_reopened' checked='checked'><label for='st_reopened' class='active'>Reopened</label> »
|
||||||
|
<input type='radio' name='new_status' value='3' id='st_resolved'><label for='st_resolved'>Resolved</label> »
|
||||||
|
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label> </dd>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal ticket.status 3 %}
|
||||||
|
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>Reopened</label> «
|
||||||
|
<input type='radio' name='new_status' value='3' id='st_resolved' checked='checked'><label for='st_resolved' class='active'>Resolved</label> »
|
||||||
|
<input type='radio' name='new_status' value='4' id='st_closed'><label for='st_closed'>Closed</label></dd>
|
||||||
|
{% endifequal %}
|
||||||
|
{% ifequal ticket.status 4 %}
|
||||||
|
<dd><input type='radio' name='new_status' value='2' id='st_reopened'><label for='st_reopened'>Reopened</label> «
|
||||||
|
<input type='radio' name='new_status' value='4' id='st_closed' checked='checked'><label for='st_closed'>Closed</label></dd>
|
||||||
|
{% endifequal %}
|
||||||
|
|
||||||
|
<dt><label for='id_public'>Is this update public?</label> <span class='form_optional'>(Optional)</span></dt>
|
||||||
|
<dd><input type='checkbox' name='public' value='1' checked='checked' /></dD>
|
||||||
|
<dd class='form_help_text'>If this is public, the submitter will be e-mailed your comment or resolution.</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<p id='ShowFurtherOptPara'><a href='#' id='ShowFurtherEditOptions'>Change Further Details »</a></p>
|
||||||
|
|
||||||
<div id='FurtherEditOptions' style='display: none;'>
|
<div id='FurtherEditOptions' style='display: none;'>
|
||||||
|
|
||||||
<label for='id_title'>Title</label>
|
<dl>
|
||||||
<input type='text' name='title' value='{{ ticket.title|escape }}' />
|
|
||||||
|
|
||||||
<label for='id_owner'>Owner</label>
|
<dt><label for='id_title'>Title</label></dt>
|
||||||
<select id='id_owner' name='owner'><option value='0'>Unassign</option>{% for u in active_users %}<option value='{{ u.id }}' {% ifequal u.id ticket.assigned_to.id %}selected{% endifequal %}>{{ u }}</option>{% endfor %}</select>
|
<dd><input type='text' name='title' value='{{ ticket.title|escape }}' /></dd>
|
||||||
|
|
||||||
<label for='id_priority'>Priority</label>
|
<dt><label for='id_owner'>Owner</label></dt>
|
||||||
<select id='id_priority' name='priority'>{% for p in priorities %}<option value='{{ p.0 }}'{% ifequal p.0 ticket.priority %} selected='selected'{% endifequal %}>{{ p.1 }}</option>{% endfor %}</select>
|
<dd><select id='id_owner' name='owner'><option value='0'>Unassign</option>{% for u in active_users %}<option value='{{ u.id }}' {% ifequal u.id ticket.assigned_to.id %}selected{% endifequal %}>{{ u }}</option>{% endfor %}</select></dd>
|
||||||
|
|
||||||
|
<dt><label for='id_priority'>Priority</label></dt>
|
||||||
|
<dd><select id='id_priority' name='priority'>{% for p in priorities %}<option value='{{ p.0 }}'{% ifequal p.0 ticket.priority %} selected='selected'{% endifequal %}>{{ p.1 }}</option>{% endfor %}</select></dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for='id_public'>Is this update public?</label> <input type='checkbox' name='public' value='1' checked='checked' />
|
</fieldset>
|
||||||
|
|
||||||
<input type='submit' value='Add' />
|
|
||||||
|
<input type='submit' value='Update This Ticket' />
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user