<?php
/*
 * Copyright (c) 2019 Earworks.
 * Codeigniter Project Template Modification
 * Please contact our email for more information :
 *  contact@earworks.co.id
 */
defined('BASEPATH') OR exit('No direct script access allowed');
$this->load->title = $this->lang->line('register');
$this->load->add_map($this->load->title);
$error = validation_errors();


$status_type = array(
    1 => 'Coorporate',
    2 => 'Media',
    3 => 'Internal',
);
?>
<?php echo form_open('backoffice/register/media', array('class' => 'login-form')) ?>
<h3 class="form-title">Register Form.</h3>
<?php if ($error) : ?>
    <div class="alert alert-danger">
        <button class="close" data-close="alert"></button>
        <span><?php echo $error ?></span>
    </div>
<?php endif; ?>
<div class="form-group">
    <label class="control-label"
    style="color: white;"><?php echo $this->lang->line('cardname') ?> :</label>
    <?php foreach ($card as $k => $v) : ?>
        <?php
<<<<<<< HEAD
        if (!in_array($k, array(2,8))) {
=======
        if (!in_array($k, array(1,2,8))) {
>>>>>>> c97bb463d7d1b556da7e798cac7455b71d077454
            continue;
        }
        ?>
        <label class="radiomercedes">
        <?php
        echo form_radio('cardid', $k, ($k == 2) ? true : false);
        ?>
        <span class="checkmark check-<?php echo $v ?>"></span>
        </label>
    <?php endforeach; ?>
</div>
<div class="form-group">
    <label class="control-label" style="color: white;"><?php echo $this->lang->line('companyname') ?> :</label>
    <?php
    echo form_input(array(
        'class' => 'form-control',
        'id' => 'companyname',
        'name' => 'companyname',
        'style' => 'background-color: #0a0a0a; border: 1px solid #ffffff; color: #ffffff;', 
    ));
    ?>
    <?php
    echo form_input(array(
        'name' => 'type',
        'type' => 'hidden',
        'id' => 'type'
    ));
    ?>
    <span class="help-block" style="color: #ffffff;" id="companytype"></span>
</div>
<div class="form-group">
    <label class="control-label" 
        style="color: white;"><?php echo $this->lang->line('visitorname') ?> :</label>
    <?php
        echo form_input(array(
            'class' => 'form-control',
            'id' => 'visitorname',
            'name' => 'visitorname',
            'style' => 'background-color: #0a0a0a; border: 1px solid #ffffff; color: #ffffff;',
        ));
    ?>
</div>
<div class="form-actions">
    <button type="submit" class="btn red btn-block uppercase" style="
    background-color: #d9252b;
    border: 1px solid #d9252b;
    width: 18%;
    height: 30px;
    float: right;
    padding: 0px 0px 0px 0px !important;
    font-size: 12px;">Submit</button>
</div>
<div class="login-options" style="margin-top: 20px;
    padding-top: 10px;
    padding-bottom: 50px;
    border-top: 0px solid #ffffff;
    border-bottom: 0px solid #ffffff;">
    <h4>Connect With Us</h4>
    <ul class="social-icons">
        <li>
            <a class="social-icon-color facebook" data-original-title="facebook" href="https://www.facebook.com/MercedesBenzID"></a>
        </li>
        <li>
            <a class="social-icon-color twitter" data-original-title="Twitter" href="https://twitter.com/mbindonesia"></a>
        </li>
        <li>
            <a class="social-icon-color instagram" data-original-title="Instagram" href="https://www.instagram.com/mercedesbenzid/"></a>
        </li>
    </ul>
</div>
<?php echo form_close(); ?>
<?php
$this->load->add_css('assets/plugins/typeahead/typeahead.css');
$this->load->add_css('assets/backoffice/css/login-2.min.css');
$this->load->add_js('assets/plugins/typeahead/handlebars.min.js');
$this->load->add_js('assets/plugins/typeahead/typeahead.bundle.min.js');
$visitorurl = base_url('backoffice/register/ajax_getvisitor?v='.time());
$companyurl = base_url('backoffice/register/ajax_getcompany?v='.time());
$companydetailurl = base_url('backoffice/register/ajax_getcompanydetail?v='.time());
// $this->load->add_css(<<<CSS
//             .form-control{
//                 background-color: #0a0a0a; border: 1px solid #1f1f1f;
//    }
//         .form-control::-moz-placeholder {
//     color: #fff;
//     opacity: 1; }
//  .form-control:-ms-input-placeholder {
//     color: #fff; }
// .form-control::-webkit-input-placeholder {
//     color: #fff; }
// CSS
//         , 'embed');
$this->load->add_js(<<<EOD
            var visitorurl = '{$visitorurl}';
            var companyurl = '{$companyurl}';
            var companydetailurl = '{$companydetailurl}';
EOD
        , 'embed');
$this->load->add_js('assets/backoffice/pages/register.js');
