show datepicker in users language

This commit is contained in:
Uwe Steinmann 2013-04-11 19:15:03 +02:00
parent 3dee84e90d
commit 8b8a50fd06
5 changed files with 9 additions and 7 deletions

View File

@ -151,7 +151,7 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style {
<tr>
<td><?php printMLText("expires");?>:</td>
<td>
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;

View File

@ -60,6 +60,8 @@ class SeedDMS_Bootstrap_Style extends SeedDMS_View_Common {
$this->footNote();
echo '<script src="../styles/'.$this->theme.'/bootstrap/js/bootstrap.min.js"></script>'."\n";
echo '<script src="../styles/'.$this->theme.'/datepicker/js/bootstrap-datepicker.js"></script>'."\n";
foreach(array('de', 'es', 'ca', 'nl', 'fi', 'cs', 'it', 'fr', 'sv', 'sl', 'pt-BR', 'zh-CN', 'zh-TW') as $lang)
echo '<script src="../styles/'.$this->theme.'/datepicker/js/locales/bootstrap-datepicker.'.$lang.'.js"></script>'."\n";
echo '<script src="../styles/'.$this->theme.'/chosen/js/chosen.jquery.min.js"></script>'."\n";
echo '<script src="../styles/'.$this->theme.'/application.js"></script>'."\n";
echo "</body>\n</html>\n";

View File

@ -173,12 +173,12 @@ function chooseKeywords(target) {
<label class="checkbox inline">
<input type="checkbox" name="creationdate" value="true" /><?php printMLText("between");?><br>
</label>
<span class="input-append date" id="createstartdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="createstartdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="createstart" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;
<?php printMLText("and"); ?>
<span class="input-append date" id="createenddate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="createenddate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="createend" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>
@ -190,12 +190,12 @@ function chooseKeywords(target) {
<label class="checkbox inline">
<input type="checkbox" name="expirationdate" value="true" /><?php printMLText("between");?><br>
</label>
<span class="input-append date" id="expirationstartdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="expirationstartdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expirationstart" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;
<?php printMLText("and"); ?>
<span class="input-append date" id="expirationenddate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="expirationenddate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expirationend" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>

View File

@ -57,7 +57,7 @@ class SeedDMS_View_SetExpires extends SeedDMS_Bootstrap_Style {
<tr>
<td><?php printMLText("expires");?>:</td>
<td>
<span class="input-append date" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="expirationdate" data-date="<?php echo $expdate; ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span4" size="16" name="expdate" type="text" value="<?php echo $expdate; ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;

View File

@ -142,7 +142,7 @@ function checkForm()
<tr>
<td><?php printMLText("expires");?>:</td>
<td class="standardText">
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy">
<span class="input-append date" id="expirationdate" data-date="<?php echo date('d-m-Y'); ?>" data-date-format="dd-mm-yyyy" data-date-language="<?php echo str_replace('_', '-', $this->params['session']->getLanguage()); ?>">
<input class="span3" size="16" name="expdate" type="text" value="<?php echo date('d-m-Y'); ?>">
<span class="add-on"><i class="icon-calendar"></i></span>
</span>&nbsp;