{* DELETE modal *}
{capture "schedule_delete"}
    {intl l="Do you really want to remove this schedule entry ?" d="pointretrait"}
    <input type="hidden" name="schedule_id" id="attr-place-schedule-id-delete" value=""/>
    <input type="hidden" name="place_id" value="{$smarty.get.place_id}"/>
    <input type="hidden" name="success_url" value="{url path="/admin/module/PointRetrait/edit?area_id={$area_id}#schedule"}"/>
{/capture}

{include file="includes/generic-confirm-dialog.html"
        dialog_id       = "place-schedule-delete"
        dialog_title    = {intl l="Delete an entry of schedule" d="pointretrait"}
        dialog_message  = {$smarty.capture.schedule_delete nofilter}
        dialog_ok_label     = {intl l="Delete"}
        dialog_cancel_label = {intl l="Cancel"}
        form_action         = {token_url path='/admin/module/PointRetrait/schedule/delete'}
}


{* UPDATE Modal*}
{form name="pdr.place.update.schedule"}
    {capture "schedule_update"}
        {form_field form=$form field="place-schedule_id"}
        <input type="hidden" name="schedule_id" id="attr-place-schedule-id-update" value=""/>
        {/form_field}
        {form_field form=$form field="place_id"}
        <input type="hidden" name="place_id" id="place_id" value="{$smarty.get.place_id}"/>
        {/form_field}

        {include file="form/place-schedule-create.html" form_name="pdr.place.update.schedule" update=true}
    {/capture}

    {include file="includes/generic-create-dialog.html"
            dialog_id       = "place-schedule-update"
            dialog_title    = {intl l="Edit this withdrawal day" d="pointretrait"}
            dialog_body     = {$smarty.capture.schedule_update nofilter}
            dialog_ok_label     = {intl l="Save"}
            dialog_cancel_label = {intl l="Cancel"}
            form_action        = {url path='admin/module/PointRetrait/schedule/update'}
            form_enctype       = {form_enctype form=$form}
    }
{/form}


{* CREATE Modal *}
{form name="pdr.place.create.schedule"}
    {capture "schedule_create"}
        {include file="form/place-schedule-create.html" form_name="pdr.place.create.schedule" place_id=$smarty.get.place_id}
    {/capture}

    {include file="includes/generic-create-dialog.html"
            dialog_id       = "place-schedule-create"
            dialog_title    = {intl l="Add a new withdrawal day" d="pointretrait"}
            dialog_body     = {$smarty.capture.schedule_create nofilter}
            dialog_ok_label     = {intl l="Create"}
            dialog_cancel_label = {intl l="Cancel"}
            form_action        = {url path="admin/module/PointRetrait/schedule/create"}
            form_enctype       = {form_enctype form=$form}
    }
{/form}