Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LouisGac
committed
Jan 20, 2017
1 parent
0c64e38
commit 7ee3b0b
Showing
1 changed file
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? This 2 hidden input must not be included by PHP core code directly ? Like the YII_CRSF_TOKEN in fact ?
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the HTML is rendered at once from the the twig layout, and then the inclusions. We can't keep any rendering process by echoing strings from SurveyRuntime helper (that was the main goal of all that process).
Maybe we could still force it to be "core" by changing the inclusion path of that file, and putting it outside of template. But what would be the benefit?
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe : C.Html.form to C.Html.lsform ?
I don't like too to have
enctype
in form ... :\7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, but what if a survey creator want to add new attributes to the main form?
https://github.com/LimeSurvey/LimeSurvey/blob/twig-layout/templates/default/views/subviews/start_form.twig#L27
Or if they want to completely remove the form logic, for example to do some 100% ajax stuff putting all the questions outside the form itself ? Or if they want to completely change the logic of the hidden submit button?
Here, survey creators are free to do what ever they want, and maybe they will use those new possibilities to do things we just can't imagine right now.
On our side, if we change the hidden filed name logic, or the form logic, it will completely break all the custom JS, workarounds, etc. forcing us to publish a new major version... So, making that part a core feature will not make it easier to update those logic.
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Survey VS template VS extension/plugin
But here : you put the breaking things, no ?
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, anything in rendering is now a template feature.
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then no extension can render something ?
7ee3b0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In joomla, you have three layers:
Templates, Modules, plugins.
We're getting much closer to that logic. But maybe it will be better that we discuss about that on the IRC.