<xf:macro name="option_form_block" arg-group="" arg-options="!" arg-containerBeforeHtml="">
	<xf:if is="$options is not empty">
		<xf:form action="{{ link('options/update') }}" ajax="true" class="block">
			{$containerBeforeHtml|raw}
			<div class="block-container">
				<h2 class="block-tabHeader tabs" data-xf-init="tabs" role="tablist">
					<a class="tabs-tab is-active"
					   role="tab"
					   tabindex="0"
					   aria-controls="uixGeneralOptions">
						{{ phrase('general_options') }}
					</a>
					<a class="tabs-tab"
					   role="tab"
					   tabindex="0"
					   aria-controls="uixSocialMedia">
						{{ phrase('thuix_social_media') }}
					</a>
				</h2>
				<ul class="tabPanes">
					<li class="is-active" role="tabpanel" id="uixGeneralOptions">
						<div class="block-body">
							<xf:foreach loop="$options" value="$option">
								<xf:if is="{$option.Relations.{$group.group_id}.display_order} < 2000">

									<xf:if is="$group">
										<xf:set var="$curHundred"
												value="{{ floor($option.Relations.{$group.group_id}.display_order / 100) }}" />
										<xf:if is="{{ $curHundred > $hundred }}">
											<xf:set var="$hundred" value="{$curHundred}" />
											<hr class="formRowSep" />
										</xf:if>
									</xf:if>

									<xf:macro template="option_macros"
											  name="option_row"
											  arg-group="{$group}"
											  arg-option="{$option}" />
								</xf:if>
							</xf:foreach>
						</div>
					</li>
					<li role="tabpanel" id="uixSocialMedia">
						<div class="block-body">
							<xf:foreach loop="$options" value="$option">
								<xf:if is="{$option.Relations.{$group.group_id}.display_order} >= 2000 AND {$option.Relations.{$group.group_id}.display_order} < 3000">

									<xf:if is="$group">
										<xf:set var="$curHundred"
												value="{{ floor($option.Relations.{$group.group_id}.display_order / 100) }}" />
										<xf:if is="{{ $curHundred > $hundred }}">
											<xf:set var="$hundred"
													value="{$curHundred}" />
											<hr class="formRowSep" />
										</xf:if>
									</xf:if>

									<xf:macro template="option_macros"
											  name="option_row"
											  arg-group="{$group}"
											  arg-option="{$option}" />
								</xf:if>
							</xf:foreach>
						</div>
					</li>
				</ul>
				<xf:submitrow sticky="true" icon="save" />
			</div>
		</xf:form>
	</xf:if>
</xf:macro>