Skip to content
Snippets Groups Projects
Commit dc1e667a authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #105 from protich/feature/datepicker

Feature/datepicker
parents 3151db78 1350e9cc
No related branches found
No related tags found
No related merge requests found
Showing
with 369 additions and 162 deletions
css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png

260 B

css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png

251 B

css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png

178 B

css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png

104 B

css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png

125 B

css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png

105 B

css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png

3.67 KiB

css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png

90 B

css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png

129 B

css/ui-lightness/images/ui-icons_222222_256x240.png

4.27 KiB

css/ui-lightness/images/ui-icons_228ef1_256x240.png

4.27 KiB

css/ui-lightness/images/ui-icons_ef8c08_256x240.png

4.27 KiB

css/ui-lightness/images/ui-icons_ffd27a_256x240.png

4.27 KiB

css/ui-lightness/images/ui-icons_ffffff_256x240.png

4.27 KiB

This diff is collapsed.
<?php
if(!defined('OSTSCPINC') || !is_object($ticket) || !is_object($thisstaff) || !$thisstaff->isStaff()) die('Access Denied');
if(!($thisstaff->canEditTickets() || ($thisstaff->isManager() && $ticket->getDeptId()==$thisstaff->getDeptId()))) die('Access Denied. Perm error.');
if($_POST && $errors){
$info=Format::input($_POST);
}else{
$info=array('email'=>$ticket->getEmail(),
'name' =>$ticket->getName(),
'phone'=>$ticket->getPhone(),
'phone_ext'=>$ticket->getPhoneExt(),
'pri'=>$ticket->getPriorityId(),
'topicId'=>$ticket->getTopicId(),
'topic'=>$ticket->getHelpTopic(),
'subject' =>$ticket->getSubject(),
'duedate' =>$ticket->getDueDate()?(Format::userdate('m/d/Y',Misc::db2gmtime($ticket->getDueDate()))):'',
'time'=>$ticket->getDueDate()?(Format::userdate('G:i',Misc::db2gmtime($ticket->getDueDate()))):'',
);
/*Note: Please don't make me explain how dates work - it is torture. Trust me! */
}
?>
<div width="100%">
<?php if($errors['err']) { ?>
<p align="center" id="errormessage"><?php echo $errors['err']; ?></p>
<?php }elseif($msg) { ?>
<p align="center" class="infomessage"><?php echo $msg; ?></p>
<?php }elseif($warn) { ?>
<p class="warnmessage"><?php echo $warn; ?></p>
<?php } ?>
</div>
<table width="100%" border="0" cellspacing=1 cellpadding=2>
<form action="tickets.php?id=<?php echo $ticket->getId(); ?>" method="post">
<input type='hidden' name='id' value='<?php echo $ticket->getId(); ?>'>
<input type='hidden' name='a' value='update'>
<tr><td align="left" colspan=2 class="msg">
Update Ticket #<?php echo $ticket->getExtId(); ?>&nbsp;&nbsp;(<a href="tickets.php?id=<?php echo $ticket->getId(); ?>" style="color:black;">View Ticket</a>)<br></td></tr>
<tr>
<td align="left" nowrap width="120"><b>Email Address:</b></td>
<td>
<input type="text" id="email" name="email" size="25" value="<?php echo $info['email']; ?>">
&nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $errors['email']; ?></font>
</td>
</tr>
<tr>
<td align="left" ><b>Full Name:</b></td>
<td>
<input type="text" id="name" name="name" size="25" value="<?php echo $info['name']; ?>">
&nbsp;<font class="error"><b>*</b>&nbsp;<?php echo $errors['name']; ?></font>
</td>
</tr>
<tr>
<td align="left"><b>Subject:</b></td>
<td>
<input type="text" name="subject" size="35" value="<?php echo $info['subject']; ?>">
&nbsp;<font class="error">*&nbsp;<?php echo $errors['subject']; ?></font>
</td>
</tr>
<tr>
<td align="left">Telephone:</td>
<td><input type="text" name="phone" size="25" value="<?php echo $info['phone']; ?>">
&nbsp;Ext&nbsp;<input type="text" name="phone_ext" size="6" value="<?php echo $info['phone_ext']; ?>">
&nbsp;<font class="error">&nbsp;<?php echo $errors['phone']; ?></font></td>
</tr>
<tr height=1px><td align="left" colspan=2 >&nbsp;</td></tr>
<tr>
<td align="left" valign="top">Due Date:</td>
<td>
<i>Time is based on your time zone (GM <?php echo $thisstaff->getTZoffset(); ?>)</i>&nbsp;<font class="error">&nbsp;<?php echo $errors['time']; ?></font><br>
<input id="duedate" name="duedate" value="<?php echo Format::htmlchars($info['duedate']); ?>"
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF>
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('duedate')); return false;"><img src='images/cal.png'border=0 alt=""></a>
&nbsp;&nbsp;
<?php
$min=$hr=null;
if($info['time'])
list($hr,$min)=explode(':',$info['time']);
echo Misc::timeDropdown($hr,$min,'time');
?>
&nbsp;<font class="error">&nbsp;<?php echo $errors['duedate']; ?></font>
</td>
</tr>
<?php
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' ORDER BY priority_urgency DESC';
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
<tr>
<td align="left">Priority:</td>
<td>
<select name="pri">
<?php
while($row=db_fetch_array($priorities)){ ?>
<option value="<?php echo $row['priority_id']; ?>" <?php echo $info['pri']==$row['priority_id']?'selected':''; ?> ><?php echo $row['priority_desc']; ?></option>
<?php } ?>
</select>
</td>
</tr>
<?php } ?>
<?php
$services= db_query('SELECT topic_id,topic,isactive FROM '.TOPIC_TABLE.' ORDER BY topic');
if($services && db_num_rows($services)){ ?>
<tr>
<td align="left" valign="top">Help Topic:</td>
<td>
<select name="topicId">
<option value="0" selected >None</option>
<?php if(!$info['topicId'] && $info['topic']){ //old helptopic ?>
<option value="0" selected ><?php echo $info['topic']; ?> (deleted)</option>
<?php
}
while (list($topicId,$topic,$active) = db_fetch_row($services)){
$selected = ($info['topicId']==$topicId)?'selected':'';
$status=$active?'Active':'Inactive';
?>
<option value="<?php echo $topicId; ?>"<?php echo $selected; ?>><?php echo $topic; ?>&nbsp;&nbsp;&nbsp;(<?php echo $status; ?>)</option>
<?php
} ?>
</select>
&nbsp;(optional)<font class="error">&nbsp;<?php echo $errors['topicId']; ?></font>
</td>
</tr>
<?php
} ?>
<tr>
<td align="left" valign="top"><b>Internal Note:</b></td>
<td>
<i>Reasons for the edit.</i><font class="error"><b>*&nbsp;<?php echo $errors['note']; ?></b></font><br/>
<textarea name="note" cols="45" rows="5" wrap="soft"><?php echo $info['note']; ?></textarea></td>
</tr>
<tr height=2px><td align="left" colspan=2 >&nbsp;</td></tr>
<tr>
<td></td>
<td>
<input class="button" type="submit" name="submit_x" value="Update Ticket">
<input class="button" type="reset" value="Reset">
<input class="button" type="button" name="cancel" value="Cancel" onClick='window.location.href="tickets.php?id=<?php echo $ticket->getId(); ?>"'>
</td>
</tr>
</form>
</table>
...@@ -14,19 +14,20 @@ ...@@ -14,19 +14,20 @@
</style> </style>
<![endif]--> <![endif]-->
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="./js/calendar.js"></script> <script type="text/javascript" src="../js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="./js/tips.js"></script> <script type="text/javascript" src="./js/tips.js"></script>
<script type="text/javascript" src="./js/nicEdit.js"></script> <script type="text/javascript" src="./js/nicEdit.js"></script>
<script type="text/javascript" src="./js/bootstrap-typeahead.js"></script> <script type="text/javascript" src="./js/bootstrap-typeahead.js"></script>
<script type="text/javascript" src="./js/scp.js"></script> <script type="text/javascript" src="./js/scp.js"></script>
<link rel="stylesheet" href="./css/scp.css" media="screen"> <link rel="stylesheet" href="./css/scp.css" media="screen">
<link rel="stylesheet" href="./css/typeahead.css" media="screen"> <link rel="stylesheet" href="./css/typeahead.css" media="screen">
<link type="text/css" href="../css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div id="container"> <div id="container">
<div id="header"> <div id="header">
<a href="index.php" id="logo">osTicket - Customer Support System</a> <a href="index.php" id="logo">osTicket - Customer Support System</a>
<p id="info">Welcome back, <strong><?php echo $thisstaff->getUserName(); ?></strong> <p id="info">Howdy, <strong><?php echo $thisstaff->getUserName(); ?></strong>
<?php <?php
if($thisstaff->isAdmin() && !defined('ADMINPAGE')) { ?> if($thisstaff->isAdmin() && !defined('ADMINPAGE')) { ?>
| <a href="admin.php">Admin Panel</a> | <a href="admin.php">Admin Panel</a>
......
...@@ -88,13 +88,9 @@ else ...@@ -88,13 +88,9 @@ else
<form action="syslogs.php" method="get"> <form action="syslogs.php" method="get">
<div style="padding-left:2px;"> <div style="padding-left:2px;">
<b>Date Span</b>: <b>Date Span</b>:
&nbsp;From&nbsp;<input class="dp" id="sd" size=15 name="startDate" value="<?php echo Format::htmlchars($_REQUEST['startDate']); ?>" &nbsp;From&nbsp;<input class="dp" id="sd" size=15 name="startDate" value="<?php echo Format::htmlchars($_REQUEST['startDate']); ?>" autocomplete=OFF>
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF>
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('sd')); return false;"><img src='images/cal.png'border=0 alt=""></a>
&nbsp;&nbsp; to &nbsp;&nbsp; &nbsp;&nbsp; to &nbsp;&nbsp;
<input class="dp" id="ed" size=15 name="endDate" value="<?php echo Format::htmlchars($_REQUEST['endDate']); ?>" <input class="dp" id="ed" size=15 name="endDate" value="<?php echo Format::htmlchars($_REQUEST['endDate']); ?>" autocomplete=OFF>
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF >
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('ed')); return false;"><img src='images/cal.png'border=0 alt=""></a>
&nbsp;&nbsp; &nbsp;&nbsp;
&nbsp;Type: &nbsp;Type:
<select name='type'> <select name='type'>
......
...@@ -139,18 +139,17 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$ticket->getUpdateInfo()); ...@@ -139,18 +139,17 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$ticket->getUpdateInfo());
Due Date: Due Date:
</td> </td>
<td> <td>
<input id="duedate" name="duedate" value="<?php echo Format::htmlchars($info['duedate']); ?>" size="10" <input class="dp" id="duedate" name="duedate" value="<?php echo Format::htmlchars($info['duedate']); ?>" size="12" autocomplete=OFF>
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF>
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('duedate')); return false;"><img src='images/cal.png'border=0 alt=""></a>
&nbsp;&nbsp; &nbsp;&nbsp;
<?php <?php
$min=$hr=null; $min=$hr=null;
if($info['time']) if($info['time'])
list($hr,$min)=explode(':',$info['time']); list($hr, $min)=explode(':', $info['time']);
echo Misc::timeDropdown($hr,$min,'time');
echo Misc::timeDropdown($hr, $min, 'time');
?> ?>
&nbsp;<font class="error">&nbsp;<?=$errors['duedate']?>&nbsp;<?php echo $errors['time']; ?></font> &nbsp;<font class="error">&nbsp;<?=$errors['duedate']?>&nbsp;<?php echo $errors['time']; ?></font>
<em>Time is based on your time zone (GM <?php echo $thisstaff->getTZoffset(); ?>)</em> <em>Time is based on your time zone (GMT <?php echo $thisstaff->getTZoffset(); ?>)</em>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -203,18 +203,17 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -203,18 +203,17 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
Due Date: Due Date:
</td> </td>
<td> <td>
<input id="duedate" name="duedate" value="<?php echo Format::htmlchars($info['duedate']); ?>" size="10" <input class="dp" id="duedate" name="duedate" value="<?php echo Format::htmlchars($info['duedate']); ?>" size="12" autocomplete=OFF>
onclick="event.cancelBubble=true;calendar(this);" autocomplete=OFF>
<a href="#" onclick="event.cancelBubble=true;calendar(getObj('duedate')); return false;"><img src='images/cal.png'border=0 alt=""></a>
&nbsp;&nbsp; &nbsp;&nbsp;
<?php <?php
$min=$hr=null; $min=$hr=null;
if($info['time']) if($info['time'])
list($hr,$min)=explode(':',$info['time']); list($hr, $min)=explode(':', $info['time']);
echo Misc::timeDropdown($hr,$min,'time');
echo Misc::timeDropdown($hr, $min, 'time');
?> ?>
&nbsp;<font class="error">&nbsp;<?=$errors['duedate']?>&nbsp;<?php echo $errors['time']; ?></font> &nbsp;<font class="error">&nbsp;<?=$errors['duedate']?>&nbsp;<?php echo $errors['time']; ?></font>
<em>Time is based on your time zone (GM <?php echo $thisstaff->getTZoffset(); ?>)</em> <em>Time is based on your time zone (GMT <?php echo $thisstaff->getTZoffset(); ?>)</em>
</td> </td>
</tr> </tr>
<tr> <tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment