<div class="app-header bg-header-1">
    <div class="layout-fixed full-h text-center">
        <div class="full-h v-bottom-i pdB15">
            <div class="app-content-header bg-header-1">
                <div class="text-name-header-1 nowrap">Opportunity</div>
                <div class="text-title-header-1 nowrap mgT10">Follow-Up</div>
            </div>
        </div>
    </div>
    <button class="popup-back-button bg-transparent pd0-i biger-3-time" type="button" ng-click="closeTarget('#opportunityFollowUpFollowUp')"></button>
</div>
<form class="app-content" id="followUpdate" name="followUpdate" ng-submit="validateForm(followUpdate, 'UpdateFollow')" novalidate="">
    <div class="app-content-inner content-pd">
        <button type="submit" id="submitFormUpdate" style="display:none;"></button>
        <button type="submit" id="submitFormUpdateOpenSpec" style="display:none;" ng-click="check_submitfrom('success')"></button>
        <ion-scroll class="scroll-area" direction="y" has-bouncing="false" overflow-scroll="false" delegate-handle="scrollUpdateFollow" on-scroll="scrollContent('scrollUpdateFollow')">
            <div class="box-setting-4 form-field-container no-saperator">
                <div class="content content-in">
                    <div class="itm">
                        <div class="layout-fixed input-1-group">
                            <div>
                                <label class="label-form-field-1" ng-class="{ 'has-errors' : followUpdate.first_name.$invalid  }">First Name</label>
                                <div class="layout-fixed">
                                    <div>
                                        <div class="input-form-field-1" ng-class="{ 'has-errors' : followUpdate.first_name.$invalid  }" ng-click="focusHandle($event)">
                                            <input type="text" class="h32px" name="first_name" placeholder="" ng-model="dataFollowUpUpdate.first_name" required="">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div>
                                <label class="label-form-field-1" ng-class="{ 'has-errors' : followUpdate.last_name.$invalid  }">Last Name</label>
                                <div class="layout-fixed">
                                    <div>
                                        <div class="input-form-field-1" ng-class="{ 'has-errors' : followUpdate.last_name.$invalid  }" ng-click="focusHandle($event)">
                                            <input type="text" class="h32px" name="last_name" placeholder="" ng-model="dataFollowUpUpdate.last_name"  required="" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <label class="label-form-field-1" ng-class="{ 'has-errors' : followUpdate.phone.$invalid  }">Phone number</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-class="{ 'has-errors' : followUpdate.phone.$invalid  }" ng-click="focusHandle($event)">
                                    <input type="text" class="h32px" name="phone" ng-model="dataFollowUpUpdate.phone" phone-input="" pattern=".{10,20}" placeholder="" required />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <label class="label-form-field-1" ng-class="{ 'has-errors' : followUpdate.email.$invalid  }">Email</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-class="{ 'has-errors' : followUpdate.email.$invalid  }" ng-click="focusHandle($event)">
                                    <input type="email" name="email" class="h32px" placeholder="Example@email.com" ng-model="dataFollowUpUpdate.email" ng-change="requiredEmail('follow')" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <label class="label-form-field-1" ng-class="{ 'has-errors' : followUpdate.opportunitytab_id.$invalid  }">Sub heading</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-click="focusHandle($event)">
                                    <input type="text" placeholder="" name="subHeadingNameOnFollowUpSelect" class="h32px" ng-class="{ 'has-errors' : followUpdate.opportunitytab_id.$invalid  }">
                                    <div class="sign-r clear">
                                        <button class="bg-transparent full-h right pdR10" type="button">
                                            <svg class="h17px clr-symbol-clickable" viewBox="0 0 63.215 63.215"> <g> <g> <path fill="#1075BB" d="M59.807,15.717L31.491,43.791L3.419,15.475c-0.777-0.785-2.044-0.789-2.828-0.012c-0.784,0.777-0.789,2.044-0.012,2.827    l29.194,29.448c0.365,0.368,0.835,0.563,1.312,0.589c0.139,0.008,0.278-0.001,0.415-0.021c0.054,0.008,0.106,0.021,0.16,0.022    c0.544,0.029,1.099-0.162,1.515-0.576l29.447-29.196c0.785-0.777,0.79-2.043,0.012-2.828    C61.856,14.943,60.59,14.939,59.807,15.717z" /> </g> </g> </svg>
                                        </button>
                                    </div>
                                    <select class="field-overlay" ng-model="dataFollowUpUpdate.opportunitytab_id" ng-options="item.id as item.name for item in followUpSubtabNoMyFollow" ng-change="setValueShowSelect('subHeadingOnFollowUpSelect', 'subHeadingNameOnFollowUpSelect', 'subheadingfollow')" id="subHeadingOnFollowUpSelect" ng-class="{ 'has-errors' : followUpdate.opportunitytab_id.$invalid  }" name="opportunitytab_id" required>
                                        <option>Select</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <label class="label-form-field-1">Description <span class="clr-black" ng-if="dataFollowUpUpdate.description.length>0">{{dataFollowUpUpdate.description.length}} chars</span></label>
                        <label class="right" ng-if="dataFollowUpUpdate.descriptionlogs" ng-click="openByGetTemplate('popupOpportunityViewDescriptionLog')">View Logs</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-click="focusHandle($event)">
                                    <textarea class="h65px" ng-model="dataFollowUpUpdate.description" maxlength="5000"></textarea>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <div class="layout-fixed input-1-group">
                            <div>
                                <label class="label-form-field-1">Due Date</label>
                                <div class="layout-fixed">
                                    <div>
                                        <div class="input-form-field-1" ng-click="focusHandle($event)">
                                            <input type="text" class="h32px" value="{{dataFollowUpUpdate.from_date| date: 'MM/dd/yyyy'}}">
                                            <div class="field-overlay datetime" date="" ion-datetime-picker="" ng-model="dataFollowUpUpdate.from_date" id="from_date" name="from_date" required=""
                                            only-valid="{'between': {'initial':'today', 'final': dataFollowUpUpdate.to_date}, 'inclusive': true}">
                                            {{dataFollowUpUpdate.from_date| date: 'MM/dd/yyyy'}}
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div>
                            <div class="layout-fixed">
                                <div>
                                    <div class="input-form-field-1" ng-click="focusHandle($event)">
                                        <input type="text" class="h32px" value="{{dataFollowUpUpdate.to_date| date: 'MM/dd/yyyy'}}">
                                        <div class="field-overlay datetime" date="" ion-datetime-picker="" ng-model="dataFollowUpUpdate.to_date" id="to_date" name="to_date" required=""
                                        only-valid="{'after': dataFollowUpUpdate.from_date}">
                                        {{dataFollowUpUpdate.to_date| date: 'MM/dd/yyyy'}}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="itm">
                <label class="label-form-field-1" ng-class="{ 'has-errors' : dataFollowUpUpdate.addStreet.length == 0  }">Address</label>
                <div class="layout-fixed">
                    <div>
                        <div class="input-form-field-1" ng-class="{ 'has-errors' : dataFollowUpUpdate.addStreet.length == 0  }" ng-click="focusHandle($event)">
                            <!-- <ion-google-place getplace="true" location-changed="locationChangedOnFollow" ng-model="dataFollowUpUpdate.street" placeholder="Enter address" style="padding: 0px;border-width: 0px;" name="street" ng-required="requireAddress" id="streetAuToComplete"></ion-google-place> -->
                            <tags-input ng-model="dataFollowUpUpdate.addStreet"
                            add-on-paste="true"
                            display-property="description"
                            key-property="place_id"
                            on-tag-adding="selectAddress($tag,'followup')"
                            enable-editing-last-tag="true"
                            max-tags="1"
                            min-tags="1"
                            on-tag-removed="removetag($tag,'followup')">
                            <auto-complete load-on-empty="true" source="loadAddress($query)"></auto-complete>
                        </tags-input>
                    </div>
                </div>
            </div>
            <input type="hidden" ng-model="followUpdate.street">
        </div>
        <div class="itm">
            <div class="layout-fixed input-1-group">
                <div class="layout-w-1:2">
                    <label class="label-form-field-1">City</label>
                    <div class="layout-fixed">
                        <div>
                            <div class="input-form-field-1" ng-click="focusHandle($event)">
                                <input type="text" class="h32px locality" name="city" placeholder="" ng-model="dataFollowUpUpdate.city">
                            </div>
                        </div>
                    </div>
                </div>
                <div>
                    <label class="label-form-field-1">State</label>
                    <div class="layout-fixed">
                        <div>
                            <div class="input-form-field-1" ng-click="focusHandle($event)">
                                <input type="text" class="h32px administrative_area_level_1" name="state" ng-model="dataFollowUpUpdate.state" placeholder="">
                            </div>
                        </div>
                    </div>
                </div>
                <div>
                    <label class="label-form-field-1">Zip Code</label>
                    <div class="layout-fixed">
                        <div>
                            <div class="input-form-field-1" ng-click="focusHandle($event)">
                                <input type="text" class="ft-fifth h32px postal_code" name="zipcode" value="" placeholder="" ng-model="dataFollowUpUpdate.zipcode">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="itm">
            <label class="label-form-field-1" ng-class="{ 'has-errors' : !dataFollowUpUpdate.assign || dataFollowUpUpdate.assign.length==0}">Assign</label>
            <div class="layout-fixed">
                <div>
                    <div class="input-form-field-1" ng-class="{ 'has-errors' : !dataFollowUpUpdate.assign || dataFollowUpUpdate.assign.length==0}" ng-click="focusHandle($event)">
                        <textarea autocomplete="off"
                        class="ion-autocomplete"
                        ion-autocomplete=""
                        item-value-key="id"
                        item-view-value-key="name"
                        items-clicked-method="clickOnItem(callback,'asg')"
                        items-method="autoComplete(query,'asg')"
                        items-method-value-key="items"
                        items-removed-method="removeItemsAutocomplete(callback,'asg')"
                        max-selected-items="1"
                        ng-model="autocompleteList.dataAssignUser"
                        external-model="initialAssignItem"
                        model-to-item-method="setValueForInputAssignItemEdit(modelValue)"
                        placeholder="" readonly="readonly" style="width:100%" type="text"></textarea>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</ion-scroll>
