Skip to content

Commit

Permalink
Dev: added options for Question borders and shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 11, 2017
1 parent 9ca6d8d commit 179bfb2
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 4 deletions.
55 changes: 54 additions & 1 deletion themes/survey/fruity/options/options.twig
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@
{# Container #}
<div class='col-sm-12 col-md-3'>
<div class='form-group row'>
<label for='simple_edit_options_container' class='control-label'> {{ "Container" | t }} </label>
<label for='simple_edit_options_container' class='control-label'> {{ "Survey container" | t }} </label>
<div class='col-sm-12'>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
Expand All @@ -343,6 +343,59 @@
</div>
</div>
</div>

{# Question Border #}
<div class='col-sm-12 col-md-3'>
<div class='form-group row'>
<label for='simple_edit_options_questionborder' class='control-label'>{{ "Question borders" | t }}</label>
<div class='col-sm-12'>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
<input type='radio' name='questionborder' value='on' class='selector_option_radio_field simple_edit_options_questionborder ' data-id='questionborder'/>
{{ "Yes" | t}}
</label>
<label class="btn btn-default">
<input type='radio' name='questionborder' value='off' class='selector_option_radio_field simple_edit_options_questionborder ' data-id='questionborder'/>
{{ "No" | t}}
</label>

{# If this is a root template setting, don't show the inherit button #}
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
<label class="btn btn-default">
<input type='radio' name='questionborder' value='inherit' class='selector_option_radio_field simple_edit_options_questionborder ' data-id='questionborder'/>
{{ "Inherit" | t}}
</label>
{% endif %}
</div>
</div>
</div>
</div>

{# Question Shadow #}
<div class='col-sm-12 col-md-3'>
<div class='form-group row'>
<label for='simple_edit_options_questioncontainershadow' class='control-label'>{{ "Question shadow" | t }}</label>
<div class='col-sm-12'>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default">
<input type='radio' name='questioncontainershadow' value='on' class='selector_option_radio_field simple_edit_options_questioncontainershadow ' data-id='questioncontainershadow'/>
{{ "Yes" | t }}
</label>
<label class="btn btn-default">
<input type='radio' name='questioncontainershadow' value='off' class='selector_option_radio_field simple_edit_options_questioncontainershadow ' data-id='questioncontainershadow'/>
{{ "No" | t }}
</label>
{# If this is a root template setting, don't show the inherit button #}
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
<label class="btn btn-default">
<input type='radio' name='questioncontainershadow' value='inherit' class='selector_option_radio_field simple_edit_options_questioncontainershadow ' data-id='questioncontainershadow'/>
{{ "Inherit" | t}}
</label>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<div class='row action_hide_on_inherit'>
<hr/>
Expand Down
6 changes: 3 additions & 3 deletions themes/survey/fruity/views/subviews/header/custom_header.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
body {
padding-bottom: 10px;
padding-top: 60px;/* now is redefine in JS to fit any title length */
background-color:{{ aSurveyInfo.options.bodybackgroundcolor }} /* #EEE */;
color: {{ aSurveyInfo.options.fontcolor }} /* #444 */;
background-color:{{ aSurveyInfo.options.bodybackgroundcolor }} ;
color: {{ aSurveyInfo.options.fontcolor }};
}
.navbar-default .navbar-nav > li > a:hover {
Expand All @@ -50,7 +50,7 @@
.question-container {
background-color: {{ aSurveyInfo.options.questionbackgroundcolor }}; /* white; */
background-color: {{ aSurveyInfo.options.questionbackgroundcolor }};
{% if (aSurveyInfo.options.questionborder == "on" ) %}
border: 1px solid #e6e6e6;
Expand Down

0 comments on commit 179bfb2

Please sign in to comment.