<div class="container-fluid">
    <div class="block-header">
        <h2>Settings > E-mail Settings</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-8 col-md-8 ">
            <div class="card">
                <div class="header">
                    <h2>E-mail Settings</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success sms-settings-alert"></div>
                    <form class="sms-settings" method="POST">
                        <label for="sms_provider">SMS Provider</label>
                        <select class="form-control show-tick" id="sms_provider" name="sms_provider">
                            <option value="twilio" <?php echo ($music->config->sms_provider == 'twilio') ? 'selected': '';?>>Twilio</option>
                        </select>
                        <br>
                        <br>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="twilio_username" name="twilio_username" class="form-control" value="{{CONFIG twilio_username}}">
                                <label class="form-label">Twilio Username</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="twilio_password" name="twilio_password" class="form-control" value="{{CONFIG twilio_password}}">
                                <label class="form-label">Twilio Password</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="sms_t_phone_number" name="sms_t_phone_number" class="form-control" value="{{CONFIG sms_t_phone_number}}">
                                <label class="form-label">Twilio Phone number</label>
                            </div>
                        </div>
                        <!-- <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="smtp_password" name="smtp_password" class="form-control" value="{{CONFIG smtp_password}}">
                                <label class="form-label">SMTP Password</label>
                            </div>
                        </div>
                        <div class="form-group form-float">
                            <div class="form-line">
                                <input type="text" id="smtp_port" name="smtp_port" class="form-control" value="{{CONFIG smtp_port}}">
                                <label class="form-label">SMTP Port</label>
                            </div>
                        </div>
                        <label for="smtp_encryption">SMTP Encryption</label>
                        <div class="form-group">
                            <input type="radio" name="smtp_encryption" id="smtp_encryption-enabled" value="tls" <?php echo (strtolower($music->config->smtp_encryption) == 'tls') ? 'checked': '';?>>
                            <label for="smtp_encryption-enabled">TLS</label>
                            <input type="radio" name="smtp_encryption" id="smtp_encryption-disabled" value="ssl" <?php echo (strtolower($music->config->smtp_encryption) == 'ssl') ? 'checked': '';?>>
                            <label for="smtp_encryption-disabled" class="m-l-20">SSL</label>
                        </div> -->
                        <button type="submit" id="save_btn" class="btn btn-primary m-t-15 waves-effect">Save</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function() {
    var form_sms_settings = $('form.sms-settings');

    form_sms_settings.ajaxForm({
        url: '{{LINK aj/ap/save-settings}}',
        beforeSend: function() {
            $('#save_btn').text("{{LANG please_wait}}");
        },
        success: function(data) {
            if (data.status == 200) {
            	$('#save_btn').text('Save');
            	$('.sms-settings-alert').html('<i class="fa fa-check"></i> Settings updated successfully');
            	setTimeout(function () {
            		$('.sms-settings-alert').empty();
            	}, 2000);
            }
        }
    });
});
</script>