{{!
    This file is part of Moodle - https://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template koperedashboard_attest/edit

    Example context (json):
    {
        "formhtml": "<form action=\"#\" method=\"post\"><input type=\"text\" name=\"name\" value=\"Enrollment Certificate\"></form>",
        "placeholders": [
            {
                "group": "User",
                "items": [
                    {
                        "key": "[user_id]",
                        "desc": "User ID"
                    },
                    {
                        "key": "[user_fullname]",
                        "desc": "User full name"
                    },
                    {
                        "key": "[user_firstname]",
                        "desc": "User first name"
                    }
                ]
            },
            {
                "group": "Course",
                "items": [
                    {
                        "key": "[course_id]",
                        "desc": "Course ID"
                    },
                    {
                        "key": "[course_fullname]",
                        "desc": "Course full name"
                    },
                    {
                        "key": "[course_summary]",
                        "desc": "Course summary in HTML"
                    }
                ]
            },
            {
                "group": "Attestation",
                "items": [
                    {
                        "key": "[validuntil]",
                        "desc": "Attestation expiration date"
                    },
                    {
                        "key": "[created]",
                        "desc": "Attestation creation date"
                    },
                    {
                        "key": "[verifyurl]",
                        "desc": "Verification URL"
                    }
                ]
            }
        ]
    }
}}

<div class="local-kopere_dashboard-grid">
    <div class="kopere_dashboard-card">
        {{{formhtml}}}
    </div>

    <div class="kopere_dashboard-card">
        <h3>{{#str}}placeholders_title, koperedashboard_attest{{/str}}</h3>

        {{#placeholders}}
            <div style="margin-bottom: 12px;">
                <strong>{{{group}}}</strong>
                <ul style="margin-top: 6px;">
                    {{#items}}
                        <li>
                            <code>{{{key}}}</code>
                            -
                            <span class="muted">{{{desc}}}</span>
                        </li>
                    {{/items}}
                </ul>
            </div>
        {{/placeholders}}
    </div>
</div>
