How to add assets field to control panel plugin template So, a date field can be added to a plugin template within the control panel using:

{% from "_includes/forms" import date %}
{{ date({
        id: 'fields-invoiceDate',
        name: 'fields[invoiceDate]'
}) }}


But how do you go about adding an assets field a similar way?
Something like this...

{{ forms.elementSelect({
    id: 'invoicePdf',
    name: 'fields[invoicePdf]',
    elementType: craft.elements.getElementType("Asset"),
    elements: invoice.invoicePdf | default,
    criteria: {"kind":[],"localeEnabled":null,"locale":"en_gb"},
    jsClass: 'Craft.AssetSelectInput',
    addButtonLabel: 'Upload invoice',
    limit: 1,
    sources: ['folder:1']
}) }}