{{!
    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 mod_certificatebeautiful/formgroup_create-page

    Example context (json):
    {
      "add-new-page": true,
      "add-new-page-link": "https://example.com/add-new-page",
      "mod_certificatebeautiful/list-certificate": {
        "certificates": [
          {
            "add-new-page": true,
            "add-new-page-link": "https://example.com/certificado1"
          }
        ]
      }
    }
}}

<div class="form-group row fitem">
    <div class="col-md-3 col-form-label d-flex pb-0 pr-md-0">
        <label class="d-inline word-break">
            {{#str}}pages_certificate, certificatebeautiful{{/str}}
        </label>
    </div>
    <div class="col-md-9 form-inline align-items-start felement" data-fieldtype="text">
        <div>
            {{> mod_certificatebeautiful/list-certificate }}

            {{#add-new-page}}
                <div class="mt-4">
                    <a href="{{{add-new-page-link}}}"
                       class="btn btn-info add-new pt-1 pb-1">
                        {{#str}}add_new_page, certificatebeautiful{{/str}}</a>
                </div>
            {{/add-new-page}}
        </div>
    </div>
</div>
