
<script src="<?= asset_url('assets/js/backend_companysetting_helper.js') ?>"></script>
<script src="<?= asset_url('assets/js/backend_companysetting.js') ?>"></script>
<script>
    var GlobalVariables = {
        csrfToken     : <?= json_encode($this->security->get_csrf_hash()) ?>,
        baseUrl       : <?= json_encode($base_url) ?>,
        dateFormat    : <?= json_encode($date_format) ?>,
        timeFormat    : <?= json_encode($time_format) ?>,
        globalscompanies      : <?= json_encode($globalscompanies) ?>,
        user          : {
            id        : <?= $user_id ?>,
            email     : <?= json_encode($user_email) ?>,
            role_slug : <?= json_encode($role_slug) ?>,
            privileges: <?= json_encode($privileges) ?>
        }
    };

    $(document).ready(function() {
        Backendforms.initialize(true);
    });
</script>

<div id="forms-page" class="container-fluid backend-page">
    <ul class="nav nav-tabs" role="tablist">
        <li role="presentation" class="active"><a href="#formsdirectoryconfig" aria-controls="CompanySettings" role="tab" data-toggle="tab">Global Companies</a></li>
    </ul>

    <div class="tab-content">

        <!-- Forms TAB -->

        <div role="tabpanel" class="tab-pane active" id="forms">
            <div class="row">
                <div id="filter-forms" class="filter-records column col-xs-12 col-sm-5">
                    <form>
                        <div class="input-group">
                            <input type="text" class="key form-control">

                            <span class="input-group-addon">
                        <div>
                            <button class="filter btn btn-default" type="submit" title="<?= lang('filter') ?>">
                                <span class="glyphicon glyphicon-search"></span>
                            </button>
                            <button class="clear btn btn-default" type="button" title="<?= lang('clear') ?>">
                                <span class="glyphicon glyphicon-repeat"></span>
                            </button>
                        </div>
                    </span>
                        </div>
                    </form>

                    <h3>Global Company Settings</h3>
                    <div class="results"></div>
                </div>

                <div class="record-details column col-xs-12 col-sm-5">
                    <div class="btn-toolbar">
                        <div class="add-edit-delete-group btn-group">
                            <button id="add-forms" class="btn btn-primary">
                                <span class="glyphicon glyphicon-plus"></span>
                                <?= lang('add') ?>
                            </button>
                            <button id="edit-forms" class="btn btn-default" disabled="disabled">
                                <span class="glyphicon glyphicon-pencil"></span>
                                <?= lang('edit') ?>
                            </button>
                            <button id="delete-forms" class="btn btn-default" disabled="disabled">
                                <span class="glyphicon glyphicon-remove"></span>
                                <?= lang('delete') ?>
                            </button>
                        </div>

                        <div class="save-cancel-group btn-group" style="display:none;">
                            <button id="save-forms" class="btn btn-primary">
                                <span class="glyphicon glyphicon-ok"></span>
                                <?= lang('save') ?>
                            </button>
                            <button id="cancel-forms" class="btn btn-default">
                                <span class="glyphicon glyphicon-ban-circle"></span>
                                <?= lang('cancel') ?>
                            </button>
                        </div>
                    </div>

                    <h3><?= lang('details') ?></h3>

                    <div class="form-message alert" style="display:none;"></div>
                    <input type="hidden" id="globalcompanysetting-id">


                    <div class="form-group">
                        <label for="globalcompanysetting-first-name">First Name *</label>
                        <input id="globalcompanysetting-first-name" class="form-control required" maxlength="256">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-last-name">Last Name *</label>
                        <input id="globalcompanysetting-last-name" class="form-control required" maxlength="512">
                    </div>


                    <div class="form-group">
                        <label for="globalcompanysetting-phone-number"><?= lang('phone_number') ?> *</label>
                        <input id="globalcompanysetting-phone-number" class="form-control required" max="128">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-mobile-number">Email* To put multiple emails, please separate with semicolons (ie a@a.com;b@b.com)</label>
                        <input id="globalcompanysetting-mobile-number" class="form-control required" maxlength="128">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-address"><?= lang('address') ?></label>
                        <input id="globalcompanysetting-address" class="form-control" maxlength="256">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-city"><?= lang('city') ?></label>
                        <input id="globalcompanysetting-city" class="form-control" maxlength="256">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-state"><?= lang('state') ?></label>
                        <input id="globalcompanysetting-state" class="form-control" maxlength="256">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-zip-code"><?= lang('zip_code') ?></label>
                        <input id="globalcompanysetting-zip-code" class="form-control" maxlength="64">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-notes"><?= lang('notes') ?></label>
                        <textarea id="globalcompanysetting-notes" class="form-control" rows="3"></textarea>
                    </div>

                    <br>
                    <div class="form-group">
                        <label for="globalcompanysetting-backgroundcolor">Background Color of Company Frontend</label>
                        <input type="color" id="globalcompanysetting-backgroundcolor" name="globalcompanysetting-backgroundcolor"
                               value="#DBDBDB">

                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-topheader">Top Header Color of Company Frontend</label>
                        <input type="color" id="globalcompanysetting-topheader" name="globalcompanysetting-topheader"
                               value="#DBDBDB">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-logolink">Logo Link - Uploaded <a href="<?php echo Config::BASE_URL.'/uploadlogos.php';?>" target="_blank"> HERE</a></label>
                        <textarea id="globalcompanysetting-logolink" rows="2" class="form-control">https://vaxprodemo.myappts.org/src/uploads/vaxpro.jpg</textarea>
                    </div>



                    <div class="form-group">
                        <label for="globalcompanysetting-width">Width of image **to keep default sizing leave blank</label>
                        <input type="number" id="globalcompanysetting-width" name="globalcompanysetting-width">
                    </div>

                    <div class="form-group">
                        <label for="globalcompanysetting-leng">Length of image **to keep default sizing leave blank</label>
                        <input type="number" id="globalcompanysetting-leng" name="globalcompanysetting-leng">
                    </div>

                </div>

                    <p id="form-message" class="text-danger">
                        <em><?= lang('fields_are_required') ?></em>
                    </p>
                </div>
            </div>
        </div>