+<script type="text/javascript">
+function changeStatus() {
+ var Status_select = document.getElementById('Status');
+ var x = Status_select.options[Status_select.selectedIndex].value;
+ var text = document.getElementById('WillResolve_Date');
+ var button = document.getElementById('WillResolve_Date_date_button');
+ if (x == 'resolved' || x == 'rejected' || x == 'deleted') {
+ text.disabled = true;
+ button.style.display = 'none';
+ }
+ else {
+ text.disabled = false;
+ button.style.display = 'inline';
+ }
+}
+</script>
+
+<& /Ticket/Elements/EditBasics,
+ TicketObj => $TicketObj,
+ InTable => 1,
+ fields => [
+ { name => 'Status',
+ comp => '/Ticket/Elements/SelectStatus',
+ args => {
+ Name => 'Status',
+ Default => $DefaultStatus,
+ TicketObj => $TicketObj,
+ onchange => 'changeStatus()'
+ },
+ },
+ { name => 'Resolve this Ticket on',
+ comp => '/Elements/SelectDate',
+ args => {
+ menu_prefix => 'WillResolve',
+ current => 0,
+ ShowTime => 0,
+ },
+ },
+ { name => 'Owner',
+ comp => '/Elements/SelectOwner',
+ args => {
+ Name => "Owner",
+ TicketObj => $TicketObj,
+ QueueObj => $TicketObj->QueueObj,
+ DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Format),
+ Default => $ARGS{'Owner'}
+ }
+ },
+ { name => 'Worked',
+ comp => '/Elements/EditTimeValue',
+ args => {
+ Name => 'UpdateTimeWorked',
+ Default => $ARGS{UpdateTimeWorked}||'',
+ }
+ },
+ ]
+&>