<div ng-controller="Cases.MainController" ng-if="objectInfo">
    <fieldset permission="editRequestData" permission-object-type="CASE_FILE" permission-properties="objectInfo"
            permission-action="disabled">
        <panel-view header="Request Information" collapsible="true" collapsed="false">
            <div class="row">
                <div class="form-group col-sm-3">
                    <label class="control-label" translate> cases.comp.main.requestType.label </label>
                    <select ng-model="objectInfo.requestType"
                            ng-options="requestType.key as requestType.value | translate for requestType in requestTypes"
                            class="form-control input-md" ng-disabled="true">
                    </select>

                </div>
                <div class="form-group col-sm-3">
                    <label class="control-label" translate> cases.comp.main.requestTrack.label </label>
                    <select ng-model="objectInfo.requestTrack" ng-disabled="requestAlreadyExtended"
                            ng-change="requestTrackChanged(objectInfo.requestTrack)"
                            ng-options="requestTrack.key as requestTrack.value | translate for requestTrack in requestTracks"
                            class="form-control input-md" permission="editRequestData" permission-object-type="CASE_FILE"
                            permission-properties="objectInfo" permission-action="disable">
                    </select>

                </div>
                <div class="col-sm-3">
                    <label for="recordSearchDateFrom" translate> cases.comp.main.recordSearchDateFrom.label </label>
                    <div>
                        <fieldset ng-disabled="true">
                            <div class="form-group">
                                <date-time-picker data="objectInfo.recordSearchDateFrom" disable="true" no-default-date="true"  show-time="true"></date-time-picker>

                            </div>
                        </fieldset>
                    </div>
                </div>
                <div class="col-sm-3">
                    <label for="recordSearchDateTo" translate> cases.comp.main.recordSearchDateTo.label </label>
                    <div>
                        <fieldset ng-disabled="true">
                            <div class="form-group">
                                <date-time-picker data="objectInfo.recordSearchDateTo" disable="true" no-default-date="true"  show-time="true"></date-time-picker>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </div>
            <div class="row" ng-if="objectInfo.requestType == 'New Request'">
                <div class="form-group col-sm-3">
                    <label class="control-label" translate> cases.comp.main.deliveryMethodOfResponse.label </label>
                    <select id="deliveryMethodOfResponse" ng-model="objectInfo.deliveryMethodOfResponse"
                            ng-options="deliveryMethodOfResponse.key as deliveryMethodOfResponse.value | translate for deliveryMethodOfResponse in deliveryMethodOfResponses"
                            class="form-control input-md" ng-disabled="true">
                    </select>
                </div>
                <div class="form-group col-sm-3">
                    <label class="control-label" translate> cases.comp.main.dispositionType.label</label>
                    <input type="text" id="disposition" ng-model="dispositionValue" name="disposition" class="input-md form-control"
                            ng-disabled="true">
                </div>
                <div class="form-group col-sm-3">
                    <label class="control-label" translate> cases.comp.main.otherReason.label</label>
                    <input type="text" id="otherReason" ng-model="otherReasonValue" name="otherReason" class="input-md form-control"
                            ng-disabled="true">
                </div>
            </div>
            <div class="row" ng-if="objectInfo.requestType == 'Appeal'">
                <div class="col-sm-6">
                    <div class="row">
                        <div class="form-group col-sm-6" style="padding-left: 0px">
                            <label class="control-label" translate> cases.comp.main.deliveryMethodOfResponse.label </label>
                            <select ng-model="objectInfo.deliveryMethodOfResponse"
                                    ng-options="deliveryMethodOfResponse.key as deliveryMethodOfResponse.value | translate for deliveryMethodOfResponse in deliveryMethodOfResponses"
                                    class="form-control input-md" ng-disabled="true">
                            </select>
                        </div>
                        <div class="form-group col-sm-6" style="padding-right: 0px">
                            <label class="control-label" translate> cases.comp.main.dispositionType.label</label>
                            <input type="text" ng-model="appealDispositionValue" class="input-md form-control" ng-readonly="true"
                                    permission="editRequestData" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                                    permission-action="disable">
                        </div>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="control-label" translate> cases.comp.main.otherReason.label</label>
                            <select ng-if="!isAppealCustomReason" ng-model="objectInfo.otherReason"
                                    ng-options="otherReason.key as otherReason.value | translate for otherReason in appealOtherReasons"
                                    class="form-control input-md" ng-change="openAddOtherReasonInAppeal(objectInfo.otherReason)"
                                    ng-disabled="isAppealOtherReasonDisabled">
                            </select>
                            <input ng-if="isAppealCustomReason" type="text" ng-model="objectInfo.otherReason" class="input-md form-control"
                                    ng-disabled="isAppealOtherReasonDisabled" ng-click="openAddAppealOtherReasonModal()">

                        </div>
                    </div>
                </div>
                <div class="col-sm-6" ng-if="showDispositionReasonsFlag">
                    <div class="form-group" style="margin-top: 10px;">
                        <label class="control-label" translate>cases.comp.main.dispositionReasons</label>
                        <div ng-repeat="reason in appealDispositionReasons" style="margin-left: 20px">
                            <label class="checkbox">
                                <input type="checkbox" value="{{reason.key}}" ng-checked="isAppealReasonChecked(reason.key)"
                                        ng-click="onAppealReasonSelected(reason.key)" />
                                <span translate>{{reason.value}}</span>
                            </label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-3" ng-if="enableTitle">
                    <label for="title" translate> cases.comp.main.title.label </label>
                    <textarea rows=2 id="title" ng-model="objectInfo.title" class="input-md form-control" ng-disabled="true"
                            maxlength="128" />

                    <label class="control-label" translate>cases.comp.info.category.label</label>
                    <select id="requestCategory" ng-model="objectInfo.requestCategory"
                            ng-options="requestCategory.key as requestCategory.value | translate for requestCategory in requestCategories"
                            class="form-control input-md" ng-disabled="true">
                    </select>

                </div>
                <div class="col-sm-3">
                    <label translate> cases.comp.main.description.label </label>
                    <textarea rows=5 ng-model="objectInfo.details" class="input-md form-control" ng-disabled="true"></textarea>
                </div>
                <div class="col-sm-3">
                    <label for="dispositionClosedDate" translate> cases.comp.main.dispositionClosedDate.label</label>
                    <div>
                        <fieldset ng-disabled="!enableDispositionClosedDate">
                            <div class="form-group">
                                <date-time-picker data="objectInfo.dispositionClosedDate" show-time="true" min-date="minDispositionClosedDate"
                                        on-date-select="onComboAfterSave" no-default-date="true" ></date-time-picker>
                            </div>
                        </fieldset>
                    </div>
                    <label for="releasedDate" translate> cases.comp.main.releasedDate.label</label>
                    <div>
                        <div class="form-group">
                            <date-time-picker data="objectInfo.releasedDate" show-time="true" no-default-date="true" ></date-time-picker>

                        </div>
                    </div>
                </div>
                <div class="col-sm-3">
                    <label for="processingFeeWaive" translate> cases.comp.main.processingFeeWaive.label </label>
                    <input type="text" id="processingFeeWaive" ng-model="objectInfo.processingFeeWaive" name="processingFeeWaive"
                            class="input-md form-control" placeholder="{{ 'cases.comp.main.processingFeeWaive.placeholder'  | translate }}"
                            permission="editRequestData" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                            permission-action="disable" />
                    <label class="control-label" translate> cases.comp.main.payFee.label </label>
                    <select id="payFee" ng-model="objectInfo.payFee" ng-options="payFee.key as payFee.value for payFee in payFees"
                            class="form-control input-md" ng-disabled="true">
                    </select>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-3">
                    <label for="requestFeeWaiveReason" translate> cases.comp.main.requestFeeWaiveReason.label </label>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" ng-model="objectInfo.feeWaiverFlag"
                                    ng-change="objectInfo.requestFeeWaiveReason= !objectInfo.feeWaiverFlag ? '' : objectInfo.requestFeeWaiveReason"
                                    ng-disabled="true">
                            <span translate>cases.comp.main.feeWaiverFlag.label </span>
                        </label>
                    </div>
                    <textarea rows=5 id="requestFeeWaiveReason" ng-model="objectInfo.requestFeeWaiveReason" name="requestFeeWaiveReason"
                            class="input-md form-control" ng-disabled="!objectInfo.feeWaiverFlag"
                            placeholder="{{ 'cases.comp.main.requestFeeWaiveReason.placeholder'  | translate }}" readonly></textarea>
                </div>
                <div class="col-sm-3">
                    <label for="requestExpediteReason" translate> cases.comp.main.requestExpediteReason.label </label>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" ng-model="objectInfo.expediteFlag"
                                    ng-change="objectInfo.requestExpediteReason= !objectInfo.expediteFlag ? '' : objectInfo.requestExpediteReason"
                                    permission="editRequestData" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                                    permission-action="disable">
                            <span translate>cases.comp.main.expediteFlag.label </span>
                        </label>
                    </div>
                    <textarea rows=5 id="requestExpediteReason" ng-model="objectInfo.requestExpediteReason" name="requestExpediteReason"
                            class="input-md form-control" ng-disabled="!objectInfo.expediteFlag"
                            placeholder="{{ 'cases.comp.main.requestExpediteReason.placeholder'  | translate }}"></textarea>
                </div>
                <div class="col-sm-3">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" ng-model="objectInfo.extensionFlag" ng-click='extensionClicked($event)'
                                    ng-disabled="requestAlreadyExtended || !requestExtensionWorkingDaysEnabled"
                                    permission="requestDueDateExtension" permission-object-type="CASE_FILE"
                                    permission-properties="objectInfo" permission-action="hide">
                            <span translate>cases.comp.main.extensionFlag.label </span>
                        </label>
                    </div>
                    <br>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" ng-model="objectInfo.litigationFlag" permission="editRequestData"
                                    permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable">
                            <span translate>cases.comp.main.litigationFlag.label </span>
                        </label>
                    </div>
                    <br>
                    <div class="checkbox">
                        <label>
                            <input type="checkbox" ng-model="objectInfo.paidFlag" ng-change="feeWaivedFlagChange(objectInfo.paidFlag)" permission="editRequestData"
                                    permission-object-type="CASE_FILE" permission-properties="objectInfo" permission-action="disable">
                            <span translate>cases.comp.main.paidFlag.label </span>
                        </label>
                    </div>
                </div>
            </div>
        </panel-view>
    </fieldset>
</div>
