<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-title-header-1 nowrap mgT10">New newsfeed</div>
            </div>
        </div>
    </div>
    <button class="popup-close-button bg-transparent pd0-i biger-3-time" type="button" ng-click="closeTarget('#formAddNewsFeeds')"></button>
</div>
<form class="app-content" id="frmcreatenewfeeds" name="frmcreatenewfeeds" ng-submit="CreateUserNewFeed(frmcreatenewfeeds)" novalidate="">
    <div class="app-content-inner content-pd">
        <button id="submitformcreatenewfeeds" type="submit" class="hidden"></button>
        <ion-scroll class="scroll-area" direction="y" has-bouncing="false" overflow-scroll="false" delegate-handle="scrollAddNewFeed" on-scroll="scrollContent('scrollAddNewFeed')">
            <div class="box-setting-4 form-field-container">
                <div class="content content-in">
                    <div class="itm">
                        <label class="label-form-field-1" ng-class="{ 'has-errors' : !feedTitleVal  }">Feed title</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-class="{ 'has-errors' : !feedTitleVal  }">
                                    <input type="text" id="feed_title" class="h32px" value="{{feedTitleVal}}" placeholder="Select">
                                    <div class="sign-r clear">
                                        <button class="bg-transparent full-h right pdR10">
                                            <svg class="h17px" viewBox="0 0 63.215 63.215"> <g> <g> <path fill="#81B4DE" 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="AddUserNewFeed.feed_title" name="feed_title" required="" ng-change="setValueForFeedTitle(AddUserNewFeed.feed_title)">
                                        <option value="">Select</option>
                                        <option ng-repeat="item in feedtitle" value="{{item.id}}">{{item.feedtitle}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <div class="layout-fixed input-1-detail">
                            <div>
                                <label class="label-form-field-1">Send to</label>
                                <div class="layout-fixed">
                                    <div>
                                        <div class="input-form-field-1">
                                            <input autocomplete="off"
                                                   class="ion-autocomplete"
                                                   ng-class="{ 'invisible' : AddUserNewFeed.sendall }"
                                                   ion-autocomplete=""
                                                   item-value-key="id"
                                                   item-view-value-key="name"
                                                   items-clicked-method="onNewfeedSelectUser(callback)"
                                                   items-removed-method="onNewfeedRemoveUser(callback)"
                                                   items-method="filterNewfeedsUser(query)"
                                                   items-method-value-key="items"
                                                   external-model="initialUsers"
                                                   model-to-item-method="modelToItemMethodUser(modelValue)"
                                                   ng-model="AddUserNewFeed.users"
                                                   placeholder=""
                                                   readonly="readonly" type="text" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="w120px">
                                <div class="layout-fixed">
                                    <div>
                                        <div class="input-form-field-1" ng-click="focusHandle($event)">
                                            <input type="text" class="h32px" name="" value="" placeholder="Choose all">
                                            <div class="sign-r clear">
                                                <button class="bg-transparent full-h right pdR10">
                                                    <svg class="h17px" viewBox="0 0 63.215 63.215"> <g> <g> <path fill="#81B4DE" 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>
                                            <div class="field-overlay">
                                                <div class="checkbox-image-1 block-i full-h">
                                                    <input class="right" id="ckSendFeed_All" name="" type="checkbox" ng-model="AddUserNewFeed.sendall" ng-click="checksendall(AddUserNewFeed.sendall)" />
                                                    <i class="full"><span>All</span></i>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm" ng-if="!AddUserNewFeed.sendall">
                        <label class="label-form-field-1">Department</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1">
                                    <input type="text" class="h32px" name="" value="{{department_name}}" placeholder="Select">
                                    <div class="sign-r clear">
                                        <button class="bg-transparent full-h right pdR10">
                                            <svg class="h17px" viewBox="0 0 63.215 63.215"> <g> <g> <path fill="#81B4DE" 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-change="getdataInDepartment(Departmentselect)" name="feed_title" ng-model="Departmentselect">
                                        <option value="">Select</option>
                                        <option value="{{item.id}}" ng-repeat="item in departmentdata">{{item.name}}</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm" ng-if="!AddUserNewFeed.sendall">
                        <label class="label-form-field-1">User in department</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1">
                                    <input autocomplete="off"
                                           class="ion-autocomplete"
                                           ion-autocomplete=""
                                           item-value-key="id"
                                           item-view-value-key="name"
                                           items-clicked-method="onSelectDepartUser(callback)"
                                           items-removed-method="onRemoveDepartUser(callback)"
                                           items-method="filterDepartUser(query)"
                                           items-method-value-key="items"
                                           external-model="initialDeparment"
                                           model-to-item-method="modelToItemMethod(modelValue)"
                                           ng-model="AddUserNewFeed.usersdepartment"
                                           placeholder=""
                                           readonly="readonly" type="text" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="itm">
                        <label class="label-form-field-1" ng-class="{ 'has-errors' : frmcreatenewfeeds.message.$invalid }">Message</label>
                        <div class="layout-fixed">
                            <div>
                                <div class="input-form-field-1" ng-class="{ 'has-errors' : frmcreatenewfeeds.message.$invalid }" ng-click="focusHandle($event)">
                                    <textarea name="message" ng-model="AddUserNewFeed.message" class="h80px" placeholder="" required></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 onclick="">
                            <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 darkgray position-left full" type="button" ng-click="closeTarget('#formAddNewsFeeds');">
                Cancel
            </button>
        </div>
        <div class="full-h">
            <button class="button-form-field-1 position-right full" onclick="getElementById('submitformcreatenewfeeds').click()">
                <svg class="icon h18px" viewBox="0 0 334.5 334.5"> <path d="M332.797,13.699c-1.489-1.306-3.608-1.609-5.404-0.776L2.893,163.695c-1.747,0.812-2.872,2.555-2.893,4.481  s1.067,3.693,2.797,4.542l91.833,45.068c1.684,0.827,3.692,0.64,5.196-0.484l89.287-66.734l-70.094,72.1  c-1,1.029-1.51,2.438-1.4,3.868l6.979,90.889c0.155,2.014,1.505,3.736,3.424,4.367c0.513,0.168,1.04,0.25,1.561,0.25  c1.429,0,2.819-0.613,3.786-1.733l48.742-56.482l60.255,28.79c1.308,0.625,2.822,0.651,4.151,0.073  c1.329-0.579,2.341-1.705,2.775-3.087L334.27,18.956C334.864,17.066,334.285,15.005,332.797,13.699z" /> </svg>
                Send
            </button>
        </div>
    </div>
</div>
