{{!
    This file is part of Moodle - http://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 blocl_coupon/requestdetails

    Request details.

    Example context (json):
    {
        "ownerfullname": "Full name of owner",
        "emailto": "Recipient email",
        "amount": "Coupon amount",
        "codesize": "Coupon code size",
        "redirecturl": "Redirect URL",
        "generatesinglepdfs": "Whether or not to generate single PDF files",
        "renderqrcode": "Whether or not to generate a QR code",
        "logo": "Coupon background/logo",
        "enrolperiod": "Enrolment period",
        "type": "Coupon type",
        "hascourses": "Whether ot not we have courses",
        "courses":[{
            "fullname": "Course full name",
            "idnumber": "Optional ID number"
        }],
        "hascohorts": "Whether ot not we have cohorts",
        "cohorts":[{
            "name": "Cohort name",
            "idnumber": "Optional ID number"
        }]
    }
}}
<table>
<tr><td>{{#str}}th:owner, block_coupon{{/str}}</td><td>{{ownerfullname}}</td></tr>
<tr><td>{{#str}}email{{/str}}</td><td>{{emailto}}</td></tr>
<tr><td>{{#str}}label:coupon_amount, block_coupon{{/str}}</td><td>{{amount}}</td></tr>
<tr><td>{{#str}}label:coupon_code_length, block_coupon{{/str}}</td><td>{{codesize}}</td></tr>
<tr><td>{{#str}}label:redirect_url, block_coupon{{/str}}</td><td>{{redirecturl}}</td></tr>
<tr><td>{{#str}}label:generate_pdfs, block_coupon{{/str}}</td><td>{{#generatesinglepdfs}}{{#str}}yes{{/str}}{{/generatesinglepdfs}}{{^generatesinglepdfs}}{{#str}}no{{/str}}{{/generatesinglepdfs}}</td></tr>
<tr><td>{{#str}}label:renderqrcode, block_coupon{{/str}}</td><td>{{#renderqrcode}}{{#str}}yes{{/str}}{{/renderqrcode}}{{^renderqrcode}}{{#str}}no{{/str}}{{/renderqrcode}}</td></tr>
<tr><td>{{#str}}label:logo, block_coupon{{/str}}</td><td>{{logo}}</td></tr>
<tr><td>{{#str}}th:enrolperiod, block_coupon{{/str}}</td><td>{{{enrolperiod}}}</td></tr>
<tr><td>{{#str}}label:coupon_type, block_coupon{{/str}}</td><td>{{type}}</td></tr>
{{#hascourses}}
<tr><td>{{#str}}label:coupon_courses, block_coupon{{/str}}</td><td>
{{#courses}}
{{fullname}}{{#idnumber}}{{idnumber}}){{/idnumber}}<br/>
{{/courses}}
</td></tr>
{{/hascourses}}
{{#hascohorts}}
<tr><td>{{#str}}label:coupon_cohorts, block_coupon{{/str}}</td><td>
{{#cohorts}}
{{name}}{{#idnumber}}{{idnumber}}){{/idnumber}}<br/>
{{/cohorts}}
</td></tr>
{{/hascohorts}}
</table>