-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
4.1
-
None
-
MOODLE_401_STABLE
If you have fixed content, like a form in a modal which is manually written, and you wish to add help icons, you currently have to call get_string and put the resolved stirng into the context.
This. Is. Nuts.
Lets use Mustache blocks, that is:
<a class="btn btn-link p-0" role="button"
|
data-container="body" data-toggle="popover"
|
data-placement="{{#ltr}}right{{/ltr}}{{^ltr}}left{{/ltr}}" data-content="{{$text}}{{text}}{{/text}} {{$completedoclink}}{{completedoclink}}{{/completedoclink}}" data-html="true" tabindex="0" data-trigger="focus">
|
That is, adding a $text tag arouind the text.
This will be backwards compatible but allow templates to include the help_icon:
{{< core/help_icon }}
|
{{$text}}{{#str}} somestr, moodle {{/str}}{{/text}}
|
{{$completedoclink}}{{/completedoclink}}
|
{{/ core/help_icon }}
|
- is blocked by
-
MDL-51145 Templates with blocks can't include other templates with blocks
-
- Development in progress
-