<?php
/**@var \Magetop\Advancepreview\Block\Adminhtml\Product\Edit\PreviewDailyShipping $block */
$id = $block->getRequest()->getParam('daily_shipping_id',0);
$productId = $block->getRequest()->getParam('product_id',0);
$dailyData = $block->getDailyShippingItem($id, $productId);
?>

<form action="/" method="post" id="preview-product-daily-shipping-form" enctype="multipart/form-data">
    <input type="hidden" name="form_key" value="<?php echo $block->getFormKey(); ?>">
    <input type="hidden" name="product_id" value="<?php echo $productId; ?>">
    <input type="hidden" name="daily_shipping_id" value="<?php echo $id; ?>">
    <label for="txt-delivery-type"><?php echo __('Delivery Type') ?></label>
    <input type="text" id="txt-delivery-type" name="delivery_type" class="admin__control-text" value="<?php echo $dailyData['delivery_type'] ?>" placeholder="<?php echo __('Delivery Type') ?>">
    <label for="txt-delivery-days"><?php echo __('Delivery days') ?></label>
    <input type="number" id="txt-delivery-days" name="delivery_days" value="<?php echo $dailyData['delivery_days'] ?>" placeholder="<?php echo __('Delivery days') ?>" class="admin__control-text">
    <label for="txt-preview-daily-shipping-price"><?php echo __('Delivery charge %') ?></label>
    <input type="number" id="txt-preview-daily-shipping-price" name="amount" value="<?php echo $dailyData['amount']; ?>" placeholder="<?php echo __('Amount') ?>" class="admin__control-text" data-validate='{"required":true}'>
    <br/>
    <button type="button" id="btn-save-preview-daily-shipping"><?php echo __('Save') ?></button>
    <button type="button" id="btn-close-preview-daily-shipping"><?php echo __('Close') ?></button>
</form>
