<a class="py-0 font-weight-normal c-pointer" onclick="showStagPopup('client-{{ $key }}')">Edit</a>
<div class="stag-popup mcp-theme-1 {{ isset($class) ? $class : '' }}" stag-popup-key="client-{{ $key }}">
    <?php
    $contentData = false;
    if ($patient->canvas_data) {
        $canvasData = json_decode($patient->canvas_data, true);
        if (isset($canvasData[$key])) {
            $contentData = $canvasData[$key];
        }
    }
    ?>
    <form method="POST" action="/api/client/updateCanvasData">
        <input type="hidden" name="uid" value="{{$patient->uid}}">
        <input type="hidden" name="key" value="{{$key}}">

        @include("app.patient.canvas-sections.{$key}.form")

        <div class="form-group m-0 d-flex">
            <button type="button" class="btn btn-sm btn-primary mr-2" onclick="return submitStagPopup($(this).closest('form'))">Submit</button>
            <button type="button" class="btn btn-sm btn-default border" onclick="return closeStagPopup()">Cancel</button>
        </div>
    </form>
</div>
