Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev: twigging of question types -> datepicker
- Loading branch information
Showing
17 changed files
with
244 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
application/views/survey/questions/answer/date/dropdown/answer.php
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
application/views/survey/questions/answer/date/dropdown/answer.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{# | ||
/** | ||
* Date Html, dropdown style | ||
* | ||
* @var $sRows : the rows, generated with the view rows/*.php | ||
* | ||
* @var $name | ||
* @var $dateoutput | ||
* @var $checkconditionFunction | ||
* @var $dateformatdetails | ||
* @var $dateformat | ||
*/ #} | ||
|
||
|
||
<!-- Date, dropdown layout --> | ||
|
||
<!-- answer --> | ||
<div class="{{coreClass}} form-group form-inline" role="group" aria-labelledby="ls-question-text-{{name}}"> | ||
{# // rows/*.php #} | ||
{{sRows}} | ||
</div> | ||
|
||
<!-- For Expression Manager ? --> | ||
<input | ||
class="text" | ||
type="text" | ||
size="10" | ||
name="{{name}}" | ||
style="display: none" | ||
id="answer{{name}}" | ||
value="{{dateoutput}}" | ||
maxlength="10" | ||
onchange="{{checkconditionFunction}}" | ||
title="{{ sprintf(gT('Date in the format : %s'), dateformat) }}" | ||
/> | ||
<input type="hidden" id="dateformat{{name}}" value="{{dateformatdetails}}"/> | ||
<!-- end of answer --> |
1 change: 0 additions & 1 deletion
1
application/views/survey/questions/answer/date/dropdown/rows/datepart.php
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
application/views/survey/questions/answer/date/dropdown/rows/datepart.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<span class="hidden-xs">{{datepart}}</span> |
25 changes: 0 additions & 25 deletions
25
application/views/survey/questions/answer/date/dropdown/rows/day.php
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
application/views/survey/questions/answer/date/dropdown/rows/day.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{# <?php | ||
/** | ||
* Day dropdown Html | ||
* @var $dayId | ||
* @var $currentdate | ||
*/ | ||
?> #} | ||
|
||
<!-- day --> | ||
<label for="day{{dayId}}" class="sr-only"> | ||
{{gT('Day')}} | ||
</label> | ||
<select id="day{{dayId}}" name="day{{dayId}}" class="form-control day"> | ||
<option value=""> | ||
{{gT('Day')}} | ||
</option> | ||
|
||
{% for i in 1..31 %} | ||
<option value="{{sprintf('%02d', i)}}" {{ (i == currentdate) ? 'selected' : '' }}> | ||
{{ sprintf('%02d', i) }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
|
||
<!-- end of day --> |
27 changes: 0 additions & 27 deletions
27
application/views/survey/questions/answer/date/dropdown/rows/hour.php
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
application/views/survey/questions/answer/date/dropdown/rows/hour.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{# <?php | ||
/** | ||
* Hour dropdown Html | ||
* @var $hourId | ||
* @var $currenthour | ||
* @var $datepart | ||
*/ | ||
?> #} | ||
<!-- hour --> | ||
<label for="hour{{hourId}}" class="sr-only"> | ||
{{gT('Hour')}} | ||
</label> | ||
|
||
<select id="hour{{hourId}}" name="hour{{hourId}}" class="hour form-control"> | ||
<option value="">{{gT('Hour')}}</option> | ||
{% for i in 0..23 %} | ||
<option value="{{i}}" {% if i is same as(currenthour) %} 'selected' {% endif %} > | ||
{% if (datepart=='H') %} | ||
{{sprintf('%02d', i)}} | ||
{% else %} | ||
{{i}} | ||
{% endif %} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
|
||
<!-- end of hour --> |
31 changes: 0 additions & 31 deletions
31
application/views/survey/questions/answer/date/dropdown/rows/minute.php
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
application/views/survey/questions/answer/date/dropdown/rows/minute.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{# <?php | ||
/** | ||
* Minute dropdown Html | ||
* @var $minuteId | ||
* @var $currentminute | ||
* @var $dropdown_dates_minute_step | ||
* @var $datepart | ||
*/ | ||
?> #} | ||
|
||
<!-- minute --> | ||
<label for="minute{{minuteId}}" class="sr-only"> | ||
{{ gT('Minute') }} | ||
</label> | ||
<select id="minute{{minuteId}}" name="minute{{minuteId}}" class="minute form-control"> | ||
<option value=""> | ||
{{ gT('Minute') }} | ||
</option> | ||
{% for i in 0..59 %} | ||
{% if i is divisible by(dropdown_dates_minute_step) %} | ||
<option value="{{i}}" {% if i is same as(currentminute) %} 'selected' {% endif %} > | ||
{% if datepart is same as('i') %} | ||
{{sprintf('%02d', i)}} | ||
{% else %} | ||
{{i}} | ||
{% endif %} | ||
</option> | ||
{% endif %} | ||
{% endfor %} | ||
</select> | ||
|
||
<!-- end of minute --> |
26 changes: 0 additions & 26 deletions
26
application/views/survey/questions/answer/date/dropdown/rows/month.php
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
application/views/survey/questions/answer/date/dropdown/rows/month.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{# <?php | ||
/** | ||
* Month dropdown Html | ||
* @var $monthId | ||
* @var $currentmonth | ||
* @var $montharray | ||
*/ | ||
?> #} | ||
|
||
<!-- month --> | ||
<label for="month{{monthId}}" class="sr-only"> | ||
{{gT('Month')}} | ||
</label> | ||
<select id="month{{monthId}}" name="month{{monthId}}" class="month form-control"> | ||
<option value=""> | ||
{{gT('Month')}} | ||
</option> | ||
{% for i in 1..12 %} | ||
<option value="{{sprintf('%02d', i)}}" {% if i is same as(currentmonth) %} 'selected' {% endif %} > | ||
{{montharray[(i-1)]}} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
|
||
<!-- end of month --> |
29 changes: 0 additions & 29 deletions
29
application/views/survey/questions/answer/date/dropdown/rows/year.php
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
application/views/survey/questions/answer/date/dropdown/rows/year.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{# <?php | ||
/** | ||
* Year dropdown Html | ||
* @var $yearId | ||
* @var $currentyear | ||
* @var $yearmax | ||
* @var $reverse | ||
* @var $yearmin | ||
* @var $step | ||
*/ | ||
?> #} | ||
|
||
<!-- year --> | ||
<label for="year{{yearId}}" class="sr-only"> | ||
{{gT('Year')}} | ||
</label> | ||
|
||
<select id="year{{yearId}}" name="year{{yearId}}" class="year form-control"> | ||
<option value=""> | ||
{{gT('Year')}} | ||
</option> | ||
{% for i in yearmin..(yearmax) %} | ||
{% if loop.index is divisible by(step) %} | ||
<option value="{{i}}"{% if i is same as(currentyear) %} 'selected' {% endif %} > | ||
{{i}} | ||
</option> | ||
{% endif %} | ||
{% endfor %} | ||
</select> | ||
|
||
<!-- end of year --> |
Oops, something went wrong.