mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
new Appointment window popup - simple, clean and nice
day names ready to add to translation .po file swithch to string instead of selector if only 1 respondent for case time selectors switched to 15 min intervals, excluded last value as it will equal possible time limit
This commit is contained in:
@@ -115,16 +115,15 @@ if(isset($_POST['start']) && isset($_POST['end']) && isset($_POST['day']) && iss
|
||||
$js = array("js/window.js");
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
$js[] = "include/jquery-ui/js/jquery-1.4.2.min.js";
|
||||
$js[] = "include/jquery-ui/js/jquery-1.4.2.min.js";
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
xhtml_head(T_("Appointment"),true,array("css/respondent.css"),$js);
|
||||
xhtml_head(T_("Create appointment"),false,array("include/bootstrap-3.3.2/css/bootstrap.min.css", "css/respondent.css"),$js);//"include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
|
||||
//select a respondent from a list or create a new one
|
||||
print("<p>" . T_("Select a respondent") . "</p>");
|
||||
|
||||
print "<h4>" . T_("Respondent") . ":";
|
||||
$sr = display_respondent_list($case_id,isset($_GET['respondent_id'])?bigintval($_GET['respondent_id']):false,true);
|
||||
|
||||
print "</h4>";
|
||||
if ($sr != false) $_GET['respondent_id'] = $sr;
|
||||
|
||||
if(isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
||||
@@ -141,6 +140,11 @@ if(isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
||||
else if(isset($_GET['respondent_id']))
|
||||
{
|
||||
$respondent_id = bigintval($_GET['respondent_id']);
|
||||
|
||||
$sql = "SELECT TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) as tme, r.Time_zone_name as tzn FROM `respondent` as r WHERE r.respondent_id = $respondent_id";
|
||||
$ct = $db->GetRow($sql);
|
||||
|
||||
print "<p>".T_("Timezone").": ".$ct['tzn']. " ".T_("Current Time").": <b class=\"fa text-primary\">" . $ct['tme'] . "</b></p>";
|
||||
|
||||
if (isset($_GET['d']) && isset($_GET['m']) && isset($_GET['y']))
|
||||
{
|
||||
@@ -156,12 +160,12 @@ else if(isset($_GET['respondent_id']))
|
||||
{
|
||||
$list = return_contact_phone_list($case_id);
|
||||
|
||||
print "<p>" . T_("Select phone number:") . "</p>";
|
||||
print "<div class=\"clearfix form-group\"><label class=\"pull-left\" style=\"padding-top: 5px;\">" . T_("Select phone number:") . " </label>";
|
||||
|
||||
if (isset($_GET['contact_phone_id'])) $contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
else $contact_phone_id = -1;
|
||||
|
||||
print "<div><select id='phonenum' name='phonenum' onchange=\"LinkUp('phonenum')\"><option>" . T_("None") . "</option>";
|
||||
print "<div class=\"pull-left\"><select class=\"form-control\" id='phonenum' name='phonenum' onchange=\"LinkUp('phonenum')\"><option></option>";
|
||||
foreach($list as $l)
|
||||
{
|
||||
$id = $l['contact_phone_id'];
|
||||
@@ -170,27 +174,29 @@ else if(isset($_GET['respondent_id']))
|
||||
print "<option value='?contact_phone_id=$id&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' $selected>{$l['phone']} - {$l['description']}</option>";
|
||||
|
||||
}
|
||||
print "<option value='?contact_phone_id=0&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' class='addresp'>" . T_("Add new phone number") . "</option></select></div>";
|
||||
print "<option value='?contact_phone_id=0&start={$_GET['start']}&end={$_GET['end']}&d=$day&y=$year&m=$month&respondent_id=$respondent_id' class='addresp'>" . T_("Add new phone number") . "</option></select></div></div>";
|
||||
|
||||
|
||||
if(isset($_GET['contact_phone_id']))
|
||||
{
|
||||
$contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
|
||||
print "<div class=\"clearfix form-group\">";
|
||||
|
||||
if ($contact_phone_id == 0)
|
||||
{
|
||||
//ability to add a new one
|
||||
?>
|
||||
<p><?php echo T_("Add new phone number (with area code, eg 0398761234):"); ?></p>
|
||||
<form id="addPhone" method="get" action="">
|
||||
<p><input type="text" name="phonenum"/></p>
|
||||
<p><input type="submit" value="<?php echo T_("Add this phone number"); ?>"/>
|
||||
<form id="addPhone" method="get" action="" class="form-inline form-group">
|
||||
<div class="pull-left"><input type="tel" maxlength="10" size="12" pattern="[0-9]{10}" class="form-control" name="phonenum"/></div>
|
||||
 <input type="submit" class="btn btn-info" value="<?php echo T_("Add this phone number"); ?>"/>
|
||||
<input type="hidden" name="start" value="<?php print $_GET['start']; ?>"/>
|
||||
<input type="hidden" name="end" value="<?php print $_GET['end']; ?>"/>
|
||||
<input type="hidden" name="d" value="<?php print $day; ?>"/>
|
||||
<input type="hidden" name="m" value="<?php print $month; ?>"/>
|
||||
<input type="hidden" name="y" value="<?php print $year; ?>"/>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/></p>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
@@ -203,11 +209,9 @@ else if(isset($_GET['respondent_id']))
|
||||
}
|
||||
|
||||
?>
|
||||
<p><?php echo T_("Appointment:"); ?></p>
|
||||
<form id="appointment" method="post" action="">
|
||||
<?php print "<p>" . T_("Accept appointment from ") .convert_time($_GET['start']).T_(" till ").convert_time($_GET['end']).T_(" on ") . "$day/$month/$year? " . T_("on") . " $phonenum </p>"; ?>
|
||||
<p>
|
||||
<?php print "<p><label for='require_operator_id'>" . T_("Appointment with myself only?"); ?></label>
|
||||
<?php print "<div class=\"alert alert-info\">".T_("Accept appointment from ")."<b>".$_GET['start']."</b>".T_(" till ")."<b>".$_GET['end']."</b>".T_(" on ") . "<b> $day/$month/$year </b>" . T_("on") . "<b> $phonenum </b> ?</div>"; ?>
|
||||
<label for='require_operator_id'><?php echo T_("Appointment with myself only?"); ?> </label>
|
||||
<input type="checkbox" id="require_operator_id" name="require_operator_id" value="<?php echo $operator_id;?>">
|
||||
<input type="hidden" name="start" value="<?php print $_GET['start']; ?>"/>
|
||||
<input type="hidden" name="end" value="<?php print $_GET['end']; ?>"/>
|
||||
@@ -216,10 +220,12 @@ else if(isset($_GET['respondent_id']))
|
||||
<input type="hidden" name="year" value="<?php print $year; ?>"/>
|
||||
<input type="hidden" name="respondent_id" value="<?php print $respondent_id; ?>"/>
|
||||
<input type="hidden" name="contact_phone_id" value="<?php print $contact_phone_id; ?>"/>
|
||||
<input type="submit" value="<?php echo TQ_("Schedule Appointment"); ?>"/></p>
|
||||
<input type="submit" class="btn btn-primary pull-right" value="<?php echo T_("Schedule Appointment"); ?>"/>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user