/**
 * @param $this SLN_Admin_Settings
 */
function sln_availability_row($prefix, $row)
{
    ?>
    <div class="col-md-12">
        <div class="first-row">
        <?php 
    foreach (SLN_Func::getDays() as $k => $day) {
        ?>
            <div class="form-group">
                <label>
                    <?php 
        SLN_Form::fieldCheckbox($prefix . "[days][{$k}]", isset($row['days'][$k]) ? 1 : null);
        ?>
                    <?php 
        echo substr($day, 0, 3);
        ?>
</label>
            </div>
        <?php 
    }
    ?>
        </div>
        <div class="second-row">
            <?php 
    foreach (array(0, 1) as $i) {
        ?>
                <?php 
        foreach (array('from' => __('From', 'sln'), 'to' => __('To', 'sln')) as $k => $v) {
            ?>
                    <div class="form-group">
                        <label for="<?php 
            echo SLN_Form::makeID($prefix . "[{$k}][{$i}]");
            ?>
">
                            <?php 
            echo $v;
            ?>
                        </label>
                        <?php 
            SLN_Form::fieldTime($prefix . "[{$k}][{$i}]", $row[$k][$i]);
            ?>
                    </div>
                <?php 
        }
        ?>
            <?php 
    }
    ?>
        </div>
    </div>
<?php 
}
    public static function showFieldText($field, $label, $val)
    {
        ?>
        <div class="form-group sln_meta_field">
            <label for="<?php 
        echo $field;
        ?>
"><?php 
        echo $label;
        ?>
</label>
            <?php 
        SLN_Form::fieldText($field, $val);
        ?>
        </div>
    <?php 
    }
    ?>

            <?php 
    SLN_Form::fieldCheckbox('sln[services][' . $service->getId() . ']', $bb->hasService($service), $settings);
    ?>
            </span>
            </div>
            <div class="col-lg-<?php 
    echo $showPrices ? '8' : '11';
    ?>
 col-xs-<?php 
    echo $showPrices ? '7' : '11';
    ?>
">
                <label for="<?php 
    echo SLN_Form::makeID('sln[services][' . $service->getId() . ']');
    ?>
">
                    <strong class="service-name"><?php 
    echo $service->getName();
    ?>
</strong>
                    <span class="service-description"><?php 
    echo $service->getContent();
    ?>
</span>
                    <?php 
    if ($service->getDuration()->format('H:i') != '00:00') {
        ?>
                        <span class="service-duration"><?php 
        echo __('Duration', 'sln');
                <?php 
SLN_Form::fieldTextarea($helper->getFieldName($postType, 'note'), $booking->getNote());
?>
            </div>
        </div>
    </div>
    <div class="sln-separator"></div>
    <div class="row">
        <div class="col-md-3 col-sm-4">
            <div class="form-group sln_meta_field ">
                <label><?php 
_e('Duration', 'sln');
?>
</label>
                <?php 
SLN_Form::fieldTime($helper->getFieldName($postType, 'duration'), $booking->getDuration(), array('interval' => 10, 'maxItems' => 61));
?>
            </div>
        </div>
        <div class="col-md-3 col-sm-4">
            <?php 
$helper->showFieldtext($helper->getFieldName($postType, 'amount'), __('Amount', 'sln') . ' (' . $settings->getCurrencySymbol() . ')', $booking->getAmount());
?>
        </div>
        <div class="col-md-6 col-sm-4">
            <div class="form-group">
                <label for="">Transaction</label>

                <p><?php 
echo $booking->getTransactionId() ? $booking->getTransactionId() : __('n.a.', 'sln');
?>
        echo $label;
        ?>
</label>
                        <?php 
        if ($field == 'phone' && ($prefix = $plugin->getSettings()->get('sms_prefix'))) {
            ?>
                        <div class="input-group">
                            <span class="input-group-addon"><?php 
            echo $prefix;
            ?>
</span>
                        <?php 
        }
        ?>
                        <?php 
        SLN_Form::fieldText('sln[' . $field . ']', $bb->get($field), array('required' => true));
        ?>
                            <?php 
        if ($field == 'phone' && isset($prefix)) {
            ?>
                                </div>
                            <?php 
        }
        ?>
                    </div>
                </div>
            <?php 
    }
    ?>
        </div>
        <?php 
				<?php 
}
?>
            </ul>
        </div>
    </div>

    <br/>
    <div class="row">
    <div class="form-group">
        <label><?php 
_e('Do you have any message for us?', 'sln');
?>
</label>
        <?php 
SLN_Form::fieldTextarea('sln[note]', $bb->get('note'), array('attrs' => array('placeholder' => __('Leave a message', 'sln'))));
?>
        
    
    <p class="ty">
            <strong><?php 
_e('Terms & conditions', 'sln');
?>
</strong>
        </p>
        
        
        <p class="ty">
            <?php 
echo $plugin->getSettings()->get('gen_timetable');
?>
        echo get_the_post_thumbnail($attendant->getId(), 'thumbnail');
    }
    ?>
                </div>


            </div>




            <div class="col-lg-8 col-md-6 col-xs-6">


                <label for="<?php 
    echo SLN_Form::makeID('sln[attendant][' . $attendant->getId() . ']');
    ?>
">
                    <strong class="attendant-name"><?php 
    echo $attendant->getName();
    ?>
</strong>
                    <span class="attendant-description"><?php 
    echo $attendant->getContent();
    ?>
