Skip to content

Commit

Permalink
Added .row to date question views
Browse files Browse the repository at this point in the history
  • Loading branch information
Tammo committed Oct 6, 2016
1 parent a871512 commit 6f708c3
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 60 deletions.
Expand Up @@ -15,7 +15,7 @@
<!-- Date, dropdown layout -->

<!-- answer -->
<div class="question date answer-item dropdown-item date-item">
<div class="question date answer-item dropdown-item date-item row">

<?php
// rows/*.php
Expand Down
119 changes: 60 additions & 59 deletions application/views/survey/questions/date/selector/answer.php
Expand Up @@ -23,67 +23,68 @@
<label for='answer<?php echo $name;?>' class='hide label'>
<?php echo sprintf(gT('Date in the format: %s'), $dateformatdetails); ?>
</label>
<div class="row">
<div class='col-xs-12 col-sm-4'>

<div class='col-xs-12 col-sm-4'>
<?php /* Old input, not used since switching to Bootstrap DateTimePicker
<input
class='form-control'
type="text"
size="<?php echo $iLength;?>"
name="<?php echo $name;?>"
id="answer<?php echo $name;?>"
value="<?php echo $dateoutput;?>"
maxlength="<?php echo $iLength;?>"
onkeypress="<?php echo $goodchars;?>"
onchange="<?php echo $checkconditionFunction;?>"
/>
*/
?>

<?php /* Old input, not used since switching to Bootstrap DateTimePicker
<input
class='form-control'
type="text"
size="<?php echo $iLength;?>"
name="<?php echo $name;?>"
id="answer<?php echo $name;?>"
value="<?php echo $dateoutput;?>"
maxlength="<?php echo $iLength;?>"
onkeypress="<?php echo $goodchars;?>"
onchange="<?php echo $checkconditionFunction;?>"
/>
*/
?>

<?php $this->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => $name,
'id' => "answer" . $name,
'value' => $dateoutput,
'pluginOptions' => array(
'format' => $dateformatdetailsjs,
'allowInputToggle' =>true,
'showClear' => true,
'tooltips' => array(
'clear'=> gT('Clear selection'),
'prevMonth'=> gT('Previous month'),
'nextMonth'=> gT('Next month'),
'selectYear'=> gT('Select year'),
'prevYear'=> gT('Previous year'),
'nextYear'=> gT('Next year'),
'selectDecade'=> gT('Select decade'),
'prevDecade'=> gT('Previous decade'),
'nextDecade'=> gT('Next decade'),
'prevCentury'=> gT('Previous century'),
'nextCentury'=> gT('Next century'),
'selectTime'=> gT('Select time')
),
'locale' => convertLStoDateTimePickerLocale($language),
'maxDate' => $maxdate,
'minDate' => $mindate,
'sideBySide' => true
/*
Min/max Date implementation missing?
'singleDatePicker' => true,
'startDate' => date("Y-m-d H:i", time()),
// Show hour and minute picker if we have HH or MM in date format
'pickTime' => (strpos($dateformatdetails, "HH") !== false || strpos($dateformatdetails, "MM") !== false),
'pickDate' => !$hideCalendar,
'timePicker12Hour' => false,
'timePicker24Hour' => true,
'timePickerIncrement' => 1,*/
),
'htmlOptions' => array(
'onkeypress' => $goodchars,
'onchange' => "$checkconditionFunction"
)
));
?>
<?php $this->widget('yiiwheels.widgets.datetimepicker.WhDateTimePicker', array(
'name' => $name,
'id' => "answer" . $name,
'value' => $dateoutput,
'pluginOptions' => array(
'format' => $dateformatdetailsjs,
'allowInputToggle' =>true,
'showClear' => true,
'tooltips' => array(
'clear'=> gT('Clear selection'),
'prevMonth'=> gT('Previous month'),
'nextMonth'=> gT('Next month'),
'selectYear'=> gT('Select year'),
'prevYear'=> gT('Previous year'),
'nextYear'=> gT('Next year'),
'selectDecade'=> gT('Select decade'),
'prevDecade'=> gT('Previous decade'),
'nextDecade'=> gT('Next decade'),
'prevCentury'=> gT('Previous century'),
'nextCentury'=> gT('Next century'),
'selectTime'=> gT('Select time')
),
'locale' => convertLStoDateTimePickerLocale($language),
'maxDate' => $maxdate,
'minDate' => $mindate,
'sideBySide' => true
/*
Min/max Date implementation missing?
'singleDatePicker' => true,
'startDate' => date("Y-m-d H:i", time()),
// Show hour and minute picker if we have HH or MM in date format
'pickTime' => (strpos($dateformatdetails, "HH") !== false || strpos($dateformatdetails, "MM") !== false),
'pickDate' => !$hideCalendar,
'timePicker12Hour' => false,
'timePicker24Hour' => true,
'timePickerIncrement' => 1,*/
),
'htmlOptions' => array(
'onkeypress' => $goodchars,
'onchange' => "$checkconditionFunction"
)
));
?>
</div>
</div>
<script>
$(document).ready(function() {
Expand Down

0 comments on commit 6f708c3

Please sign in to comment.