<!-- PayPal -->
<div class="tab-pane" id="paypal">
    <div class="alert alert-info">
        <div class="icon">
            <i class="fa fa-info-circle fa-2x"></i>
        </div>
        <div class="text">
            To start using Paypal, you'll need to create an account at <a target="_blank" href="https://developer.paypal.com/">Paypal</a><br>
            Check the documentation for more help
        </div>
    </div>

    <form class="js_ajax-forms col-md-9 form-horizontal" data-url="/{$module_name}/updatePayPalSettings">
        <input type="hidden" name="site_id" value="{$paypalConfiguration.SITE_ID}"/>
        <div class="form-group form-row">
            <label class="col-sm-3 control-label text-left">
                PayPal Enabled
            </label>
            <div class="col-sm-9">
                <label class="switch" for="paypal_enabled">
                    <input type="checkbox" name="paypal_enabled" id="paypal_enabled" {if $paypalConfiguration.PAYPAL_ENABLED == '1'}checked="checked"{/if}>
                    <span class="slider round"></span>
                </label>
                <span class="help-block">
                    Enable payments via Paypal
                </span>
            </div>
        </div>
        <div class="form-group form-row">
            <label class="col-sm-3 control-label text-left">
                Default
            </label>
            <div class="col-sm-9">
                <label class="switch" for="default_method_paypal">
                    <input type="checkbox" name="default_method_enabled" id="default_method_paypal" {if $paypalConfiguration.PAYMENT_METHOD_DEFAULT == 'paypal'}checked="checked"{/if}>
                    <span class="slider round"></span>
                </label>
                <span class="help-block">
                    Make it the default payment method of the site
                </span>
            </div>
        </div>
        <div class="form-group form-row">
            <label class="col-sm-3 control-label text-left">
                PayPal Mode
            </label>
            <div class="col-sm-9">
                <div class="radio radio-primary radio-inline">
                    <input type="radio" name="paypal_mode" id="paypal_live" {if $paypalConfiguration.PAYPAL_MODE == 'live'}checked{/if} value="live">
                    <label for="paypal_live">Live</label>
                </div>
                <div class="radio radio-primary radio-inline">
                    <input type="radio" name="paypal_mode" id="paypal_sandbox" {if $paypalConfiguration.PAYPAL_MODE == 'sandbox'}checked{/if} value="sandbox">
                    <label for="paypal_sandbox">Sandbox</label>    
                </div>
            </div>
        </div>
        <div class="form-group form-row">
            <label class="col-sm-3 control-label text-left">
                PayPal Client ID
            </label>
            <div class="col-sm-9">
                <input class="form-control" type="text" name="paypal_client_id" id="paypal_client_id" maxlength="255" value="{$paypalConfiguration.PAYPAL_CLIENT_ID}">
            </div>
        </div>
        <div class="form-group form-row">
            <label class="col-sm-3 control-label text-left">
                PayPal Secret Key
            </label>
            <div class="col-sm-9">
                <input class="form-control" type="text" name="paypal_secret_key" id="paypal_secret_key" maxlength="255" value="{$paypalConfiguration.PAYPAL_SECRET_KEY}">
            </div>
        </div>

        <div class="form-group form-row">
            <div class="col-sm-9 offset-sm-3">
                <!-- success -->
                <div class="alert alert-success mt10 x-hidden" role="alert"></div>
                <!-- success -->

                <!-- error -->
                <div class="alert alert-danger mt10 x-hidden" role="alert"></div>
                <!-- error -->

                <button type="submit" class="btn btn-info">Save Changes</button>
            </div>
        </div>
    </form>
</div>
<!-- PayPal -->