</div>
</form>
<div class="app-control">
    <div class="layout-fixed full-h pdT2">
        <div class="w42px full-h relative">
            <button class="bg-transparent pd0-i full text-left pdL10-i" type="button" onclick="openQuickOption(this)">
                <svg class="h20px" viewBox="0 0 460.713 460.713"> <g> <rect y="115.356" width="302" height="30" fill="#FFFFFF" /> <polygon points="335.786,202.231 398.25,264.694 460.713,202.232  " fill="#FFFFFF" /> <rect y="315.356" width="302" height="30" fill="#FFFFFF" /> <rect y="215.356" width="302" height="30" fill="#FFFFFF" /> </g> </svg>
            </button>
            <div class="quick-popup box-popup-1 display-bottom-left mgB55" onclick="closeQuickOption(this)">
                <div class="popup-content w140px">
                    <ul class="list-item-03">
                        <li ng-click="getItemFollowUpId(dataFollowUpUpdate.id,'openForm')">
                            <div class="layout-fixed">
                                <div class="icon-area">
                                    <svg class="h15px" viewBox="0 0 423.755 423.755"> <path d="M43.84,281.457c-18.585-44.869-18.586-94.29,0-139.159c10.649-25.709,26.678-48.152,46.86-66.135l60.86,60.86V15.099   H29.635l39.88,39.88c-64.293,58.426-88.5,153.2-53.391,237.959c14.167,34.202,37.07,64.159,66.234,86.634   c28.275,21.789,61.873,36.201,97.162,41.677l4.601-29.646C120.778,381.774,68.337,340.597,43.84,281.457z" fill="#FFFFFF" /> <path d="M407.516,292.938c21.652-52.272,21.652-109.848,0-162.12c-14.167-34.202-37.071-64.159-66.234-86.633   C313.007,22.395,279.409,7.983,244.12,2.507l-4.601,29.646c63.342,9.829,115.783,51.005,140.28,110.146   c18.586,44.869,18.586,94.29,0,139.159c-10.649,25.709-26.678,48.152-46.859,66.135l-60.86-60.86v121.924h121.924l-39.801-39.801   C377.118,348.099,395.334,322.348,407.516,292.938z" fill="#FFFFFF" /> </svg>
                                </div>
                                <div class="name-area text-link-1">
                                    Reset all
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div class="popup-overlay"></div>
            </div>
        </div>
        <div class="full-h">
            <button class="button-form-field-1 green position-right full pdR20" type="button" onclick="setTimeout(function () { getElementById('submitFormUpdateOpenSpec').click();}, 500);" ng-click="setRequiredAddress()" ng-disabled="!convertAppFromFollowup">
                <svg class="icon h12px" viewBox="0 0 512 512"> <polygon points="464.778,51.369 149.961,366.186 47.222,263.447 0,310.669 149.961,460.631 512,98.592   " /> </svg>
                Success
            </button>
        </div>
        <div class="full-h">
            <button class="button-form-field-1 red position-right full pdR20" type="button" ng-click="openByGetTemplate('opportunityFollowToFail')" ng-disabled="!convertToFailButton2">
                <svg class="icon h12px" viewBox="0 0 94.926 94.926"> <path d="M55.931,47.463L94.306,9.09c0.826-0.827,0.826-2.167,0-2.994L88.833,0.62C88.436,0.224,87.896,0,87.335,0   c-0.562,0-1.101,0.224-1.498,0.62L47.463,38.994L9.089,0.62c-0.795-0.795-2.202-0.794-2.995,0L0.622,6.096   c-0.827,0.827-0.827,2.167,0,2.994l38.374,38.373L0.622,85.836c-0.827,0.827-0.827,2.167,0,2.994l5.473,5.476   c0.397,0.396,0.936,0.62,1.498,0.62s1.1-0.224,1.497-0.62l38.374-38.374l38.374,38.374c0.397,0.396,0.937,0.62,1.498,0.62   s1.101-0.224,1.498-0.62l5.473-5.476c0.826-0.827,0.826-2.167,0-2.994L55.931,47.463z" /> </svg>
                Fail
            </button>
        </div>
        <div class="full-h">
            <button class="button-form-field-1 position-right full pdR20" type="button" onclick=" $('#streetAuToComplete').removeAttr('required'); getElementById('submitFormUpdate').click();" type="button" ng-click="check_submitfrom('update')" ng-disabled="!updateFollowUpBut">
                <svg class="icon h12px" viewBox="0 0 267.745 267.745"> <path d="M218.266,0v67.921c0,10.77-8.82,19.59-19.6,19.59H68.057c-10.77,0-19.579-8.82-19.579-19.59V0.02   h-16.71l0,0c-13.154,0-23.893,11.417-23.893,25.378v219.263c0,12.699,9.769,23.084,21.721,23.084H238.15   c11.951,0,21.721-10.385,21.721-23.075V50.969L218.266,0z M221.54,231.295c0,9.406-7.688,17.084-17.084,17.084H66.219   c-9.396,0-17.074-7.678-17.074-17.084v-71.194c0-9.406,7.678-17.085,17.074-17.085h138.237c9.396,0,17.084,7.679,17.084,17.085   V231.295z" style="fill:#030104;" /> <path d="M202.989,171.516H67.665c-0.799,0-1.447,0.648-1.447,1.447v3.521c0,0.799,0.648,1.447,1.447,1.447   h135.324c0.799,0,1.446-0.648,1.446-1.447v-3.521C204.435,172.164,203.788,171.516,202.989,171.516z" style="fill:#030104;" /> <path d="M202.989,184.348H67.665c-0.799,0-1.447,0.646-1.447,1.446v3.521c0,0.8,0.648,1.446,1.447,1.446   h135.324c0.799,0,1.446-0.646,1.446-1.446v-3.521C204.435,184.994,203.788,184.348,202.989,184.348z" style="fill:#030104;" /> <path d="M202.989,197.178H67.665c-0.799,0-1.447,0.648-1.447,1.447v3.521c0,0.799,0.648,1.447,1.447,1.447   h135.324c0.799,0,1.446-0.648,1.446-1.447v-3.521C204.435,197.826,203.788,197.178,202.989,197.178z" style="fill:#030104;" /> <path d="M179.708,70.294h20.322c1.979,0,3.598-1.616,3.598-3.594V0.031h-27.492v66.692   C176.136,68.689,177.746,70.294,179.708,70.294z" style="fill:#030104;" /> </svg>
                Update
            </button>
        </div>
    </div>
</div>
