Hi, i need to edit theme of fileupload question. In detail, I need to add the link for file download.
in LS 2.6 I had do modify modaldialog.js file.
How can I obtain same result in LS 4.5.2+ by eventually editing question theme?
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
I didn't have time to search for theming the question, so I edited the main file
application/views/survey/questions/answer/file_upload/answer.twig
and I edited rows from 122:
$(document).ready(function(){
{% set count = -1 %}
{% set surveyid = fileid|split("X")[0] %}
{% for item in value|split('"filename":"') %}
$('#a_{{fileid}}{{count}}').attr("href", "/upload/surveys/{{surveyid}}/files/{{item|split('"')[0]}}");
{% set count = count + 1 %}
{% endfor %}
});
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
If you want a custom theme for all surveys using the survey theme, copy the /file_upload folder into /upload/themes/survey/yourTheme/views/survey/questions/answer/ and edit the files there.
Editing the core files leaves you exposed to overwriting when updating.[/i]
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.