<script type="text/javascript">
	$(document).ready(function(){
		$("form#groups-form").validate();
		$("form#groups-form #groups-name").rules("add", {required: true});
	});
</script>
<h1>{{$lang.Attributes_group}}</h1>
<form action="?p={{$_GET.p}}" method="post" name="form" id="groups-form" >
	<fieldset>
		<input type="hidden" name="iGroup" value="{{$aGroup.iGroup}}" />
		<table class="details">
			<thead>
				<tr>
					<th class="name">{{$lang.Name}}</th><td class="value"><input id="groups-name" type="text" name="sName" value="{{$aGroup.sName}}" size="80" maxlength="255" alt="simple" class="input" /></td><td class="help"></td>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td colspan="3">
						<ul id="AttributesList">
							{{foreach from=$aGeneralInfo.aAttributes item=sAttribute}}
								<li><label><input name="aAttributes[]" value="{{$sAttribute@key}}" type="checkbox" {{if in_array( $sAttribute@key, $aGroup.aAttributes )}}checked="checked"{{/if}} />{{$sAttribute}}</label></li>
							{{/foreach}}
						</ul>
					</td>
				</tr>
			</tbody>
		</table>
		<div class="save float"><div class="save floatcontainer">
			<input type="submit" class="submit" value="&laquo; {{$lang.return}}" onclick="location.href = '?p=attributes-list'; return false;" />
			<input type="submit" class="submit" value="{{$lang.Save}} &raquo;" name="sOption" />
		</div></div>
	</fieldset>
</form>