MDL-52198 cbe: Fix template docs for user selector summary

This commit is contained in:
Damyon Wiese 2015-11-30 10:53:25 +08:00 committed by Frederic Massart
parent f896aa5126
commit ac9e4b8188

View file

@ -15,7 +15,7 @@
along with Moodle. If not, see <http://www.gnu.org/licenses/>. along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}} }}
{{! {{!
@template core/form_autocomplete_suggestions @template tool_lp/form-user-selector-suggestion
Moodle template for the list of valid options in an autocomplate form element. Moodle template for the list of valid options in an autocomplate form element.
@ -26,14 +26,27 @@
* none * none
Context variables required for this template: Context variables required for this template:
* suggestionsId The dom id of the current suggestions list. * profileimageurlsmall Url to a small profile image.
* options List of options with label and value fields. * profileimageurl Url to a profile image.
* fullname Users full name
* hasidentity boolean to say if there are identity fields to show
* identity concatenated list of identity fields.
* id user id field
* email user email field
* idnumber user idnumber field
* phone1 user phone1 field
* phone2 user phone2 field
* department user department field
* institution user institution field
Example context (json): Example context (json):
{ "suggestionsId": 1, "options": [ { "id": "1",
{ "label": "Item label with <strong>tags</strong>", "value": "5" }, "fullname": "Admin",
{ "label": "Another item label with <strong>tags</strong>", "value": "4" } "hasidentity": true,
]} "identity": "Admin User, 0144114141",
"profileimageurl": "invalid url",
"profileimageurlsmall": "invalid url"
}
}} }}
<span> <span>
<img height="18" src="{{profileimageurlsmall}}" alt="" role="presentation"> <img height="18" src="{{profileimageurlsmall}}" alt="" role="presentation">