<div id="timeEntryAddModal" class="modal fade" role="dialog">
    <div class="modal-dialog modal-lg">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">New Time Entry</h5>
                <button type="button" aria-label="Close" class="close" data-dismiss="modal">×</button>
            </div>
            <?php echo Form::open(['id'=>'timeEntryAddForm', 'class'=>'timeEntryAddForm']); ?>

            <div class="modal-body">
                <div class="alert alert-danger" style="display: none" id="tmAddValidationErrorsBox"></div>
                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_time_entries')): ?>
                    <div class="form-group row">
                        <div class="col-sm-12">
                            <?php echo Form::label('User', 'User'); ?><span class="required">*</span>
                            <?php echo Form::select('user_id', $users, Auth::id(), ['id' => 'timeUserId', 'class' => 'form-control', 'required', 'placeholder' => 'Select User']); ?>

                        </div>
                    </div>
                <?php endif; ?>
                <div class="form-group row">
                    <div class="col-sm-4">
                        <?php echo Form::label('project', 'Project'); ?><span class="required">*</span>
                        <?php echo Form::select('project_id', $projects, null, ['id'=>'timeProjectId','class' => 'form-control','required', 'placeholder'=>'Select Project']); ?>

                    </div>
                    <div class="col-sm-8">
                        <?php echo Form::label('task', 'Task'); ?><span class="required">*</span>
                        <?php echo Form::select('task_id', [], null, ['id'=>'taskId','class' => 'form-control','required', 'placeholder'=>'Select Task']); ?>

                    </div>
                </div>
                <div class="form-group row">
                    <div class="col-sm-4">
                        <?php echo Form::label('start_time', 'Start Time'); ?><span class="required">*</span>
                        <div id="dvStartTime">
                            <?php echo Form::text('start_time', null, ['class' => 'form-control','id'=>'startTime', 'autocomplete' => 'off','required']); ?>

                        </div>
                    </div>
                    <div class="col-sm-8">
                        <?php echo Form::label('Activity Type', 'Activity Type'); ?><span class="required">*</span>
                        <?php echo Form::select('activity_type_id', $activityTypes, null, ['id'=>'activityTypeId','class' => 'form-control','required', 'placeholder'=>'Select Activity']); ?>

                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-4 p-0">
                        <div class="form-group col-sm-12">
                            <?php echo Form::label('end_time', 'End Time'); ?><span class="required">*</span>
                            <div id="dvEndTime">
                                <?php echo Form::text('end_time', null, ['class' => 'form-control','id'=>'endTime', 'autocomplete' => 'off', 'required']); ?>

                            </div>
                        </div>
                        <div class="form-group col-sm-12">
                            <?php echo Form::label('duration', 'Duration (minutes)'); ?>

                            <div id="dvDuration">
                                <?php echo Form::number('duration', null, ['class' => 'form-control','id' => 'duration', 'readonly']); ?>

                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-8">
                        <?php echo Form::label('note', 'Note'); ?>

                        <?php echo Form::textarea('note', null, ['class' => 'form-control', 'rows' => 5, 'style'=>'line-height: 1.5;']); ?>

                        <?php echo Form::hidden('entry_type', 2); ?>

                    </div>
                </div>
                <div class="text-right">
                    <?php echo Form::button('Save', ['type'=>'submit','class' => 'btn btn-primary','id'=>'btnSave','data-loading-text'=>"<span class='spinner-border spinner-border-sm'></span> Processing..."]); ?>

                    <button type="button" class="btn btn-light ml-1" data-dismiss="modal">Cancel</button>
                </div>
            </div>
            <?php echo Form::close(); ?>

        </div>
    </div>
</div>
<?php /**PATH /Users/dev/Documents/WebDevProjects/infy-tracker/resources/views/time_entries/modal.blade.php ENDPATH**/ ?>