Skip to content
Snippets Groups Projects
Commit 21595d45 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Add autodetect support for staff timezone

parent 477c0ca1
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,7 @@ osTicket is supported by several magical open source projects including: ...@@ -115,6 +115,7 @@ osTicket is supported by several magical open source projects including:
* [Font-Awesome](http://fortawesome.github.com/Font-Awesome/) * [Font-Awesome](http://fortawesome.github.com/Font-Awesome/)
* [HTMLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed) * [HTMLawed](http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed)
* [jQuery dropdown](http://labs.abeautifulsite.net/jquery-dropdown/) * [jQuery dropdown](http://labs.abeautifulsite.net/jquery-dropdown/)
* [jsTimezoneDetect](http://pellepim.bitbucket.org/jstz/)
* [mPDF](http://www.mpdf1.com/) * [mPDF](http://www.mpdf1.com/)
* [PasswordHash](http://www.openwall.com/phpass/) * [PasswordHash](http://www.openwall.com/phpass/)
* [PEAR](http://pear.php.net/package/PEAR) * [PEAR](http://pear.php.net/package/PEAR)
......
...@@ -94,7 +94,20 @@ $info['id']=$staff->getId(); ...@@ -94,7 +94,20 @@ $info['id']=$staff->getId();
?>><?php echo $zone; ?></option> ?>><?php echo $zone; ?></option>
<?php } ?> <?php } ?>
</select> </select>
&nbsp;<span class="error"><?php echo $errors['timezone']; ?></span> <button class="action-button" onclick="javascript:
$('head').append($('<script>').attr('src', '<?php
echo ROOT_PATH; ?>/js/jstz.min.js'));
var recheck = setInterval(function() {
if (window.jstz !== undefined) {
clearInterval(recheck);
var zone = jstz.determine();
$('#timezone-dropdown').multiselect('widget')
.find('[value=\'' + zone.name() + '\']')
.trigger('click');
}
}, 200);
return false;"><i class="icon-map-marker"></i> <?php echo __('Auto Detect'); ?></button>
<div class="error"><?php echo $errors['timezone']; ?></div>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -150,6 +150,19 @@ $gmtime = Misc::gmtime(); ...@@ -150,6 +150,19 @@ $gmtime = Misc::gmtime();
?>><?php echo $zone; ?></option> ?>><?php echo $zone; ?></option>
<?php } ?> <?php } ?>
</select> </select>
<button class="action-button" onclick="javascript:
$('head').append($('<script>').attr('src', '<?php
echo ROOT_PATH; ?>/js/jstz.min.js'));
var recheck = setInterval(function() {
if (window.jstz !== undefined) {
clearInterval(recheck);
var zone = jstz.determine();
$('#timezone-dropdown').multiselect('widget')
.find('[value=\'' + zone.name() + '\']')
.trigger('click');
}
}, 200);
return false;"><i class="icon-map-marker"></i> <?php echo __('Auto Detect'); ?></button>
</td> </td>
</tr> </tr>
<tr><td width="220" class="required"><?php echo __('Date and Time Format');?>:</td> <tr><td width="220" class="required"><?php echo __('Date and Time Format');?>:</td>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment