First commit
This commit is contained in:
commit
b7fcf64bbf
22 changed files with 2180 additions and 0 deletions
427
config.xml
Normal file
427
config.xml
Normal file
|
|
@ -0,0 +1,427 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--
|
||||||
|
(¯`·._.·(¯`·._.· Vanilla Theme Manifest ·._.·´¯)·._.·´¯)
|
||||||
|
Base configuration for Vanilla Theme.
|
||||||
|
The content of this file is imported into DB when you install the template.
|
||||||
|
-->
|
||||||
|
<config>
|
||||||
|
<!-- Those metadata are displayed in the theme configuration page. -->
|
||||||
|
<metadata>
|
||||||
|
<name>respondage_vanilla</name>
|
||||||
|
<title>Respondage Vanilla</title>
|
||||||
|
<type>theme</type>
|
||||||
|
<creationDate>2024-04-19 12:03</creationDate>
|
||||||
|
<author>admin</author>
|
||||||
|
<authorEmail>tammo.terhark@respondage.nl</authorEmail>
|
||||||
|
<authorUrl>http://www.respondage.nl</authorUrl>
|
||||||
|
<copyright>Copyright (C) 2026 Respondage. All rights reserved.</copyright>
|
||||||
|
<license>GNU General Public License version 2 or later</license>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
<apiVersion>3</apiVersion>
|
||||||
|
<description><![CDATA[<strong>Respondage Theme based on core theme Vanilla</strong><br>A clean and simple base that was used by a certain theme developer to create a really clean theme.]]></description>
|
||||||
|
<lastUpdate>2026-06-10 12:00:00</lastUpdate>
|
||||||
|
<extends>vanilla</extends>
|
||||||
|
</metadata>
|
||||||
|
|
||||||
|
<compatibility>
|
||||||
|
<version>6.0</version>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Here the list of the css/js files to add to the template package.
|
||||||
|
About packages in Yii: http://www.yiiframework.com/doc/api/1.1/CClientScript#packages-detail
|
||||||
|
NOTE: The "add" tag also count as a "replace" tag.
|
||||||
|
Eg: You can't just "add" a file in the extended theme with the same name as a file here. It will always "replace" it. You must use a diffrent file name.
|
||||||
|
Eg: Vanilla manifest already has "<add>css/theme.css</add>". So if you use "<add>css/theme.css</add>" in an extended theme, it will replace the vanilla css/theme.css
|
||||||
|
NOTE: If an extended theme, if you don't change a file that is defined here, you don't need to add it again.
|
||||||
|
Eg: css/ajaxify.css is already added in vanilla. Nor fruity nor bootswatch modify it, so ne need to add / replace it in fruity or bootswatch.
|
||||||
|
Even if no mention at all about "css/ajaxify.css" is theme extending vanilla, it will still be added because it's added here
|
||||||
|
NOTE: To easy test changes in config file, you can force the use of the XML file rather than DB. To do so, turn debug mode on, and in config.php config array, on bottom of debug mode, add:
|
||||||
|
'force_xmlsettings_for_survey_rendering' => true,
|
||||||
|
Then, you will not need anymore to reset your theme each time you change the config file.
|
||||||
|
But, once turning the setting off, You will still must reset the theme to the changes are pushed to DB
|
||||||
|
-->
|
||||||
|
<files>
|
||||||
|
<css>
|
||||||
|
<add>css/base.css</add>
|
||||||
|
<add>css/theme.css</add>
|
||||||
|
<add>css/noTablesOnMobile.css</add>
|
||||||
|
<add>css/plain.css</add>
|
||||||
|
<add>css/custom.css</add>
|
||||||
|
</css>
|
||||||
|
<js>
|
||||||
|
<add>scripts/theme.js</add>
|
||||||
|
<add>scripts/custom.js</add>
|
||||||
|
</js>
|
||||||
|
<print_css>
|
||||||
|
<add>css/print_theme.css</add>
|
||||||
|
</print_css>
|
||||||
|
</files>
|
||||||
|
|
||||||
|
<!-- You can add here any option you want. It will be available in twig file via aSurveyInfo.options.youroptionname -->
|
||||||
|
<options>
|
||||||
|
<hideprivacyinfo type="buttons" category="Simple options" width="4" title="Hide privacy info" options="on|off" optionlabels="Yes|No">off</hideprivacyinfo>
|
||||||
|
<container type="buttons" category="Simple options" width="4" title="Survey container" options="on|off" optionlabels="Yes|No">on</container>
|
||||||
|
<showpopups type="buttons" category="Simple options" width="4" title="Show popups" options="1|0|-1" optionlabels="Popup|On page|No">1</showpopups>
|
||||||
|
<showclearall type="buttons" category="Simple options" width="4" title="Show Clear All button" options="on|off" optionlabels="Yes|No">off</showclearall>
|
||||||
|
<fixnumauto type="buttons" category="Simple options" width="4" title="Fix automatically numeric value" options="enable|partial|disable" optionlabels="Yes|For expression|No">enable</fixnumauto>
|
||||||
|
|
||||||
|
<!-- Images -->
|
||||||
|
<brandlogo type="buttons" category="Images" width="2" title="Display main logo" options="on|off" optionlabels="Yes|No">on</brandlogo>
|
||||||
|
<brandlogofile type="imagefile" category="Images" width="7" title="Main logo file" parent="brandlogo">./files/logo.png</brandlogofile>
|
||||||
|
<secondlogo type="buttons" category="Images" width="2" title="Display second logo" options="on|off" optionlabels="Yes|No">on</secondlogo>
|
||||||
|
<secondlogofile type="imagefile" category="Images" width="7" title="Second logo file" parent="secondlogo">./files/logo.png</secondlogofile>
|
||||||
|
<backgroundimage type="buttons" category="Images" width="4" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
|
||||||
|
<backgroundimagefixed type="buttons" category="Images" width="4" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll">scroll</backgroundimagefixed>
|
||||||
|
<backgroundimagedisplay type="buttons" category="Images" width="4" title="Background image display" options="tile|cover" optionlabels="Tile|Cover">tile</backgroundimagedisplay>
|
||||||
|
<backgroundimagefile type="imagefile" category="Images" width="12" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
|
||||||
|
<bodybackgroundcolor type="colorpicker" category="Images" width="8" title="Overall background color (when there is no picture in the background)" options="on|off" optionlabels="Yes|No">#dddddd</bodybackgroundcolor>
|
||||||
|
|
||||||
|
<!-- Questions -->
|
||||||
|
<questiontitlebackgroundcolor type="colorpicker" category="Questions" width="6" title="Question title background color" options="on|off" optionlabels="Yes|No">#5e1c64</questiontitlebackgroundcolor>
|
||||||
|
<questiontitlefontcolor type="colorpicker" category="Questions" width="6" title="Question title font color" options="on|off" optionlabels="Yes|No">#ffffff</questiontitlefontcolor>
|
||||||
|
<questionbackgroundcolor type="colorpicker" category="Questions" width="6" title="Question background color (not title)" options="on|off" optionlabels="Yes|No">#ffffff</questionbackgroundcolor>
|
||||||
|
<questionhelpbackgroundcolor type="colorpicker" category="Questions" width="6" title="Question helpbackground color" options="on|off" optionlabels="Yes|No">#fff3cd</questionhelpbackgroundcolor>
|
||||||
|
<questionborder type="buttons" category="Questions" width="6" title="Question border" options="box|top|none" optionlabels="Box around|Top and bottom|None">box</questionborder>
|
||||||
|
<questionborderstyle type="buttons" category="Questions" width="6" title="Question border line style" options="solid|dotted|dashed" optionlabels="Solid|Dotted|Dashed">solid</questionborderstyle>
|
||||||
|
<questionbordercolor type="colorpicker" category="Questions" width="12" title="Question border color" options="on|off" optionlabels="Yes|No">#cccccc</questionbordercolor>
|
||||||
|
<questionborderradiusTL type="duration" category="Questions" width="3" title="Border radius top left">5px</questionborderradiusTL>
|
||||||
|
<questionborderradiusTR type="duration" category="Questions" width="3" title="Border radius top right">5px</questionborderradiusTR>
|
||||||
|
<questionborderradiusBL type="duration" category="Questions" width="3" title="Border radius bottom left">5px</questionborderradiusBL>
|
||||||
|
<questionborderradiusBR type="duration" category="Questions" width="3" title="Border radius bottom right">5px</questionborderradiusBR>
|
||||||
|
<questiondropdown type="buttons" category="Questions" width="6" title="Question dropdown shadow" options="on|hover|off" optionlabels="Always|On hover only|None">hover</questiondropdown>
|
||||||
|
<questionhelptextposition type="buttons" category="Questions" width="6" title="Question help text position" options="top|bottom" optionlabels="Top|Bottom">top</questionhelptextposition>
|
||||||
|
<checkboxcolor type="colorpicker" category="Questions" width="6" title="Checkbox/radiobutton color (when checked)" options="on|off" optionlabels="Yes|No">#ff005f</checkboxcolor>
|
||||||
|
|
||||||
|
<!-- Progress -->
|
||||||
|
<progressbarposition type="buttons" category="Progress" width="6" title="Position of the progress bar" options="under|in" optionlabels="Under header|In header">under</progressbarposition>
|
||||||
|
|
||||||
|
<!-- Various colors -->
|
||||||
|
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
|
||||||
|
<primarycolor type="colorpicker" category="Colors" width="12" title="Primary color (for buttons)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
|
||||||
|
<fontcolor type="colorpicker" category="Colors" width="12" title="Base font color" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
|
||||||
|
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>
|
||||||
|
<progressbarbackgroundcolor type="colorpicker" category="Colors" width="12" title="Progress bar background color" options="on|off" optionlabels="Yes|No">#eeeeee</progressbarbackgroundcolor>
|
||||||
|
<progressbarcolor type="colorpicker" category="Colors" width="12" title="Progress bar color" options="on|off" optionlabels="Yes|No">#5e1c64</progressbarcolor>
|
||||||
|
<progressbarfontcolor type="colorpicker" category="Colors" width="12" title="Progress bar font color" options="on|off" optionlabels="Yes|No">#ffffff</progressbarfontcolor>
|
||||||
|
<privacybackgroundcolor type="colorpicker" category="Colors" width="12" title="Privacy background color" options="on|off" optionlabels="Yes|No">lightyellow</privacybackgroundcolor>
|
||||||
|
<!-- fonts -->
|
||||||
|
<!-- When adding new items, please keep fonts ordered alphabetically -->
|
||||||
|
<font type="dropdown" category="Fonts" width="4" title="Fonts" parent="font">opensans
|
||||||
|
<dropdownoptions>
|
||||||
|
<optgroup label="User browser">
|
||||||
|
<option class="font-arial " value="arial" data-font-package="websafe">Arial</option>
|
||||||
|
<option class="font-arial_black " value="arial_black" data-font-package="websafe">Arial Black</option>
|
||||||
|
<option class="font-comic_sans " value="comic_sans" data-font-package="websafe">Comic Sans</option>
|
||||||
|
<option class="font-courier " value="courier" data-font-package="websafe">Courier New</option>
|
||||||
|
<option class="font-georgia " value="georgia" data-font-package="websafe">Georgia</option>
|
||||||
|
<option class="font-impact " value="impact" data-font-package="websafe">Impact</option>
|
||||||
|
<option class="font-lucida_console " value="lucida_console" data-font-package="websafe">Lucida Console</option>
|
||||||
|
<option class="font-lucida_sans " value="lucida_sans" data-font-package="websafe">Lucida Sans</option>
|
||||||
|
<option class="font-palatino " value="palatino" data-font-package="websafe">Palatino Linotype</option>
|
||||||
|
<option class="font-times_new_roman " value="times_new_roman" data-font-package="websafe">Times New Roman</option>
|
||||||
|
<option class="font-trebuchet " value="trebuchet" data-font-package="websafe">Trebuchet</option>
|
||||||
|
</optgroup>
|
||||||
|
</dropdownoptions>
|
||||||
|
</font>
|
||||||
|
<fontsize type="buttons" category="Fonts" width="12" title="Base font size" options="14px|16px|18px|20px" optionlabels="Small (14px)|Normal (16px)|Large (18px)|Extra large (20 px)">16px</fontsize>
|
||||||
|
<questiontitlefontsize type="buttons" category="Fonts" width="6" title="Question title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</questiontitlefontsize>
|
||||||
|
<questiontitlefontweight type="buttons" category="Fonts" width="6" title="Question title font weight" options="400|700" optionlabels="Normal|Bold">700</questiontitlefontweight>
|
||||||
|
<grouptitlefontsize type="buttons" category="Fonts" width="6" title="Group title font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">2.0rem</grouptitlefontsize>
|
||||||
|
<grouptitlefontweight type="buttons" category="Fonts" width="6" title="Group title font weight" options="400|700" optionlabels="Normal|Bold">700</grouptitlefontweight>
|
||||||
|
<groupdescriptionfontsize type="buttons" category="Fonts" width="6" title="Group description font size" options="1.0rem|1.2rem|1.5rem|2.0rem|20px|24px" optionlabels="Same as Base Font Size(BFS)|1.2 BFS|1.5 BFS|2.0 BFS|20px|24px">1.2rem</groupdescriptionfontsize>
|
||||||
|
<groupdescriptionfontweight type="buttons" category="Fonts" width="6" title="Group description font weight" options="400|700" optionlabels="Normal|Bold">400</groupdescriptionfontweight>
|
||||||
|
</options>
|
||||||
|
|
||||||
|
<!-- Here datas about how LimeSurvey should load the theme -->
|
||||||
|
<engine>
|
||||||
|
<!-- core: use core options view file, custom: use customized options.twig view file -->
|
||||||
|
<optionspage>core</optionspage>
|
||||||
|
|
||||||
|
<!-- If empty, bootstrap css/js files will not be loaded. In the future, we may have more engines, like foundation -->
|
||||||
|
<cssframework>
|
||||||
|
<name>bootstrap</name>
|
||||||
|
</cssframework>
|
||||||
|
|
||||||
|
<!-- Path of the views files (can be different than views -->
|
||||||
|
<viewdirectory>views</viewdirectory>
|
||||||
|
|
||||||
|
<!-- Asset manager will copy the whole theme directory to tmp. So it's possible to refer any file in the files directory in CSS via relative path (e.g: '../files/foo.jpg') -->
|
||||||
|
<filesdirectory>files</filesdirectory>
|
||||||
|
|
||||||
|
<!-- Here, you can publish packages set as third party extensions in application/config/vendor or application/config/package -->
|
||||||
|
<!-- If bootstrap is registered as a css framework, it will be loaded first -->
|
||||||
|
<packages>
|
||||||
|
<add>pjax</add>
|
||||||
|
<add>moment</add>
|
||||||
|
<add>font-noto</add>
|
||||||
|
</packages>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
List of pages/files for tempalte editor
|
||||||
|
When a user select a page, the related files will be offer in the editable files
|
||||||
|
-->
|
||||||
|
<template_editor>
|
||||||
|
<screens>
|
||||||
|
<question>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Question')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/main.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/messages/justsaved.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/group.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/group_subviews/group_container.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/group_subviews/group_desc.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/group_subviews/group_name.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_container.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_subviews/question_text_container.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_subviews/question_text_content.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_subviews/answers.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_subviews/survey_question_help.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/survey/question_subviews/valid_message_and_help.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</question>
|
||||||
|
|
||||||
|
<surveylist>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Survey list')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_survey_list.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/language_changer_form.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</surveylist>
|
||||||
|
|
||||||
|
<welcome>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Welcome')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/firstpage.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/header/head.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/header/custom_header.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/header/nav_bar.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/header/progress_bar.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/messages/welcome.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/messages/warnings.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/messages/no_js_alert.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/privacy/privacy.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/language_changer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/logincomponents/captcha.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/logincomponents/token.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</welcome>
|
||||||
|
|
||||||
|
<completed>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Completed')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/submit.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</completed>
|
||||||
|
|
||||||
|
<assessments>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Assessments')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/submit.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/messages/assessments.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</assessments>
|
||||||
|
|
||||||
|
<error>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Error')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_errors.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
</error>
|
||||||
|
|
||||||
|
<clearall>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Clear all')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/clearall.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</clearall>
|
||||||
|
|
||||||
|
<load>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Load')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/load.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</load>
|
||||||
|
|
||||||
|
<save>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Save')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/mainrow.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/save.twig</file>
|
||||||
|
<file type="css">./css/theme.css</file>
|
||||||
|
<file type="js">./scripts/theme.js</file>
|
||||||
|
<file type="css">./css/custom.css</file>
|
||||||
|
<file type="js">./scripts/custom.js</file>
|
||||||
|
</save>
|
||||||
|
|
||||||
|
<register>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Registration')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/register.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/register_error.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/register_head.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/register_message.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/register_success.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/register_form.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/registration/required.twig</file>
|
||||||
|
</register>
|
||||||
|
|
||||||
|
<printanswers>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Print answers')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_printanswers.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/printanswers.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/printanswers/printanswers_head.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/printanswers/printanswers_table.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/printanswers/printanswers_question.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/printanswers/printanswers_foot.twig</file>
|
||||||
|
</printanswers>
|
||||||
|
|
||||||
|
<statistics_user>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Public statistics')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_statistics_user.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/content/outerframe.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/statistics_user.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/statistics_user/statistics_user_head.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/statistics_user/statistics_user_content.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/statistics_user/statistics_user_foot.twig</file>
|
||||||
|
</statistics_user>
|
||||||
|
|
||||||
|
<pdf>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('PDF')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_print.twig</file>
|
||||||
|
</pdf>
|
||||||
|
|
||||||
|
<quotas>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Quotas exceeded')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/quotas.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/header/start_form.twig</file>
|
||||||
|
</quotas>
|
||||||
|
|
||||||
|
<navigation>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Navigation')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_global.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/footer/footer.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/main.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/ajax_indicator.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/clearall_links.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/save_links.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/language_changer_top_menu.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/language_changer.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/question_index_menu.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/navigator.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/navigator_complement.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/clearall_buttons.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/save_buttons.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/question_index_buttons.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/question_index_questions_buttons.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/navigation/question_index_groups_buttons.twig</file>
|
||||||
|
</navigation>
|
||||||
|
|
||||||
|
<token>
|
||||||
|
<screen_title type="data" role="title" twig="on"><![CDATA[ {{gT('Participant')}} ]]></screen_title>
|
||||||
|
<file type="view" role="layout">layout_user_forms.twig</file>
|
||||||
|
<file type="view" role="content">./subviews/content/userforms.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/logincomponents/token.twig</file>
|
||||||
|
<file type="view" role="subview">./subviews/logincomponents/captcha.twig</file>
|
||||||
|
</token>
|
||||||
|
|
||||||
|
|
||||||
|
</screens>
|
||||||
|
|
||||||
|
<!-- Data for preview in Theme Editor and Twig Cache command line generator -->
|
||||||
|
<default_data>
|
||||||
|
<survey type="core">
|
||||||
|
<name type="data" twig="on"><![CDATA[ {{ gT("Template Sample") }} ]]></name>
|
||||||
|
<description type="data" twig="on"><![CDATA[<p>{{ gT('This is a sample survey description. It could be quite long.') }}</p><p>{{ gT("But this one isn't.") }}<p>]]></description>
|
||||||
|
<welcome type="data" twig="on"><![CDATA[<p>{{ gT('Welcome to this sample survey')}} <p> <p> {{ gT('You should have a great time doing this') }} <p> ]]></welcome>
|
||||||
|
<therearexquestions type="data" twig="on"><![CDATA[gT('There is 2 question in this survey'])]]></therearexquestions>
|
||||||
|
<surveyls_url type="data" twig="on">"https://www.limesurvey.org/"</surveyls_url>
|
||||||
|
<surveyls_urldescription type="data" twig="on"><![CDATA[ gT("Some URL description") ]]></surveyls_urldescription>
|
||||||
|
<showsurveypolicynotice>2</showsurveypolicynotice>
|
||||||
|
<datasecurity_notice_label type="data" twig="on"><![CDATA[ <a href='#data-security-modal-' data-bs-toggle='collapse'> {{ gT('Show privacy policy') }} </a> ]]></datasecurity_notice_label>
|
||||||
|
<datasecurity_notice type="data" twig="on"><![CDATA[ {{ gT("Your privacy policy text is shown here.") }} ]]></datasecurity_notice>
|
||||||
|
</survey>
|
||||||
|
<group type="core">
|
||||||
|
<name type="data" twig="on"><![CDATA[ {{ gT("Group 1: The first lot of questions") }} ]]></name>
|
||||||
|
<description type="data" twig="on"><![CDATA[ {{ gT("This group description is fairly vacuous, but quite important.") }} ]]></description>
|
||||||
|
</group>
|
||||||
|
<question_1 type="core">
|
||||||
|
<code type="data">'Q1 '</code>
|
||||||
|
<text type="data" twig="on"><![CDATA[ {{ gT("How many roads must a man walk down?") }} ]]></text>
|
||||||
|
<valid_message type="data" twig="on"><![CDATA[ <div id="vmsg_4496_num_answers" class="em_num_answers emtip error"><span class="fa fa-exclamation-circle" aria-hidden="true"></span> {{ gT("Choose one of the following answers") }} </div> ]]></valid_message>
|
||||||
|
</question_1>
|
||||||
|
<question_2 type="core">
|
||||||
|
<code type="data">'Q2 '</code>
|
||||||
|
<text type="data" twig="on"><![CDATA[ {{ gT("Please explain something in detail:") }} ]]></text>
|
||||||
|
<valid_message type="data" twig="on"><![CDATA[<div id="vmsg_4496_num_answers" class="em_num_answers emtip error"><span class="fa fa-exclamation-circle" aria-hidden="true"></span> {{ gT("Hint when response is not valid") }} </div> ]]></valid_message>
|
||||||
|
</question_2>
|
||||||
|
<assessments type="core">
|
||||||
|
<name type="data" twig="on"><![CDATA[ {{ gT("Welcome to the Assessment") }} ]]></name>
|
||||||
|
<message type="data" twig="on"><![CDATA[ {{ gT("You got {TOTAL} points out of 3 possible points.") }} ]]></message>
|
||||||
|
</assessments>
|
||||||
|
|
||||||
|
<!-- This is an example to show you how to add your custom screen in the theme editor with custom values -->
|
||||||
|
<!-- The name of the array inside aSurveyInfo that feed your twig view is specified as "array-name". If you check quotas.twig, you'll notice the main variable is aSurveyInfo.aQuotas -->
|
||||||
|
<!-- Notice that the data you pass here are simple. You can't pass complex arrays inside the array, only key => value pairs.-->
|
||||||
|
<quotas type="custom" arrayName="aQuotas">
|
||||||
|
<sMessage type="data" twig="on"><![CDATA[ {{ gT("Sorry your responses have exceeded a quota on this survey.") }} ]]></sMessage>
|
||||||
|
<sUrl type="data">http://limesurvey.org</sUrl>
|
||||||
|
<sUrlDescription type="data" twig="on"><![CDATA[ {{ gT("End url") }} ]]></sUrlDescription>
|
||||||
|
<bShowNavigator type="data">false</bShowNavigator>
|
||||||
|
</quotas>
|
||||||
|
|
||||||
|
<userforms type="custom" arrayName="aForm">
|
||||||
|
<sType type="data">token</sType>
|
||||||
|
</userforms>
|
||||||
|
</default_data>
|
||||||
|
</template_editor>
|
||||||
|
</engine>
|
||||||
|
|
||||||
|
<!-- Disable the updater system for core themes. -->
|
||||||
|
<updaters disabled="disabled">
|
||||||
|
</updaters>
|
||||||
|
</config>
|
||||||
12
css/custom.css
Normal file
12
css/custom.css
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
/******************
|
||||||
|
User custom CSS
|
||||||
|
---------------
|
||||||
|
|
||||||
|
In this file you can add your own custom CSS
|
||||||
|
It will be loaded last, so you can override any other property.
|
||||||
|
Also, it will never be updated. So if you inheritate a core template and just add here some CSS, you'll still benefit of all the updates
|
||||||
|
*/
|
||||||
|
|
||||||
|
#outerframeContainer{
|
||||||
|
hyphens: none;
|
||||||
|
}
|
||||||
205
css/plain.css
Normal file
205
css/plain.css
Normal file
|
|
@ -0,0 +1,205 @@
|
||||||
|
body.font-arial {
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.font-arial_black {
|
||||||
|
font-family: ArialBlack, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.font-opensans {
|
||||||
|
font-family: "Open Sans", Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.font-georgia {
|
||||||
|
font-family: Georgia, "Times New Roman", Times, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
body.font-courier {
|
||||||
|
font-family: "Courier New", Courier, monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
#welcome-container {
|
||||||
|
padding: 15px;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-container .top-content {
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row.question-container {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#navigator-container {
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy .ls-privacy-head, .privacy p.ls-privacy-body {
|
||||||
|
background: white;
|
||||||
|
padding: 15px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1.survey-name {
|
||||||
|
margin-top: 0;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-description {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#surveys-list-container {
|
||||||
|
background: white;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question-container {
|
||||||
|
border: inherit;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ls-questionhelp {
|
||||||
|
margin-bottom: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
.ls-questionhelp p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.ls-answers {
|
||||||
|
margin-top: 15px;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sortable-rank {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ls-answers .ls-heading th {
|
||||||
|
font-weight: inherit;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy-block {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy .form-check {
|
||||||
|
padding: 15px;
|
||||||
|
background: lightyellow;
|
||||||
|
}
|
||||||
|
.privacy .form-check .form-check-input {
|
||||||
|
float: none;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#datasecurity_notice {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-form {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.save-form .return-to-survey {
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-message .h2 {
|
||||||
|
margin-top: 0;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
.save-message .text-warning {
|
||||||
|
color: inherit !important;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.save-survey-form {
|
||||||
|
background: white;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-item input[type=checkbox]:checked + label::after,
|
||||||
|
.checkbox-item input[type=radio]:checked + label::after {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.btn-primary:hover {
|
||||||
|
filter: grayscale(0.5);
|
||||||
|
}
|
||||||
|
.btn-primary:focus {
|
||||||
|
filter: grayscale(0.5);
|
||||||
|
}
|
||||||
|
.btn-primary.active {
|
||||||
|
filter: grayscale(0.5);
|
||||||
|
}
|
||||||
|
.btn-primary:active {
|
||||||
|
filter: grayscale(0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
#surveys-list-container {
|
||||||
|
background: white;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
border-radius: 0;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
font-size: 80%;
|
||||||
|
padding-left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qback_red .question-title-container {
|
||||||
|
background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qback_orange .question-title-container {
|
||||||
|
background: darkorange;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qback_green .question-title-container {
|
||||||
|
background: darkgreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qback_transparent .question-title-container {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.qvideo {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
div.qvideo .video {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
div.qvideo .question-title-container, div.qvideo .answer-container {
|
||||||
|
flex-grow: 2;
|
||||||
|
}
|
||||||
|
div.qvideo .question-title-container {
|
||||||
|
background: transparent;
|
||||||
|
color: #5A1D64;
|
||||||
|
}
|
||||||
|
div.qvideo .answer-container {
|
||||||
|
padding-left: 30px;
|
||||||
|
}
|
||||||
|
div.qvideo .question-valid-container {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hide-first-row table.ls-answers tr.answers-list:first-child {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}/*# sourceMappingURL=plain.css.map */
|
||||||
1
css/plain.css.map
Normal file
1
css/plain.css.map
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{"version":3,"sources":["../sass/_base.sass","plain.css","../sass/_surveys-list.sass","../sass/_progress.sass","../sass/_extras.sass"],"names":[],"mappings":"AAAA;EACI,yCAAA;ACCJ;;ADCA;EACI,8CAAA;ACEJ;;ADAA;EACI,+CAAA;ACGJ;;ADDA;EACI,qDAAA;ACIJ;;ADFA;EACI,8CAAA;ACKJ;;ADHA;EACE,aAAA;EACA,gBAAA;ACMF;;ADHE;EACE,iBAAA;EACA,gBAAA;ACMJ;;ADJA;EACE,cAAA;EACA,eAAA;ACOF;;ADLA;EACE,gBAAA;ACQF;;ADLE;EACE,iBAAA;EACA,aAAA;EACA,gBAAA;ACQJ;;ADNA;EACE,aAAA;EACA,iBAAA;ACSF;;ADPA;EACE,mBAAA;ACUF;;ADRA;EACE,iBAAA;EACA,aAAA;ACWF;;ADTA;EACE,eAAA;EACA,mBAAA;ACYF;;ADVA;EACE,kBAAA;EACA,eAAA;ACaF;ADZE;EACE,gBAAA;ACcJ;;ADZA;EACE,gBAAA;EACA,mBAAA;ACeF;;ADbA;EACE,iBAAA;ACgBF;;ADdA;EACE,oBAAA;EACA,mBAAA;ACiBF;;ADfA;EACE,aAAA;ACkBF;;ADhBA;EACE,aAAA;EACA,uBAAA;ACmBF;ADlBE;EACE,WAAA;EACA,cAAA;ACoBJ;;ADlBA;EACE,mBAAA;ACqBF;;ADnBA;EACE,iBAAA;ACsBF;ADrBE;EACE,kBAAA;EACA,oBAAA;ACuBJ;;ADpBE;EACE,aAAA;EACA,gBAAA;ACuBJ;ADtBE;EACE,yBAAA;EACA,gBAAA;ACwBJ;;ADtBA;EACE,iBAAA;EACA,aAAA;ACyBF;;ADvBA;;EAEE,WAAA;AC0BF;;ADxBA;EACE,YAAA;AC2BF;AD1BE;EACE,sBAAA;AC4BJ;AD3BE;EACE,sBAAA;AC6BJ;AD5BE;EACE,sBAAA;AC8BJ;AD7BE;EACE,sBAAA;AC+BJ;;AChJA;EACE,iBAAA;EACA,aAAA;ADmJF;;AErJA;EACE,gBAAA;EACA,gBAAA;AFwJF;;AEtJA;EACE,cAAA;EACA,iBAAA;AFyJF;;AG/JA;EACE,eAAA;AHkKF;;AGhKA;EACE,sBAAA;AHmKF;;AGjKA;EACE,qBAAA;AHoKF;;AGlKA;EACE,uBAAA;AHqKF;;AGnKA;EACE,aAAA;AHsKF;AGrKE;EACE,eAAA;EACA,YAAA;AHuKJ;AGtKE;EACE,YAAA;AHwKJ;AGvKE;EACE,uBAAA;EACA,cAAA;AHyKJ;AGxKE;EACE,kBAAA;AH0KJ;AGzKE;EACE,aAAA;AH2KJ;;AGzKA;EACE,aAAA;AH4KF;;AG1KA;EACE,aAAA;AH6KF","file":"plain.css"}
|
||||||
BIN
files/logo.png
Normal file
BIN
files/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
BIN
files/logo2.png
Normal file
BIN
files/logo2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
files/preview.png
Normal file
BIN
files/preview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
BIN
files/tiledpattern.jpg
Normal file
BIN
files/tiledpattern.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 797 KiB |
BIN
files/tiledtexture.png
Normal file
BIN
files/tiledtexture.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
328
options/options.js
Normal file
328
options/options.js
Normal file
|
|
@ -0,0 +1,328 @@
|
||||||
|
var ThemeOptions = function(){
|
||||||
|
var ThemeOptions = function () {
|
||||||
|
'use strict';
|
||||||
|
//////////////////
|
||||||
|
// Define necessary globals
|
||||||
|
|
||||||
|
// general_inherit_active is not present at global level
|
||||||
|
// see: https://github.com/LimeSurvey/LimeSurvey/blob/1cbfa11b081f54763b28364472926b155efea5dc/themes/survey/vanilla/options/options.twig#L71
|
||||||
|
var inheritPossible = ($('#general_inherit_active').length > 0);
|
||||||
|
|
||||||
|
//get option Object from Template configuration options
|
||||||
|
var optionObject = {'general_inherit': 1};
|
||||||
|
|
||||||
|
//get the global form
|
||||||
|
var globalForm = $('.action_update_options_string_form');
|
||||||
|
|
||||||
|
/////////////////
|
||||||
|
// Define methods run on startup
|
||||||
|
|
||||||
|
// #TemplateConfiguration_options is the id of the Options field in advanced option
|
||||||
|
// getter for generalInherit
|
||||||
|
var generalInherit = function () {
|
||||||
|
return $('#TemplateConfiguration_options').val() === 'inherit';
|
||||||
|
};
|
||||||
|
|
||||||
|
//parse the options as set in the advanced form
|
||||||
|
var parseOptionObject = function () {
|
||||||
|
// If no general inherit, then pass the value of the "Options" field in advanced option to the object optionObject
|
||||||
|
if ($('#TemplateConfiguration_options').length > 0 && !generalInherit()) {
|
||||||
|
try {
|
||||||
|
optionObject = JSON.parse($('#TemplateConfiguration_options').val());
|
||||||
|
} catch (e) {
|
||||||
|
console.ls ? console.ls.error('No valid option field!') : console.log('No valid option field!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Show/Hide fields on generalInherit
|
||||||
|
// To hide a simple option on generalInherit: just add the class "action_hide_on_inherit" to the rows continaing it
|
||||||
|
var startupGeneralInherit = function () {
|
||||||
|
|
||||||
|
if (!inheritPossible) return false;
|
||||||
|
|
||||||
|
if (generalInherit()) {
|
||||||
|
$('#general_inherit_on').prop('checked', true).trigger('change').closest('label').addClass('active');
|
||||||
|
$('.action_hide_on_inherit').addClass('d-none');
|
||||||
|
} else {
|
||||||
|
$('#general_inherit_off').prop('checked', true).trigger('change').closest('label').addClass('active');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// So this function find the selectors in the forum, and pass their values to the advanced options
|
||||||
|
var updateFieldSettings = function () {
|
||||||
|
|
||||||
|
if ($('#general_inherit_on').prop('checked')) {
|
||||||
|
$('#TemplateConfiguration_options').val('inherit');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
globalForm.find('.selector_option_value_field').each(function (i, item) {
|
||||||
|
//disabled items should be inherit or false
|
||||||
|
if ($(item).prop('disabled')) {
|
||||||
|
$(item).val((inheritPossible ? 'inherit' : false));
|
||||||
|
}
|
||||||
|
|
||||||
|
optionObject[$(item).attr('name')] = $(item).val();
|
||||||
|
});
|
||||||
|
|
||||||
|
globalForm.find('.selector_option_radio_field ').each(function (i, item) {
|
||||||
|
//disabled items should be inherit or false
|
||||||
|
if ($(item).prop('disabled')) {
|
||||||
|
$(item).val((inheritPossible ? 'inherit' : false));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($(item).attr('type') == 'radio') {
|
||||||
|
if ($(item).prop('checked')) {
|
||||||
|
optionObject[$(item).attr('name')] = $(item).val();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
var newOptionObject = $.extend(true, {}, optionObject);
|
||||||
|
delete newOptionObject.general_inherit;
|
||||||
|
|
||||||
|
$('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////
|
||||||
|
// Utility Methods
|
||||||
|
// -- small utilities i.g. for images or similar, or very specialized functions
|
||||||
|
|
||||||
|
//Parses the option value for an item
|
||||||
|
var parseOptionValue = function (item, fallbackValue) {
|
||||||
|
fallbackValue = fallbackValue || false;
|
||||||
|
// If general inherit, then the value of the dropdown is inherit, else it's the value defined in advanced options
|
||||||
|
var itemValue = generalInherit() ? 'inherit' : optionObject[$(item).attr('name')];
|
||||||
|
|
||||||
|
// If anything goes wrong (manual edit or anything else), we make sure it will have a correct value
|
||||||
|
if (itemValue == null || itemValue == undefined) {
|
||||||
|
itemValue = inheritPossible ? 'inherit' : fallbackValue;
|
||||||
|
optionObject[$(item).attr('name')] = itemValue;
|
||||||
|
}
|
||||||
|
return itemValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
//Set value and propagate to bootstrapSwitch
|
||||||
|
var setAndPropageteToSwitch = function (item) {
|
||||||
|
$(item).prop('checked', true).trigger('change');
|
||||||
|
$(item).closest('label').addClass('active');
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///////////////
|
||||||
|
// Parser methods
|
||||||
|
// -- These methods will either parse through existing fields, or set existing fields to their correct values
|
||||||
|
|
||||||
|
// Update values in the form to the template options
|
||||||
|
// selector_option_value_field are the select dropdown (like variations and fonts)
|
||||||
|
var prepareSelectField = function () {
|
||||||
|
globalForm.find('.selector_option_value_field').each(function (i, item) {
|
||||||
|
var itemValue = parseOptionValue(item);
|
||||||
|
$(item).val(itemValue);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// Generate the state of switches (On/Off/Inherit)
|
||||||
|
var parseParentSwitchFields = function () {
|
||||||
|
globalForm.find('.selector_option_radio_field').each(function (i, item) {
|
||||||
|
|
||||||
|
var itemValue = parseOptionValue(item, 'off');
|
||||||
|
|
||||||
|
//if it is a radio selector, check it and propagate the change to bootstrapSwitch
|
||||||
|
if ($(item).val() == itemValue) {
|
||||||
|
setAndPropageteToSwitch(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var prepareFontField = function () {
|
||||||
|
optionObject.font = optionObject.font || (inheritPossible ? 'inherit' : 'roboto');
|
||||||
|
|
||||||
|
if (optionObject.font !== 'inherit') {
|
||||||
|
$('#simple_edit_options_font').val(optionObject.font);
|
||||||
|
}
|
||||||
|
updateFieldSettings();
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////
|
||||||
|
// HotSwap methods
|
||||||
|
// -- These methods connect an input directly to the value in the optionsObject
|
||||||
|
|
||||||
|
// Disable dependent inputs when their parents are set to off, or inherit
|
||||||
|
var hotSwapParentRadioButtons = function () {
|
||||||
|
// hotswapping the select fields to the radiobuttons
|
||||||
|
// If an option is set to off, the attached selectors are disabled
|
||||||
|
$('.selector_radio_childfield').each(function (i, selectorItem) {
|
||||||
|
$('input[name=' + $(selectorItem).data('parent') + ']').on('change', function () {
|
||||||
|
|
||||||
|
if ($(this).val() === 'on' && $(this).prop('checked') == true) {
|
||||||
|
$(selectorItem).prop('disabled', false);
|
||||||
|
} else {
|
||||||
|
$(selectorItem).prop('disabled', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// disabled this part to always be able to click on "Preview image" button
|
||||||
|
/*
|
||||||
|
if ($(selectorItem).hasClass('selector_image_selector')) {
|
||||||
|
$('button[data-target="#' + $(selectorItem).attr('id') + '"]').prop('disabled', $(selectorItem).val() == 'inherit');
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// hotswapping the fields
|
||||||
|
var hotSwapFields = function () {
|
||||||
|
|
||||||
|
globalForm.find('.selector_option_value_field').on('change', function (evt) {
|
||||||
|
updateFieldSettings();
|
||||||
|
});
|
||||||
|
|
||||||
|
globalForm.find('.selector_option_radio_field').on('change', updateFieldSettings);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var hotswapGeneralInherit = function () {
|
||||||
|
//hotswapping the general inherit
|
||||||
|
$('#general_inherit_on').on('change', function (evt) {
|
||||||
|
$('#TemplateConfiguration_options').val('inherit');
|
||||||
|
$('.action_hide_on_inherit').addClass('d-none');
|
||||||
|
});
|
||||||
|
$('#general_inherit_off').on('change', function (evt) {
|
||||||
|
$('.action_hide_on_inherit').removeClass('d-none');
|
||||||
|
updateFieldSettings();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var hotswapFontField = function () {
|
||||||
|
$('#simple_edit_options_font').on('change', function (evt) {
|
||||||
|
var currentPackageObject = $('#TemplateConfiguration_packages_to_load').val() !== 'inherit'
|
||||||
|
? JSON.parse($('#TemplateConfiguration_packages_to_load').val())
|
||||||
|
: $(this).data('inheritvalue');
|
||||||
|
|
||||||
|
if ($('#simple_edit_options_font').val() === 'inherit') {
|
||||||
|
|
||||||
|
$('#TemplateConfiguration_packages_to_load').val('inherit');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
var selectedFontPackage = $(this).find('option:selected');
|
||||||
|
var packageName = selectedFontPackage.data('font-package');
|
||||||
|
var formatedPackageName = 'font-' + packageName;
|
||||||
|
|
||||||
|
var filteredAdd = currentPackageObject.add.filter(function (value, index) {
|
||||||
|
return !(/^font-.*$/.test(String(value)));
|
||||||
|
});
|
||||||
|
filteredAdd.push(formatedPackageName);
|
||||||
|
currentPackageObject.add = filteredAdd;
|
||||||
|
$('#TemplateConfiguration_packages_to_load').val(JSON.stringify(currentPackageObject));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////
|
||||||
|
// Event methods
|
||||||
|
// -- These methods are triggered on events. Please see `bind´ method for more information
|
||||||
|
var onSaveButtonClickAction = function (evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
|
||||||
|
if (generalInherit()) {
|
||||||
|
$('#TemplateConfiguration_options').val('inherit');
|
||||||
|
$('#template-options-form').trigger('submit'); // submit the form
|
||||||
|
} else {
|
||||||
|
//Create a copy of the inherent optionObject
|
||||||
|
var newOptionObject = $.extend(true, {}, optionObject);
|
||||||
|
newOptionObject.generalInherit = null;
|
||||||
|
|
||||||
|
// Now write the newly created object to the correspondent field as a json string
|
||||||
|
$('#TemplateConfiguration_options').val(JSON.stringify(newOptionObject));
|
||||||
|
|
||||||
|
// And submit the form
|
||||||
|
// Beware, we are triggering 'submit' directly, which doesn't trigger HTML5 validations.
|
||||||
|
// No HTML5 validations needed here, so all good.
|
||||||
|
// If not we would need to add a hidden submit button and trigger a 'click' on it. (see fruity theme).
|
||||||
|
// Like these: $('#template-options-form').find('button[type=submit]').trigger('click');
|
||||||
|
$('#template-options-form').trigger('submit');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
///////////////
|
||||||
|
// Instance methods
|
||||||
|
var bind = function () {
|
||||||
|
//if the save button is clicked write everything into the template option field and send the form
|
||||||
|
$('.action_update_options_string_button, #theme-options--submit').on('click', onSaveButtonClickAction);
|
||||||
|
|
||||||
|
//Bind the hotwaps
|
||||||
|
hotSwapParentRadioButtons();
|
||||||
|
hotSwapFields();
|
||||||
|
hotswapGeneralInherit();
|
||||||
|
hotswapFontField();
|
||||||
|
};
|
||||||
|
|
||||||
|
var run = function () {
|
||||||
|
parseOptionObject();
|
||||||
|
|
||||||
|
startupGeneralInherit();
|
||||||
|
|
||||||
|
prepareSelectField();
|
||||||
|
parseParentSwitchFields();
|
||||||
|
prepareFontField();
|
||||||
|
|
||||||
|
bind();
|
||||||
|
};
|
||||||
|
|
||||||
|
return run;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
var prepare = function () {
|
||||||
|
|
||||||
|
var deferred = $.Deferred();
|
||||||
|
|
||||||
|
//activate the bootstrap switch for checkboxes
|
||||||
|
$('.action_activate_bootstrapswitch').bootstrapSwitch();
|
||||||
|
|
||||||
|
var themeOptionStarter = new ThemeOptions();
|
||||||
|
themeOptionStarter();
|
||||||
|
|
||||||
|
setTimeout(function () {
|
||||||
|
deferred.resolve();
|
||||||
|
}, 650);
|
||||||
|
return deferred.promise();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$(document).off('pjax:scriptcomplete.templateOptions').on('ready pjax:scriptcomplete.templateOptions', function () {
|
||||||
|
$('.simple-template-edit-loading').css('display', 'block');
|
||||||
|
prepare().then(function (runsesolve) {
|
||||||
|
$('.simple-template-edit-loading').css('display', 'none');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.selector__open_lightbox').on('click', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var imgSrc = $($(this).data('bs-target')).find('option:selected').data('lightbox-src');
|
||||||
|
var imgTitle = $($(this).data('bs-target')).val();
|
||||||
|
imgTitle = imgTitle.split('/').pop();
|
||||||
|
$('#lightbox-modal').find('.selector__title').text(imgTitle);
|
||||||
|
$('#lightbox-modal').find('.selector__image').attr({'src': imgSrc, 'alt': imgTitle});
|
||||||
|
$('#lightbox-modal').modal('show');
|
||||||
|
});
|
||||||
|
|
||||||
|
var uploadImageBind = new bindUpload({
|
||||||
|
form: '#upload_frontend',
|
||||||
|
input: '#upload_image_frontend',
|
||||||
|
progress: '#upload_progress_frontend',
|
||||||
|
onBeforeSend: function () {
|
||||||
|
$('.simple-template-edit-loading').css('display', 'block');
|
||||||
|
},
|
||||||
|
onSuccess: function () {
|
||||||
|
setTimeout(function () {
|
||||||
|
$(document).trigger('pjax:load', {url: window.location.href});
|
||||||
|
}, 2500);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
427
options/options.twig
Normal file
427
options/options.twig
Normal file
|
|
@ -0,0 +1,427 @@
|
||||||
|
{#
|
||||||
|
LimeSurvey
|
||||||
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
||||||
|
All rights reserved.
|
||||||
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
||||||
|
LimeSurvey is free software. This version may have been modified pursuant
|
||||||
|
to the GNU General Public License, and as distributed it includes or
|
||||||
|
is derivative of works licensed under the GNU General Public License or
|
||||||
|
other free or open source software licenses.
|
||||||
|
See COPYRIGHT.php for copyright notices and details.
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Default survey template options ._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
This is the form for the option parameters of the basic default template.
|
||||||
|
|
||||||
|
#}
|
||||||
|
|
||||||
|
{{ registerPackage('font-roboto') }}
|
||||||
|
{{ registerPackage('font-noto') }}
|
||||||
|
{{ registerPackage('font-news_cycle') }}
|
||||||
|
{{ registerPackage('font-ubuntu') }}
|
||||||
|
{{ registerPackage('font-lato') }}
|
||||||
|
{{ registerPackage('font-websafe') }}
|
||||||
|
|
||||||
|
{# The default template offers the variety of styles #}
|
||||||
|
{% set fontOptions = '' %}
|
||||||
|
|
||||||
|
{% set brandlogofileOptions , brandlogofileInheritFilename, brandlogofileInheritPreview = '', '', '' %}
|
||||||
|
{% set secondlogofileOptions , secondlogofileInheritFilename, secondlogofileInheritPreview = '', '', '' %}
|
||||||
|
|
||||||
|
{# For surveyspecific settings add an inherit option #}
|
||||||
|
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
|
||||||
|
{% set fontOptions = fontOptions ~ '<option value="inherit">'~ gT("Inherit") ~' ( '~ gT("Inherited value:")~' '~ oParentOptions.font ~' )</option>' %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set fontOptions %}
|
||||||
|
{{fontOptions}}
|
||||||
|
<optgroup label="{{ gT("Local Server") }}">
|
||||||
|
<option class="font-roboto" value="roboto" data-font-package="roboto" >Roboto</option>
|
||||||
|
<option class="font-news_cycle" value="news_cycle" data-font-package="news_cycle" >News Cycle</option>
|
||||||
|
<option class="font-lato" value="lato" data-font-package="lato" >Lato</option>
|
||||||
|
<option class="font-noto" value="noto" data-font-package="noto" >Noto Sans</option>
|
||||||
|
<option class="font-ubuntu" value="ubuntu" data-font-package="ubuntu" >Ubuntu</option>
|
||||||
|
</optgroup>
|
||||||
|
|
||||||
|
<optgroup label="{{ gT("User browser") }}">
|
||||||
|
|
||||||
|
<option class="font-georgia " value="georgia" data-font-package="websafe" >Georgia</option>
|
||||||
|
<option class="font-palatino " value="palatino" data-font-package="websafe" >Palatino Linotype</option>
|
||||||
|
<option class="font-times_new_roman " value="times_new_roman" data-font-package="websafe" >Times New Roman</option>
|
||||||
|
<option class="font-arial " value="arial" data-font-package="websafe" >Arial</option>
|
||||||
|
<option class="font-arial_black " value="arial_black" data-font-package="websafe" >Arial Black</option>
|
||||||
|
<option class="font-comic_sans " value="comic_sans" data-font-package="websafe" >Comic Sans</option>
|
||||||
|
<option class="font-impact " value="impact" data-font-package="websafe" >Impact</option>
|
||||||
|
<option class="font-lucida_sans " value="lucida_sans" data-font-package="websafe" >Lucida Sans</option>
|
||||||
|
<option class="font-trebuchet " value="trebuchet" data-font-package="websafe" >Trebuchet</option>
|
||||||
|
<option class="font-courier " value="courier" data-font-package="websafe" >Courier New</option>
|
||||||
|
<option class="font-lucida_console " value="lucida_console" data-font-package="websafe" >Lucida Console</option>
|
||||||
|
</optgroup>
|
||||||
|
{% endset %}
|
||||||
|
|
||||||
|
<div class="container-fluid" style="position:relative">
|
||||||
|
{# Small loading animation to give the scripts time to parse and render the correct values #}
|
||||||
|
<div class="" style="display:none;height:100%;width:100%;position:absolute;left:0;top:0;background:rgb(255,255,255);background:rgba(235,235,235,0.8);z-index:2000;">
|
||||||
|
<div style="position:absolute; left:49%;top:35%;" class="text-center">
|
||||||
|
<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
{# Begin template option form #}
|
||||||
|
<form class='form action_update_options_string_form' action=''>
|
||||||
|
|
||||||
|
{# If this is a surveyspecific settings page, offer the possibility to do a full inheritance of the parent template #}
|
||||||
|
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
|
||||||
|
<div class='row' id="general_inherit_active">
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_general_inherit' class='control-label'>{{gT("Inherit everything" )}}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input id="general_inherit_on" name='general_inherit' type='radio' value='on' class='selector_option_general_inherit ' data-id='simple_edit_options_general_inherit'/>
|
||||||
|
{{ gT("Yes") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input id="general_inherit_off" name='general_inherit' type='radio' value='off' class='selector_option_general_inherit ' data-id='simple_edit_options_general_inherit'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row action_hide_on_inherit">
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{# First settings row #}
|
||||||
|
<div class='row action_hide_on_inherit'>
|
||||||
|
|
||||||
|
{# Container #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-3'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_container' class='control-label'> {{ gT("Survey container") }} </label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='container' value='on' class='selector_option_radio_field simple_edit_options_container ' data-id='container'/>
|
||||||
|
{{ gT("Yes") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='container' value='off' class='selector_option_radio_field simple_edit_options_container ' data-id='container'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</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-outline-secondary">
|
||||||
|
<input type='radio' name='container' value='inherit' class='selector_option_radio_field simple_edit_options_container ' data-id='container'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.brandlogo }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# hideprivacyinfo #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-3'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_hideprivacyinfo' class='control-label'>{{ gT("Hide privacy info") }}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='hideprivacyinfo' value='on' class='selector_option_radio_field simple_edit_options_hideprivacyinfo ' data-id='hideprivacyinfo'/>
|
||||||
|
{{ gT("Yes") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='hideprivacyinfo' value='off' class='selector_option_radio_field simple_edit_options_hideprivacyinfo ' data-id='hideprivacyinfo'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</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-outline-secondary">
|
||||||
|
<input type='radio' name='hideprivacyinfo' value='inherit' class='selector_option_radio_field simple_edit_options_hideprivacyinfo ' data-id='hideprivacyinfo'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.brandlogo }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Show Clear And Exit #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-3'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_showclearall' class='control-label'> {{ gT("Show link/button to delete response & exit survey") }} </label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='showclearall' value='on' class='selector_option_radio_field simple_edit_options_showclearall ' data-id='showclearall'/>
|
||||||
|
{{ gT("Yes") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='showclearall' value='off' class='selector_option_radio_field simple_edit_options_showclearall ' data-id='showclearall'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</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-outline-secondary" title="{{ gT("Inherited value:") }} ">
|
||||||
|
<input type='radio' name='showclearall' value='inherit' class='selector_option_radio_field simple_edit_options_showclearall ' data-id='showclearall'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.showclearall }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Second settings row #}
|
||||||
|
<div class='row action_hide_on_inherit'>
|
||||||
|
|
||||||
|
{# questionhelptextposition #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-3'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_questionhelptextposition' class='control-label'>{{ gT("Question help text position") }}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='questionhelptextposition' value='top' class='selector_option_radio_field simple_edit_options_questionhelptextposition ' data-id='questionhelptextposition'/>
|
||||||
|
{{ gT("Top") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='questionhelptextposition' value='bottom' class='selector_option_radio_field simple_edit_options_questionhelptextposition ' data-id='questionhelptextposition'/>
|
||||||
|
{{ gT("Bottom") }}
|
||||||
|
</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-outline-secondary">
|
||||||
|
<input type='radio' name='questionhelptextposition' value='inherit' class='selector_option_radio_field simple_edit_options_questionhelptextposition ' data-id='questionhelptextposition'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.questionhelptextposition }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Show popups #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-4'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_showpopups' class='control-label' {{ showpopups_disabled_qtip }}>{{ gT("Show popups") }}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary control-label" {{ showpopups_disabled }}>
|
||||||
|
<input type='radio' name='showpopups' value='1' {{ showpopups_disabled }} class='selector_option_radio_field simple_edit_options_showpopups ' data-id='showpopups'/>
|
||||||
|
{{ gT("Popup") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary" {{ showpopups_disabled }}>
|
||||||
|
<input type='radio' name='showpopups' value='0' {{ showpopups_disabled }} class='selector_option_radio_field simple_edit_options_showpopups ' data-id='showpopups'/>
|
||||||
|
{{ gT("On page") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary" {{ showpopups_disabled }}>
|
||||||
|
<input type='radio' name='showpopups' value='-1' {{ showpopups_disabled }} class='selector_option_radio_field simple_edit_options_showpopups ' data-id='showpopups'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</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-outline-secondary" {{ showpopups_disabled }}>
|
||||||
|
<input type='radio' name='showpopups' value='inherit' class='selector_option_radio_field simple_edit_options_showpopups ' data-id='showpopups'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.showpopups }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Fix num auto (and real num value) #}
|
||||||
|
<div class='col-12 col-lg-4 col-xl-3'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_fixnumauto' class='control-label'>{{ gT("Fix automatically numeric value") }}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
{# bFixNumAuto : 1 and bNumRealValue : 0 #}
|
||||||
|
<input type='radio' name='fixnumauto' value='enable' class='selector_option_radio_field simple_edit_options_fixnumauto' data-id='fixnumauto'/>
|
||||||
|
{{ gT("Yes") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
{# bFixNumAuto : 0 and bNumRealValue : 0 #}
|
||||||
|
<input type='radio' name='fixnumauto' value='partial' class='selector_option_radio_field simple_edit_options_fixnumauto' data-id='fixnumauto'/>
|
||||||
|
{{ gT("For expression") }}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
{# bFixNumAuto : 0 and bNumRealValue : 1 #}
|
||||||
|
<input type='radio' name='fixnumauto' value='disable' class='selector_option_radio_field simple_edit_options_fixnumauto' data-id='fixnumauto'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</label>
|
||||||
|
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='fixnumauto' value='inherit' class='selector_option_radio_field simple_edit_options_fixnumauto' data-id='fixnumauto'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.fixnumauto == gT("No") ? gT("Default") : oParentOptions.fixnumauto }}]
|
||||||
|
</label>
|
||||||
|
{% else %}
|
||||||
|
{# Since added after theme distribution and don't want reset : use empty value for leave default #}
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='fixnumauto' value='off' class='selector_option_radio_field simple_edit_options_fixnumauto' data-id='fixnumauto'/>
|
||||||
|
{{ gT("Default") }}
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class='row action_hide_on_inherit'>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Brand Logo -->
|
||||||
|
<div class='row action_hide_on_inherit'>
|
||||||
|
<div class='col-12 col-lg-4'>
|
||||||
|
{# Brandlogo #}
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_brandlogo' class='control-label'>Brandlogo</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class="btn-group" data-bs-toggle="buttons">
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='brandlogo' value='on' class='selector_option_radio_field ' data-id='simple_edit_options_brandlogo'/>
|
||||||
|
{{gT("Yes" )}}
|
||||||
|
</label>
|
||||||
|
<label class="btn btn-outline-secondary">
|
||||||
|
<input type='radio' name='brandlogo' value='off' class='selector_option_radio_field ' data-id='simple_edit_options_brandlogo'/>
|
||||||
|
{{ gT("No") }}
|
||||||
|
</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-outline-secondary">
|
||||||
|
<input type='radio' name='brandlogo' value='inherit' class='selector_option_radio_field ' data-id='simple_edit_options_brandlogo'/>
|
||||||
|
{{ gT("Inherit") }} [{{ oParentOptions.brandlogo }}]
|
||||||
|
</label>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='col-md-8 col-lg-6'>
|
||||||
|
{# Brandlogo file selector #}
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_brandlogofile' class='control-label'>Brandlogo file</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<select class='form-select selector_option_value_field selector_radio_childfield selector_image_selector' data-parent="brandlogo" id='simple_edit_options_brandlogofile' name='brandlogofile'>
|
||||||
|
{% set optgroup = '' %}
|
||||||
|
{% for image in templateConfiguration.imageFileList %}
|
||||||
|
{% if image.group != optgroup %}
|
||||||
|
{% if optgroup != '' %}
|
||||||
|
{% set brandlogofileOptions = brandlogofileOptions ~ '</optgroup>' %}
|
||||||
|
{% endif %}
|
||||||
|
{% set brandlogofileOptions = brandlogofileOptions ~ '<optgroup label="' ~ image.group ~ '">' %}
|
||||||
|
{% set optgroup = image.group %}
|
||||||
|
{% endif %}
|
||||||
|
{% if oParentOptions.brandlogofile == image.filepath %}
|
||||||
|
{% set brandlogofileInheritPreview = brandlogofileInheritPreview ~ image.preview %}
|
||||||
|
{% set brandlogofileInheritFilename = brandlogofileInheritFilename ~ image.filename %}
|
||||||
|
{% endif %}
|
||||||
|
{% set brandlogofileOptions = brandlogofileOptions ~ '<option data-lightbox-src="' ~ image.preview ~ '" value="' ~ image.filepath ~ '">' ~ image.filename ~ '</option>' %}
|
||||||
|
{% endfor %}
|
||||||
|
{% set brandlogofileOptions = brandlogofileOptions ~ '</optgroup>' %}
|
||||||
|
{% if templateConfiguration.sid is not empty or templateConfiguration.gsid is not empty %}
|
||||||
|
{% set brandlogofileOptions = '<option data-lightbox-src="' ~ brandlogofileInheritPreview ~ '" value="inherit">' ~ gT("Inherit")~ ' [' ~ gT("inherited value:") ~ ' ' ~ brandlogofileInheritFilename ~ ']</option>' ~ brandlogofileOptions %}
|
||||||
|
{% endif %}
|
||||||
|
{{ brandlogofileOptions }}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='col-md-4 col-lg-2'>
|
||||||
|
<br/>
|
||||||
|
<button class="btn btn-outline-secondary selector__open_lightbox" data-target="#simple_edit_options_brandlogofile"> {{ gT('Preview image')}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='row ls-space margin top-15 bottom-15 '>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='row'>
|
||||||
|
<div class='col-12'>
|
||||||
|
<div class='panel panel-default'>
|
||||||
|
<div class='panel-heading'>{{ sprintf( gT("%s fonts"), templateConfiguration.template_name)|capitalize }}</div>
|
||||||
|
<div class='panel-body'>
|
||||||
|
<div class='mb-3 row'>
|
||||||
|
<label for='simple_edit_options_font' class='control-label'>{{ gT("Select font:") }}</label>
|
||||||
|
<div class='col-12'>
|
||||||
|
<select class='form-select selector_option_value_field' id='simple_edit_options_font' name='font' data-inheritvalue='{{oParentOptions.packages_to_load}}'>
|
||||||
|
{{ fontOptions }}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class='row d-none'>
|
||||||
|
<div class='col-12'>
|
||||||
|
<button class='btn btn-success col-lg-2 col-md-4 col-6 action_update_options_string_button'>
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='row action_hide_on_inherit'>
|
||||||
|
{# Upload an image #}
|
||||||
|
<div class="container-fluid ls-space margin bottom-15">
|
||||||
|
<div class="row ls-space margin bottom-15">
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ sprintf( gT("Upload an image (maximum size: %d MB):"), (templateConfiguration.maxFileSize/1024/1024) ) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
{{ C.Html.form(createUrl('/admin/themes/sa/upload'), 'post', { 'id' : 'upload_frontend', 'name' : 'upload_frontend', 'enctype' :'multipart/form-data' }) }}
|
||||||
|
<span id="fileselector_frontend">
|
||||||
|
<label class="btn btn-outline-secondary col-8" for="upload_image_frontend">
|
||||||
|
<input class="d-none" id="upload_image_frontend" name="upload_image_frontend" type="file">
|
||||||
|
<i class="fa fa-upload ls-space margin right-10"></i>
|
||||||
|
{{ gT("Upload") }}
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
<input type='hidden' name='surveyid' value='{{ templateConfiguration.sid }}' />
|
||||||
|
<input type='hidden' name='templatename' value='{{ templateConfiguration.template_name }}' />
|
||||||
|
<input type='hidden' name='templateconfig' value='{{ templateConfiguration.id }}' />
|
||||||
|
<input type='hidden' name='action' value='templateuploadimagefile' />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="progress">
|
||||||
|
<div id="upload_progress_frontend" class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
|
||||||
|
<span class="visually-hidden">0%</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal fade" tabindex="-1" role="dialog" id="lightbox-modal">
|
||||||
|
<div class="modal-dialog modal-lg" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||||
|
<h4 class="modal-title selector__title"> </h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<img class="selector__image img-fluid" src="" alt="title" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
114
sass/_base.sass
Normal file
114
sass/_base.sass
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
body.font-arial
|
||||||
|
font-family: Arial, Helvetica, sans-serif
|
||||||
|
|
||||||
|
body.font-arial_black
|
||||||
|
font-family: ArialBlack, Helvetica, sans-serif
|
||||||
|
|
||||||
|
body.font-opensans
|
||||||
|
font-family: "Open Sans", Helvetica, sans-serif
|
||||||
|
|
||||||
|
body.font-georgia
|
||||||
|
font-family: Georgia, 'Times New Roman', Times, serif
|
||||||
|
|
||||||
|
body.font-courier
|
||||||
|
font-family: 'Courier New', Courier, monospace
|
||||||
|
|
||||||
|
#welcome-container
|
||||||
|
padding: 15px
|
||||||
|
margin-top: 30px
|
||||||
|
|
||||||
|
.top-container
|
||||||
|
.top-content
|
||||||
|
padding-bottom: 0
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
.row.question-container
|
||||||
|
margin-left: 0
|
||||||
|
margin-right: 0
|
||||||
|
|
||||||
|
#navigator-container
|
||||||
|
margin-top: 15px
|
||||||
|
|
||||||
|
.privacy
|
||||||
|
.ls-privacy-head, p.ls-privacy-body
|
||||||
|
background: white
|
||||||
|
padding: 15px
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
h1.survey-name
|
||||||
|
margin-top: 0
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
|
.group-description
|
||||||
|
margin-bottom: 15px
|
||||||
|
|
||||||
|
#surveys-list-container
|
||||||
|
background: white
|
||||||
|
padding: 15px
|
||||||
|
|
||||||
|
.question-container
|
||||||
|
border: inherit
|
||||||
|
margin-bottom: 30px
|
||||||
|
|
||||||
|
.ls-questionhelp
|
||||||
|
margin-bottom: 5px
|
||||||
|
margin-top: 5px
|
||||||
|
p
|
||||||
|
margin-bottom: 0
|
||||||
|
|
||||||
|
table.ls-answers
|
||||||
|
margin-top: 15px
|
||||||
|
margin-bottom: 15px
|
||||||
|
|
||||||
|
.sortable-rank
|
||||||
|
background: white
|
||||||
|
|
||||||
|
.ls-answers .ls-heading th
|
||||||
|
font-weight: inherit
|
||||||
|
vertical-align: top
|
||||||
|
|
||||||
|
.privacy-block
|
||||||
|
padding: 15px
|
||||||
|
|
||||||
|
.privacy .form-check
|
||||||
|
padding: 15px
|
||||||
|
background: lightyellow
|
||||||
|
.form-check-input
|
||||||
|
float: none
|
||||||
|
margin-left: 0
|
||||||
|
|
||||||
|
#datasecurity_notice
|
||||||
|
margin-bottom: 15px
|
||||||
|
|
||||||
|
.save-form
|
||||||
|
background: white
|
||||||
|
.return-to-survey
|
||||||
|
padding-left: 15px
|
||||||
|
padding-bottom: 15px
|
||||||
|
|
||||||
|
.save-message
|
||||||
|
.h2
|
||||||
|
margin-top: 0
|
||||||
|
font-weight: 700
|
||||||
|
.text-warning
|
||||||
|
color: inherit !important
|
||||||
|
font-weight: 700
|
||||||
|
|
||||||
|
.save-survey-form
|
||||||
|
background: white
|
||||||
|
padding: 15px
|
||||||
|
|
||||||
|
.checkbox-item input[type=checkbox]:checked + label::after,
|
||||||
|
.checkbox-item input[type=radio]:checked + label::after
|
||||||
|
content: ""
|
||||||
|
|
||||||
|
.btn-primary
|
||||||
|
border: none
|
||||||
|
&:hover
|
||||||
|
filter: grayscale(0.5)
|
||||||
|
&:focus
|
||||||
|
filter: grayscale(0.5)
|
||||||
|
&.active
|
||||||
|
filter: grayscale(0.5)
|
||||||
|
&:active
|
||||||
|
filter: grayscale(0.5)
|
||||||
32
sass/_extras.sass
Normal file
32
sass/_extras.sass
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
.qback_red .question-title-container
|
||||||
|
background: red
|
||||||
|
|
||||||
|
.qback_orange .question-title-container
|
||||||
|
background: darkorange
|
||||||
|
|
||||||
|
.qback_green .question-title-container
|
||||||
|
background: darkgreen
|
||||||
|
|
||||||
|
.qback_transparent .question-title-container
|
||||||
|
background: transparent
|
||||||
|
|
||||||
|
div.qvideo
|
||||||
|
display: flex
|
||||||
|
.video
|
||||||
|
max-width: 100%
|
||||||
|
height: auto
|
||||||
|
.question-title-container, .answer-container
|
||||||
|
flex-grow: 2
|
||||||
|
.question-title-container
|
||||||
|
background: transparent
|
||||||
|
color: #5A1D64
|
||||||
|
.answer-container
|
||||||
|
padding-left: 30px
|
||||||
|
.question-valid-container
|
||||||
|
display: none
|
||||||
|
|
||||||
|
.hide-first-row table.ls-answers tr.answers-list:first-child
|
||||||
|
display: none
|
||||||
|
|
||||||
|
.hidden
|
||||||
|
display: none
|
||||||
7
sass/_progress.sass
Normal file
7
sass/_progress.sass
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
.progress
|
||||||
|
border-radius: 0
|
||||||
|
box-shadow: none
|
||||||
|
|
||||||
|
.progress-bar
|
||||||
|
font-size: 80%
|
||||||
|
padding-left: 2px
|
||||||
3
sass/_surveys-list.sass
Normal file
3
sass/_surveys-list.sass
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
#surveys-list-container
|
||||||
|
background: white
|
||||||
|
padding: 15px
|
||||||
4
sass/plain.sass
Normal file
4
sass/plain.sass
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
@use 'base'
|
||||||
|
@use 'surveys-list'
|
||||||
|
@use 'progress'
|
||||||
|
@use 'extras'
|
||||||
40
scripts/custom.js
Normal file
40
scripts/custom.js
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
/******************
|
||||||
|
User custom JS
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Put JS-functions for your template here.
|
||||||
|
If possible use a closure, or add them to the general Template Object "Template"
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
$(document).on('ready pjax:scriptcomplete',function(){
|
||||||
|
/**
|
||||||
|
* Code included inside this will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute
|
||||||
|
* @see https://learn.jquery.com/using-jquery-core/document-ready/
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Replace classes
|
||||||
|
$('.container-fluid').addClass('container');
|
||||||
|
$('.container-fluid').removeClass('container-fluid');
|
||||||
|
|
||||||
|
// Remove classes
|
||||||
|
$('.survey-name.text-center').removeClass('text-center');
|
||||||
|
$('.survey-description.text-center').removeClass('text-center');
|
||||||
|
$('.survey-welcome.h5.text-primary').removeClass('text-primary');
|
||||||
|
$('.survey-welcome.h5').removeClass('h5');
|
||||||
|
$('.ls-privacy-head.h4.text-primary').removeClass('text-primary');
|
||||||
|
$('.ls-privacy-head.h4').removeClass('h4');
|
||||||
|
$('.space-col').removeClass('space-col'); //The presence of .space-col is one of the greatest mistakes in the Vanilla theme IMHO
|
||||||
|
$('.group-title.text-center.h3').removeClass('h3');
|
||||||
|
$('.group-title.text-center').removeClass('text-center');
|
||||||
|
$('.text-info').removeClass('text-info');
|
||||||
|
$('.text-muted').removeClass('text-muted');
|
||||||
|
$('.limit-text-window').removeClass('limit-text-window');
|
||||||
|
$('.save-message.card').removeClass('card');
|
||||||
|
$('.save-message.bg-light').removeClass('bg-light');
|
||||||
|
$('.save-survey-form.col-lg-8.offset-lg-2').removeClass('offset-lg-2');
|
||||||
|
$('.save-survey-form.col-lg-8').removeClass('col-lg-8');
|
||||||
|
$('.save-message .card-body').removeClass('card-body');
|
||||||
|
$('.navbar-light.bg-light').removeClass('bg-light');
|
||||||
|
$('.privacy.row').removeClass('row');
|
||||||
|
});
|
||||||
223
views/layout_survey_list.twig
Normal file
223
views/layout_survey_list.twig
Normal file
|
|
@ -0,0 +1,223 @@
|
||||||
|
{#
|
||||||
|
LimeSurvey
|
||||||
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
||||||
|
All rights reserved.
|
||||||
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
||||||
|
LimeSurvey is free software. This version may have been modified pursuant
|
||||||
|
to the GNU General Public License, and as distributed it includes or
|
||||||
|
is derivative of works licensed under the GNU General Public License or
|
||||||
|
other free or open source software licenses.
|
||||||
|
See COPYRIGHT.php for copyright notices and details.
|
||||||
|
(¯`·._.·(¯`·._.· Survey List Layout ·._.·´¯)·._.·´¯)
|
||||||
|
This file renders the list of publicly listed surveys in your LimeSurvey home page.
|
||||||
|
NOTE: see layout_main.twig for more infos
|
||||||
|
#}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{#
|
||||||
|
LimeSurvey
|
||||||
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
||||||
|
All rights reserved.
|
||||||
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
||||||
|
LimeSurvey is free software. This version may have been modified pursuant
|
||||||
|
to the GNU General Public License, and as distributed it includes or
|
||||||
|
is derivative of works licensed under the GNU General Public License or
|
||||||
|
other free or open source software licenses.
|
||||||
|
See COPYRIGHT.php for copyright notices and details.
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Global Layout ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
This is the global layout that will be used to displayed most pages (less the error page)
|
||||||
|
If you're creating your own template, remember there is no obligation to respect the current file flow of this template.
|
||||||
|
This is different from the old LimeSurvey template engine, where you had to provide every one of the pstpl files.
|
||||||
|
Here, you must have a file called main_layout.twig (called from SurveyRuntimeHelper::run() ).
|
||||||
|
Other than that, you're free to organize your files and inclusions as you want.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Bootstrap ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
LimeSurvey uses Bootstrap.
|
||||||
|
See: https://getbootstrap.com
|
||||||
|
|
||||||
|
This template is an instance of Bootswatch Theme Flatly.
|
||||||
|
See: https://bootswatch.com/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Twig Engine ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
The template engine uses Twig.
|
||||||
|
See: http://twig.sensiolabs.org/
|
||||||
|
|
||||||
|
The main variable is aSurveyInfo. It's an array containing the main information about the survey.
|
||||||
|
aSurveyInfo also contains other needed arrays, such as aNavigator, or aQuestionGroups (which contain aQuestions), etc.
|
||||||
|
|
||||||
|
If you want to see what is availabe in aSurveyInfo, turn debug mode on in application/config.php, and copy the following line to the end of the <body> element below:
|
||||||
|
{{ dump(aSurveyInfo) }}
|
||||||
|
|
||||||
|
To echo a variable, just insert : {{ variable }}
|
||||||
|
To translate a string, just insert : {{gT( string )}}
|
||||||
|
|
||||||
|
NOTE: aSurveyInfo should be cleaned to remove the unnecessary data.
|
||||||
|
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Twig Engine: advanced ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
For security reason, Twig is in a sandBox.
|
||||||
|
About sandBox, see: http://twig.sensiolabs.org/doc/2.x/api.html#sandbox-extension
|
||||||
|
|
||||||
|
Available functions/Object Methods are defined in internal.php: components => twigRenderer
|
||||||
|
Eg:
|
||||||
|
Functions : 'include', 'dump', 'flatEllipsizeText', 'getLanguageData', 'array_flip', 'array_intersect_key', 'registerPublicCssFile', 'getAllQuestionClasses', 'getShowqnumcode', 'intval'
|
||||||
|
|
||||||
|
Methods :
|
||||||
|
- CHtml::textfield() (and: form, link, emailField, beginForm, endForm, dropDownList,htmlButton)
|
||||||
|
- Survey::getAllLanguages()
|
||||||
|
- LSHttpRequest::getParam()
|
||||||
|
|
||||||
|
If you need to add simple functions or static methods, just add them to internal.php.
|
||||||
|
If you need to add complex process, use application/core/LS_Twig_Extension.php (more help/comments there)
|
||||||
|
|
||||||
|
|
||||||
|
NOTE: Feel free to ask for functions, variables, etc, that you feel are missing - https://bugs.limesurvey.org/my_view_page.php
|
||||||
|
#}
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ aSurveyInfo.languagecode }}" dir="{{ aSurveyInfo.dir }}"
|
||||||
|
class="{{ aSurveyInfo.languagecode }} dir-{{ aSurveyInfo.dir }} {{ aSurveyInfo.class.html }}" {{ aSurveyInfo.attr.html }}>
|
||||||
|
|
||||||
|
{# Headers, metadata, etc #}
|
||||||
|
{{ include('./subviews/header/head.twig') }}
|
||||||
|
|
||||||
|
<body
|
||||||
|
class=" {{ aSurveyInfo.class.body }} font-{{ aSurveyInfo.options.font }} lang-{{ aSurveyInfo.languagecode }} {{ aSurveyInfo.surveyformat }} {% if( aSurveyInfo.options.brandlogo == "on") %}brand-logo{% endif %}" {{ aSurveyInfo.attr.body }} >
|
||||||
|
|
||||||
|
{# This used for the pjax system #}
|
||||||
|
<div id="beginScripts">
|
||||||
|
<###begin###>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Ajaxify cannot handle an element that is a direct child of body, so => create simple wrapper section #}
|
||||||
|
<article>
|
||||||
|
|
||||||
|
<div id="{{ aSurveyInfo.id.dynamicreload }}">
|
||||||
|
{% block body %}
|
||||||
|
{# Bootstrap Navigation Bar: the top menu #}
|
||||||
|
{% block nav_bar %}
|
||||||
|
{{ include('./subviews/header/nav_bar.twig') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{# Replace the content block #}
|
||||||
|
{% block content %}
|
||||||
|
<div class="container-fluid">
|
||||||
|
{{ registerTemplateCssFile('./css/survey-list.css') }}
|
||||||
|
|
||||||
|
<div class="{{ aSurveyInfo.class.surveylistrow }} row"
|
||||||
|
id="{{ aSurveyInfo.id.surveylistrow }}" {{ aSurveyInfo.attr.surveylistrow }}>
|
||||||
|
<div class="col-12">
|
||||||
|
{# include the alert for no JavaScript #}
|
||||||
|
{{ include('./subviews/messages/no_js_alert.twig') }}
|
||||||
|
{# <div class="row justify-content-center">
|
||||||
|
<div
|
||||||
|
id="{{ aSurveyInfo.id.surveylistrowjumbotron }}" {{ aSurveyInfo.attr.surveylistrowjumbotron }}>
|
||||||
|
{{ image('./files/survey_list_header.png', aSurveyInfo.name, {"class": "img-fluid mx-auto d-block"}) }}
|
||||||
|
<span class="text-center">{{ aSurveyInfo.sSiteName }}</span>
|
||||||
|
</div>
|
||||||
|
</div> #}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4"></div>
|
||||||
|
<div class="col">
|
||||||
|
<div id="surveylist-language-changer" class="ls-js-hidden">
|
||||||
|
{{ include('./subviews/navigation/language_changer_form.twig') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{# <div class="row">
|
||||||
|
<div class="{{ aSurveyInfo.class.surveylistrowdiva }} col-12" {{ aSurveyInfo.attr.surveylistrowdiva }}>
|
||||||
|
<div class='{{ aSurveyInfo.class.surveylistrowdivadiv }} h3' {{ aSurveyInfo.attr.surveylistrowdivadiv }}>
|
||||||
|
{{ gT("The following surveys are available:") }}
|
||||||
|
</div>
|
||||||
|
</div> #}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div
|
||||||
|
class="{{ aSurveyInfo.class.surveylistrowdivb }} col-12" {{ aSurveyInfo.attr.surveylistrowdivb }}>
|
||||||
|
<div
|
||||||
|
class='{{ aSurveyInfo.class.surveylistrowdivbdiv }}' {{ aSurveyInfo.attr.surveylistrowdivbdiv }}>
|
||||||
|
<ul class='{{ aSurveyInfo.class.surveylistrowdivbdivul }} list-unstyled ' {{ aSurveyInfo.attr.surveylistrowdivbdivul }}>
|
||||||
|
|
||||||
|
{% for key, oSurvey in aSurveyInfo.publicSurveys %}
|
||||||
|
<li class="{{ aSurveyInfo.class.surveylistrowdivbdivulli }} btn-group col-12 col-md-6" {{ aSurveyInfo.attr.surveylistrowdivbdivulli }}>
|
||||||
|
<a
|
||||||
|
href="{{ oSurvey.sSurveyUrl }}"
|
||||||
|
title="{{ gT("Start survey") }}"
|
||||||
|
lang="{{ oSurvey.language }}"
|
||||||
|
class="{{ aSurveyInfo.class.surveylistrowdivbdivullia }} btn btn-primary col-12">
|
||||||
|
{{ oSurvey.localizedTitle }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div
|
||||||
|
class="{{ aSurveyInfo.class.surveylistrowdivc }} col-12 " {{ aSurveyInfo.attr.surveylistrowdivc }}>
|
||||||
|
{{ sprintf( gT("Please contact %s ( %s ) for further assistance."), aSurveyInfo.sSiteAdminName, aSurveyInfo.sSiteAdminEmail ) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{#
|
||||||
|
<div id="{{ aSurveyInfo.id.surveylistfooter }}"
|
||||||
|
class="{{ aSurveyInfo.class.surveylistfooter }}" {{ aSurveyInfo.attr.surveylistfooter }}>
|
||||||
|
<div
|
||||||
|
class="{{ aSurveyInfo.class.surveylistfootercont }} container" {{ aSurveyInfo.attr.surveylistfootercont }}>
|
||||||
|
<div {{ aSurveyInfo.attr.surveylistfootercontp }} class="row">
|
||||||
|
<div class="col-6 col-md-12">
|
||||||
|
<a {{ aSurveyInfo.attr.surveylistfootercontpaa }}>
|
||||||
|
{{ image("./files/poweredby.png", "LimeSurvey Survey Software", {class: 'img-fluid'}) }}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-12 d-block d-sm-none d-md-block text-center">
|
||||||
|
<a {{ aSurveyInfo.attr.surveylistfootercontpab }}>
|
||||||
|
The Online Survey Tool
|
||||||
|
</a>
|
||||||
|
- Free & Open Source
|
||||||
|
</div>
|
||||||
|
<div class="col-6 d-none d-sm-block d-md-none text-center">
|
||||||
|
<a {{ aSurveyInfo.attr.surveylistfootercontpab }}>
|
||||||
|
Online Surveytool
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> #}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{# Basic ThemeScript options #}
|
||||||
|
{{ registerScript("BasicThemeScripts", " if(window.basicThemeScripts === undefined){ window.basicThemeScripts = new ThemeScripts(); } basicThemeScripts.initGlobal(); ", "POS_END") }}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{% block footer %}
|
||||||
|
{{ include('./subviews/footer/footer.twig') }}
|
||||||
|
{% endblock %}
|
||||||
|
<div id="bottomScripts">
|
||||||
|
<###end###>
|
||||||
|
</div>
|
||||||
|
{% block themescripts %}
|
||||||
|
<script>
|
||||||
|
window.basicThemeScripts.init();
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
205
views/subviews/header/custom_header.twig
Normal file
205
views/subviews/header/custom_header.twig
Normal file
|
|
@ -0,0 +1,205 @@
|
||||||
|
{#
|
||||||
|
LimeSurvey
|
||||||
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
||||||
|
All rights reserved.
|
||||||
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
||||||
|
LimeSurvey is free software. This version may have been modified pursuant
|
||||||
|
to the GNU General Public License, and as distributed it includes or
|
||||||
|
is derivative of works licensed under the GNU General Public License or
|
||||||
|
other free or open source software licenses.
|
||||||
|
See COPYRIGHT.php for copyright notices and details.
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Custom Header ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
If you extend a template, and want to add custom headers (js, css, scripts, meta etc), you'd rather do it here.
|
||||||
|
#}
|
||||||
|
|
||||||
|
{# Custom logo option #}
|
||||||
|
{# Custom backgroud option #}
|
||||||
|
<style>
|
||||||
|
html, body {
|
||||||
|
font-size: {{ aSurveyInfo.options.fontsize }} !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.backgroundimage == "on" and imageSrc(aSurveyInfo.options.backgroundimagefile )) %}
|
||||||
|
body {
|
||||||
|
background-image: url({{ imageSrc(aSurveyInfo.options.backgroundimagefile ) }});
|
||||||
|
background-attachment: {{ aSurveyInfo.options.backgroundimagefixed }};
|
||||||
|
background-size: {{ aSurveyInfo.options.backgroundimagedisplay }};
|
||||||
|
}
|
||||||
|
|
||||||
|
body .top-container {
|
||||||
|
background-color: rgba(236, 240, 241, 0.2);
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
/*padding-top: 60px;!* now is redefine in JS to fit any title length *!*/
|
||||||
|
background-color:{{ aSurveyInfo.options.bodybackgroundcolor }} ;
|
||||||
|
color: {{ aSurveyInfo.options.fontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
color: {{ aSurveyInfo.options.fontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.question-title-container {
|
||||||
|
font-size: {{ aSurveyInfo.options.questiontitlefontsize }};
|
||||||
|
font-weight: {{ aSurveyInfo.options.questiontitlefontweight }};
|
||||||
|
background: {{ aSurveyInfo.options.questiontitlebackgroundcolor }};
|
||||||
|
color: {{ aSurveyInfo.options.questiontitlefontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-title {
|
||||||
|
font-size: {{ aSurveyInfo.options.grouptitlefontsize }};
|
||||||
|
font-weight: {{ aSurveyInfo.options.grouptitlefontweight }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.group-description {
|
||||||
|
font-size: {{ aSurveyInfo.options.groupdescriptionfontsize }};
|
||||||
|
font-weight: {{ aSurveyInfo.options.groupdescriptionfontweight }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy-block, .privacy .form-check {
|
||||||
|
background-color: {{ aSurveyInfo.options.privacybackgroundcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
{% if ( aSurveyInfo.options.brandlogo == "on" ) %}
|
||||||
|
body .top-container {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.questionborder == "box" ) %}
|
||||||
|
.question-container,
|
||||||
|
#welcome-container,
|
||||||
|
.save-form,
|
||||||
|
#surveys-list-container,
|
||||||
|
.privacy {
|
||||||
|
border: 1px {{ aSurveyInfo.options.questionborderstyle }} {{ aSurveyInfo.options.questionbordercolor }};
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.questionborder == "top" ) %}
|
||||||
|
.question-container,
|
||||||
|
#welcome-container,
|
||||||
|
.save-form,
|
||||||
|
#surveys-list-container,
|
||||||
|
.privacy {
|
||||||
|
border-top: 1px {{ aSurveyInfo.options.questionborderstyle }} {{ aSurveyInfo.options.questionbordercolor }};
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.questionborder == "none" ) %}
|
||||||
|
.question-container,
|
||||||
|
#welcome-container,
|
||||||
|
.save-form,
|
||||||
|
#surveys-list-container,
|
||||||
|
.privacy {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
.question-container,
|
||||||
|
#welcome-container,
|
||||||
|
.save-form,
|
||||||
|
#surveys-list-container,
|
||||||
|
.privacy {
|
||||||
|
border-radius: {{ aSurveyInfo.options.questionborderradiusTL }}px {{ aSurveyInfo.options.questionborderradiusTR }}px {{ aSurveyInfo.options.questionborderradiusBR }}px {{ aSurveyInfo.options.questionborderradiusBL }}px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.question-title-container{
|
||||||
|
border-radius: {{ aSurveyInfo.options.questionborderradiusTL }}px {{ aSurveyInfo.options.questionborderradiusTR }}px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.questiondropdown == "on" ) %}
|
||||||
|
.question-container,
|
||||||
|
#welcome-container,
|
||||||
|
.privacy-block,
|
||||||
|
.save-form,
|
||||||
|
#surveys-list-container {
|
||||||
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy{
|
||||||
|
margin-top:30px;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if (aSurveyInfo.options.questiondropdown == "hover" ) %}
|
||||||
|
.question-container:hover,
|
||||||
|
#welcome-container:hover,
|
||||||
|
.save-form:hover,
|
||||||
|
#surveys-list-container:hover,
|
||||||
|
.privacy:hover {
|
||||||
|
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
.privacy{
|
||||||
|
margin-top:30px;
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
.navbar-light{
|
||||||
|
background-color: {{ aSurveyInfo.options.headerbackgroundcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-default .navbar-nav > li > a:hover {
|
||||||
|
color: {{ aSurveyInfo.options.fontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress {
|
||||||
|
background: {{ aSurveyInfo.options.progressbarbackgroundcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
label::after,
|
||||||
|
.radio-item label::after{
|
||||||
|
background-color: {{ aSurveyInfo.options.checkboxcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar {
|
||||||
|
background: {{ aSurveyInfo.options.progressbarcolor }};
|
||||||
|
color: {{ aSurveyInfo.options.progressbarfontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.question-container, #welcome-container {
|
||||||
|
background: {{ aSurveyInfo.options.questionbackgroundcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.question-help-container, .question-valid-container {
|
||||||
|
background: {{ aSurveyInfo.options.questionhelpbackgroundcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider-handle {
|
||||||
|
background: {{ aSurveyInfo.options.sliderhandlecolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background: {{ aSurveyInfo.options.primarycolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-primary{
|
||||||
|
background-color: {{ aSurveyInfo.options.questiontitlebackgroundcolor }};
|
||||||
|
color: {{ aSurveyInfo.options.questiontitlefontcolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover, .btn-primary:focus {
|
||||||
|
background: {{ aSurveyInfo.options.primarycolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-check:active+.btn-primary,
|
||||||
|
.btn-check:checked+.btn-primary,
|
||||||
|
.btn-primary.active,
|
||||||
|
.btn-primary:active,
|
||||||
|
.show>.btn-primary.dropdown-toggle,
|
||||||
|
.show > .btn-primary.dropdown-toggle,
|
||||||
|
.btn-primary:focus {
|
||||||
|
background: {{ aSurveyInfo.options.primarycolor }};
|
||||||
|
}
|
||||||
|
|
||||||
|
{% set checkicon = '"\\' ~ aSurveyInfo.options.checkicon ~ '"' %}
|
||||||
|
.checkbox-item input[type="checkbox"]:checked + label::after, .checkbox-item input[type="radio"]:checked + label::after {
|
||||||
|
content: {{ checkicon }};
|
||||||
|
}
|
||||||
|
</style>
|
||||||
67
views/subviews/header/nav_bar.twig
Normal file
67
views/subviews/header/nav_bar.twig
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
{#
|
||||||
|
LimeSurvey
|
||||||
|
Copyright (C) 2007-2017 The LimeSurvey Project Team / Louis Gac
|
||||||
|
All rights reserved.
|
||||||
|
License: GNU/GPL License v2 or later, see LICENSE.php
|
||||||
|
LimeSurvey is free software. This version may have been modified pursuant
|
||||||
|
to the GNU General Public License, and as distributed it includes or
|
||||||
|
is derivative of works licensed under the GNU General Public License or
|
||||||
|
other free or open source software licenses.
|
||||||
|
See COPYRIGHT.php for copyright notices and details.
|
||||||
|
|
||||||
|
(¯`·._.·(¯`·._.· Bootstrap Navigation Bar ·._.·´¯)·._.·´¯)
|
||||||
|
|
||||||
|
This file renders a typical bootstrap navigation bar.
|
||||||
|
See: https://getbootstrap.com/components/#navbar
|
||||||
|
|
||||||
|
For the survey navigator ("Next", "Back", etc.), see: navigation/navigator.twig
|
||||||
|
#}
|
||||||
|
{% if not aSurveyInfo.popupPreview %}
|
||||||
|
{% set navClass = "navbar-light bg-light" %}
|
||||||
|
{% if( aSurveyInfo.template == "bootswatch") %}
|
||||||
|
{% set navClass = "navbar-default bg-primary" %}
|
||||||
|
{% endif %}
|
||||||
|
<!-- Bootstrap Navigation Bar -->
|
||||||
|
{# ShowMenu used for navbar-toggler and navbar-collapse #}
|
||||||
|
{% set ShowMenu = (aSurveyInfo.aNavigator.load.show == "Y" or aSurveyInfo.aNavigator.save.show == "Y")
|
||||||
|
or ((aSurveyInfo.bShowClearAll == true or aSurveyInfo.bShowClearAll == null) and aSurveyInfo.options.showclearall == 'on')
|
||||||
|
or (aSurveyInfo.aQuestionIndex.bShow == true and aSurveyInfo.format != 'A')
|
||||||
|
or (aSurveyInfo.alanguageChanger.show)
|
||||||
|
%}
|
||||||
|
<div id="survey-nav" class="navbar {{ navClass }} navbar-expand-md fixed-top border-bottom pt-0 pb-0">
|
||||||
|
<div class="container-fluid">
|
||||||
|
{% if ShowMenu %}
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar"
|
||||||
|
aria-controls="small-screens-menus" aria-expanded="false">
|
||||||
|
<span class="visually-hidden-focusable">{{ gT("Tools") }}</span>
|
||||||
|
<span class="navbar-toggler-icon" aria-hidden="true"></span>
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
|
{# Logo option #}
|
||||||
|
{% if( aSurveyInfo.options.brandlogo == "on") %}
|
||||||
|
<div class="navbar-brand logo-container d-none d-md-block">
|
||||||
|
{{ image(aSurveyInfo.options.brandlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="navbar-brand">
|
||||||
|
{{ aSurveyInfo.name }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if( aSurveyInfo.options.secondlogo == "on") %}
|
||||||
|
<div class="navbar-brand logo-container d-none d-md-block">
|
||||||
|
{{ image(aSurveyInfo.options.secondlogofile, aSurveyInfo.name, {"class": "logo img-fluid"}) }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if ShowMenu %}
|
||||||
|
<div id="navbar" class="collapse navbar-collapse navbar-nav-scroll pt-2">
|
||||||
|
<ul class="nav navbar-nav navbar-action-link navbar-right ms-auto">
|
||||||
|
{{ include('./subviews/navigation/save_links.twig') }}
|
||||||
|
{{ include('./subviews/navigation/clearall_links.twig') }}
|
||||||
|
{{ include('./subviews/navigation/question_index_menu.twig') }}
|
||||||
|
{{ include('./subviews/navigation/language_changer_top_menu.twig') }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue