<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2><?= print_lang($app_lang,'add_new_construction_contract'); ?></h2>
        <ol class="breadcrumb">
            <li>
                <a class="url-elem" href="<?php echo url('/dashboard'); ?>"><?= print_lang($app_lang,'home'); ?></a>
            </li>
            <li>
                <a class="url-elem" href="<?php echo url('/ccontracts'); ?>"><?= print_lang($app_lang,'construction_contracts'); ?></a>
            </li>
            <li class="active">
                <strong><?= print_lang($app_lang,'new_construction_contract'); ?></strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>


<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox-title">
        <h5><?= print_lang($app_lang,'fields_with'); ?> <strong class="text-danger">*</strong> <?= print_lang($app_lang,'are_mandatory'); ?></h5>
    </div>
    <div class="ibox-content">
        <!-- spinner -->
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
        <!-- spinner -->
        <div class="row">
            <div class="col-sm-12 b-r">
                <form role="form" id="ccontracts-form" action="<?php echo url('/ccontracts/save'); ?>">

                    <div class="row extra-mar-botm">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'contract_type'); ?> <strong class="text-danger">*</strong></label>
                                <select class="form-control chosen-select" name="contract_type">
                                    <option disabled="" selected="">-- <?= print_lang($app_lang,'select_type'); ?> --</option>
                                    <option value="employee"><?= print_lang($app_lang,'employee'); ?></option>
                                    <option value="machinery"><?= print_lang($app_lang,'machinery'); ?></option>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-6 for-employee-step1 display-none">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'duration_type'); ?> <strong class="text-danger">*</strong></label>
                                <select class="form-control chosen-select" name="duration_type">
                                    <option disabled="" selected="">-- <?= print_lang($app_lang,'select_type'); ?> --</option>
                                    <option value="monthly"><?= print_lang($app_lang,'monthly'); ?></option>
                                    <option value="days"><?= print_lang($app_lang,'days'); ?></option>
                                    <option value="hours"><?= print_lang($app_lang,'hours'); ?></option>
                                    <option value="sqm"><?= print_lang($app_lang,'sqm'); ?></option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="row extra-mar-botm for-employee-step2 display-none">
                        <div class="col-md-5">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'employee'); ?> <strong class="text-danger">*</strong></label>
                                        <select class="form-control chosen-select" name="employee">
                                            <option disabled="" selected="">-- <?= print_lang($app_lang,'select_employee'); ?> --</option>
                                            <?php foreach($accounts as $row){ ?>
                                                <?php if($row['type'] == 'employee'){ ?>
                                                    <option value="<?= $row['uid']; ?>"><?= $row['name']; ?></option>
                                                <?php } ?>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="ce-months-label display-none"><?= print_lang($app_lang,'number_of_months'); ?> <strong class="text-danger">*</strong></label>
                                        <label class="ce-days-label display-none"><?= print_lang($app_lang,'number_of_days'); ?> <strong class="text-danger">*</strong></label>
                                        <label class="ce-hours-label display-none"><?= print_lang($app_lang,'number_of_hours'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="number_of_duration" placeholder="<?= print_lang($app_lang,'number'); ?>">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-7">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'amount'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="amount" placeholder="<?= print_lang($app_lang,'amount'); ?>">
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'currency'); ?> <strong class="text-danger">*</strong></label>
                                        <select class="form-control chosen-select" name="currency">
                                            <option disabled="" selected="">-- <?= print_lang($app_lang,'select_currency'); ?> --</option>
                                            <?php foreach($currencies as $row){ ?>
                                                <option value="<?= $row['uid']; ?>" data-usd-equalance="<?= $row['usd_equalance']; ?>"><?= $row['name']; ?> (<?= $row['symbol']; ?>)</option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-4 ce-working-hours-input">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'working_hours_per_day'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="working_hours_per_day" placeholder="<?= print_lang($app_lang,'working_hours_per_day'); ?>">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>


                    <div class="row extra-mar-botm for-machinery-type display-none">
                        <div class="col-md-5">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'supplier'); ?> <strong class="text-danger">*</strong></label>
                                        <select class="form-control chosen-select" name="supplier">
                                            <option disabled="" selected="">-- <?= print_lang($app_lang,'select_supplier'); ?> --</option>
                                            <?php foreach($accounts as $row){ ?>
                                                <?php if($row['type'] == 'supplier'){ ?>
                                                    <option value="<?= $row['uid']; ?>"><?= $row['name']; ?></option>
                                                <?php } ?>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'name'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="machinery_name" placeholder="<?= print_lang($app_lang,'name'); ?>">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-7">
                            <div class="row">
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'currency'); ?> <strong class="text-danger">*</strong></label>
                                        <select class="form-control chosen-select" name="machinery_currency">
                                            <option disabled="" selected="">-- <?= print_lang($app_lang,'select_currency'); ?> --</option>
                                            <?php foreach($currencies as $row){ ?>
                                                <option value="<?= $row['uid']; ?>" data-usd-equalance="<?= $row['usd_equalance']; ?>"><?= $row['name']; ?> (<?= $row['symbol']; ?>)</option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'rate_per_hour'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="machinery_rate" placeholder="<?= print_lang($app_lang,'rate_per_hour'); ?>">
                                    </div>
                                </div>
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?= print_lang($app_lang,'working_hours_per_day'); ?> <strong class="text-danger">*</strong></label>
                                        <input type="text" class="form-control" name="machinery_working_hours" placeholder="<?= print_lang($app_lang,'working_hours_per_day'); ?>">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="row extra-mar-botm for-machinery-type display-none">
                        <div class="col-md-3">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'image'); ?></label>
                                <input type="file" class="form-control" name="image">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'driver_name'); ?> <strong class="text-danger">*</strong></label>
                                <input type="text" class="form-control" name="machinery_driver_name" placeholder="<?= print_lang($app_lang,'driver_name'); ?>">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'driver_mobile'); ?> <strong class="text-danger">*</strong></label>
                                <input type="text" class="form-control" name="machinery_driver_mobile" placeholder="<?= print_lang($app_lang,'driver_mobile'); ?>">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="form-group">
                                <label><?= print_lang($app_lang,'details'); ?></label>
                                <input type="text" class="form-control" name="machinery_details" placeholder="<?= print_lang($app_lang,'details'); ?>">
                            </div>
                        </div>
                    </div>

                    <div class="row extra-mar-botm">
                        <div class="col-md-12 text-right">
                            <a class="btn btn-w-m btn-outline btn-danger url-elem" href="<?php echo url('/ccontracts'); ?>"><?= print_lang($app_lang,'cancel'); ?></a>
                            <button class="btn btn-w-m btn-primary" type="submit"><?= print_lang($app_lang,'save'); ?></button>
                        </div>
                    </div>

                </form>
            </div>
        </div>
    </div>

</div>