</span>
                </label>
            </div>
        </div>
        <div class="clearfix"></div>
        <?php 
    function row_input_textarea($key, $label, $settings = array())
    {
        if (!isset($settings['textarea'])) {
            $settings['textarea'] = array();
        }
        ?>
        <div class="form-group">
            <label for="salon_settings_<?php 
        echo $key;
        ?>
"><?php 
        echo $label;
        ?>
</label></th>
            <?php 
        SLN_Form::fieldTextarea("salon_settings[{$key}]", $this->getOpt($key), $settings['textarea']);
        ?>
            <?php 
        if (isset($settings['help'])) {
            ?>
<p class="help-block"><?php 
            echo $settings['help'];
            ?>
</p><?php 
        }
        ?>
        </div>
    <?php 
    }
        <div class="col-md-3 col-sm-4">
             <label for="salon_settings_pay_currency"><?php 
_e('Set your currency', 'sln');
?>
</label>
                <?php 
echo SLN_Form::fieldCurrency("salon_settings[pay_currency]", $this->settings->getCurrency());
?>
        </div>
        <div class="col-md-3 col-sm-4">
             <label for="salon_settings_pay_currency_pos"><?php 
_e('Set your currency position', 'sln');
?>
</label>
                 <?php 
echo SLN_Form::fieldSelect('salon_settings[pay_currency_pos]', array('left' => __('on left side'), 'right' => __('on right side')), $this->settings->get('pay_currency_pos'), array(), true);
?>
        </div>
 
    </div> 
    <div class="clearfix"></div>
            <div class="sln-separator"></div>
    <div class="row">
        <div class="col-md-4 col-sm-6">
            <div class="form-group">
                <?php 
$this->row_input_checkbox('pay_paypal_test', __('Enable PayPal sandbox', 'sln'));
?>
                <p><?php 
_e('Check this option to test PayPal payments<br /> using your PayPal Sandbox account.', 'sln');
?>
    _e('select a day', 'sln');
    ?>
</label>
                    <?php 
    SLN_Form::fieldJSDate('sln[date]', $date);
    ?>
                </div>
            </div>
        </div>
        <div class="row">
           <div class="col-md-12">
                <div class="form-group">
                    <label for="<?php 
    echo SLN_Form::makeID('sln[date][time]');
    ?>
"><?php 
    _e('select an hour', 'sln');
    ?>
</label>
                    <?php 
    SLN_Form::fieldJSTime('sln[time]', $date, array('interval' => $plugin->getSettings()->get('interval')));
    ?>
                </div>
            </div>
        </div>
        <?php 
    include "_form_actions.php";
    ?>
    </form>
<?php 
}
}
?>
    </div>
    <div class="col-xs-6 col-md-3 col-lg-2 col-sm-3  services-notavailable-h">
        <label>
            <?php 
echo __('From', 'sln');
?>
            <?php 
SLN_Form::fieldTime($helper->getFieldName($postType, 'notav_from'), $service->getNotAvailableFrom());
?>
        </label>
    </div>
    <div class="col-xs-6 col-md-3 col-lg-2 col-sm-3  services-notavailable-h">
        <label>
            <?php 
echo __('To', 'sln');
?>
            <?php 
SLN_Form::fieldTime($helper->getFieldName($postType, 'notav_to'), $service->getNotAvailableTo());
?>
        </label>

    </div>
</div>
<em><?php 
_e('Leave this option blank if you want this service available for every hour each day', 'sln');
?>
</em>
<div class="sln-clear"></div>
            <?php 
$this->row_input_checkbox('sms_enabled', __('Enable SMS verification', 'sln'));
?>
            <p><?php 
_e('Avoid spam asking your users to verify their identity with an SMS verification code during the first registration.', 'sln');
?>
</p>
            <label>        <?php 
_e('Select your service provider', 'sln');
?>
</label>
            <?php 
$field = "salon_settings[sms_provider]";
?>
            <?php 
echo SLN_Form::fieldSelect($field, SLN_Enum_SmsProvider::toArray(), $this->getOpt('sms_provider'), array(), true);
?>
            <!-- form-group END -->

            <div class="row">
                <div class="col-md-6 col-sm-6">
                    <?php 
$this->row_input_text('sms_account', __('Account', 'sln'));
?>
                </div>
                <div class="col-md-6 col-sm-6">
                    <?php 
$this->row_input_text('sms_password', __('Password', 'sln'));
?>
                </div>
                <div class="col-md-6 col-sm-6">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="<?php 
    echo SLN_Form::makeID('sln_verification');
    ?>
">
                        <?php 
    _e('digit your verification code', 'sln');
    ?>
                    </label>
                </div>
            </div>
                        <div class="col-md-6">
                <div class="form-group">
                   <?php 
    SLN_Form::fieldText('sln_verification', '', array('required' => true));
    ?>
                    <a href="<?php 
    echo $formAction;
    ?>
&resend=1" class="recover">
                        <?php 
    _e('I didn\'t received the code, please send it again', 'sln');
    ?>
                    </a>
                </div>
            </div>
        </div>
        <?php 
    include "_form_actions.php";
    ?>
    </div>
    <div class="col-xs-6 col-md-3 col-lg-2 col-sm-3  attendants-notavailable-h">
        <label>
            <?php 
echo __('From', 'sln');
?>
            <?php 
SLN_Form::fieldTime($helper->getFieldName($postType, 'notav_from'), $attendant->getNotAvailableFrom());
?>
        </label>
    </div>
    <div class="col-xs-6 col-md-3 col-lg-2 col-sm-3  attendants-notavailable">
        <label>
            <?php 
echo __('To', 'sln');
?>
            <?php 
SLN_Form::fieldTime($helper->getFieldName($postType, 'notav_to'), $attendant->getNotAvailableTo());
?>
        </label>
    </div>
    <div class="col-xs-12 col-md-12 col-lg-12 col-sm-12  attendants-notavailable-h">
    <em><?php 
_e('Leave this option blank if you want this assistant available for every hour each day', 'sln');
?>
</em>
</div>

</div>
<div class="sln-clear"></div>