<template name="groupSettings">
	<form>
		{{#with group}}
			<div class="details-form group-settings">
				<div class="details-form-element settings">
					<h3>
						<span class="fa fa-cog fa-fw" aria-hidden="true"></span>
						{{mf 'group.settings.title' 'Settings'}}
					</h3>
					<div class="form-group">
						<label>{{mf 'group.settings.field.logo' 'Logo'}}</label>
						<div class="input-group">
							<span class="input-group-addon">
								<span class="fa fa-rebel fa-fw" aria-hidden="true"></span>
							</span>
							<input class="js-logo-url form-control"
								id="setLogo"
								placeholder= "{{mf 'group.settings.field.logo.placeholder' 'Link to your Icon (png or jpg)'}}"
								value="{{logoUrl}}"/>
						</div>
					</div>
					<div class="form-group">
						<label>
							{{mf 'group.settings.field.backgroundImg' 'Background Image'}}
							<small>&#40;{{mf '_notYetWorking' 'not working yet'}}&#41;</small>
						</label>
						<div class="input-group">
							<span class="input-group-addon">
								<span class="fa fa-picture-o fa-fw" aria-hidden="true"></span>
							</span>
							<input class="js-background-url form-control"
								id="setBackgroundImage"
								placeholder= "{{mf 'group.settings.field.backgroundImg.placeholder' 'Link to background image (png or jpg)'}}"
								value="{{backgroundUrl}}"/>
						</div>
					</div>
					<div class="form-actions">
						{{> buttonSave event="js-group-edit-save" saving=saving}}
						{{> buttonCancel event="js-group-edit-cancel"}}
					</div>
				</div>

				<div class="details-form-element">
					<h3>
						<span class="fa fa-group fa-fw" aria-hidden="true"></span>
						{{mf 'group.settings.title.Members' 'Members'}}
					</h3>
					<div class="tag-group multiline">
						{{#each members}}
							<div class="tag tag-link group-member-tag">
								<a href="{{pathFor 'userprofile' _id=this}}">
									<i class="fa fa-user fa-fw" aria-hidden="true"></i>
									{{username this}}
								</a>
							</div>
							<div class="tag-btn group-member-tag-btn-remove addon">
								<button
									class="js-member-remove-btn"
									title="{{mf 'group.settings.removeFromGroup' 'remove member'}}"
									type="button">
									<i class="fa fa-remove" aria-hidden="true"></i>
								</button>
							</div>
						{{/each}}
					</div>
					<div class="form-group">
						<label>{{mf 'group.settings.field.addMembers' 'Add a new member to your group'}}</label>
						<div class="input-group">
							<span class="input-group-addon">
								<span class="fa fa-user fa-fw" aria-hidden="true"></span>
							</span>
							<input class="js-search-users form-control"
								id="AddGroupMember"
								placeholder= "{{mf 'group.settings.field.addMember.placeholder' 'Type name of buddy'}}"
								size="40"
								type="text"/>
						</div>
					</div>
					<div class="tag-group multiline">
						{{#each foundUsers}}
							<div class="tag tag-link group-member-tag">
								<a href="{{pathFor 'userprofile' _id=this._id}}">
									<i class="fa fa-user fa-fw" aria-hidden="true"></i>
									{{username this._id}}
								</a>
							</div>
							<div class="tag-btn group-member-tag-btn-add addon">
								<button
									class="js-member-add-btn"
									title="{{mf 'group.settings.addMember' 'add as member'}}"
									type="button">
									<i class="fa fa-plus" aria-hidden="true"></i>
								</button>
							</div>
						{{/each}}
					</div>
				</div>
			</div>
			<div class="details-addition">
				<h3>
					<span class="glyphicon glyphicon-link fa-fw" aria-hidden="true"></span>
					{{mf 'group.linksCollection.title' '{NAME}-views' NAME=siteName}}
				</h3>
				<ul class="group-links">
					<li>Infoscreen-Link: <a href="{{kioskEventURL}}">{{kioskEventURL}}</a></li>
					<li>Timetable-Link: <a href="{{timetableURL}}">{{timetableURL}}</a></li>
					<li>Schedule-Link: <a href="{{scheduleURL}}">{{scheduleURL}}</a></li>
					<li>iframe-Eventboxes-Link: <a href="{{frameEventsURL}}">{{frameEventsURL}}</a></li>
					<li>iframe-weekly-calendar-Link: <a href="{{frameWeekURL}}">{{frameWeekURL}}</a></li>
					<li>iframe-calendar-Link: <a href="{{frameCalendarURL}}">{{frameCalendarURL}}</a></li>
					<li>iframe-List-Link: <a href="{{frameListURL}}">{{frameListURL}}</a></li>
				</ul>
			</div>
		{{/with}}
	</form>
</template>
