{include file="$gentemplates/$header_tpl"}
	<div class="club">
        <h2>{$lang.section.club}</h2>
        {*if $form.err}
			<p>
			   *&nbsp;{$form.err}
			</p>
    	{/if*}
        <form name="club_form" id="club_form" action="{$site_root}/{$seo.club}?sel=save_club" method="post" enctype="multipart/form-data">
            <input type="hidden" name="id_club" value="{$data.id}"/>
			<div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.club_name}:</div>
				<div>
					<input type="text" onkeyup="BadWords('club_name');" id="club_name" name="club_name" value="{$data.name}" style="width: 220px;" maxlength="500"/>
                    <div id="bad_div_club_name" class="bad_div_left"></div>
				</div>
			</div>
			<div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.club_icon}:</div>
				<div>
					<input type="file" style="width: 300px;" name="upload"/>
				</div>
			</div>
			<div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.club_category}:</div>
				<div>
					<select style="width: 160px" name="club_category">
						<option value="0">{$lang.home_page.select_default}</option>
						{section name=s loop=$club_categories}
						  <option value="{$club_categories[s].id}" {if $club_categories[s].sel}selected="selected"{/if}>{$club_categories[s].name}</option>
						{/section}
					</select>
				</div>
			</div>
			<div class="form_edit_input">
				<div class="float_left">
					<input type="checkbox" name="open_join" value="1" {if $data.is_open}checked{/if}>
					&nbsp;{$lang.club.open_join}
				</div>
			</div>
			<div class="form_edit_input">
				<div class="float_left">
					<input type="checkbox" name="hidden_club" value="1"  {if $data.is_hidden}checked{/if}>
					&nbsp;{$lang.club.hidden_club}
				</div>
			</div>
            <div class="form_edit_input">
				<div class="float_left">
					<input type="checkbox" name="members_can_invite" value="1"  {if $data.can_invite}checked{/if}>
					&nbsp;{$lang.club.members_can_invite}
				</div>
			</div>
            <div class="form_edit_input">
				<div class="float_left">
					<input type="checkbox" name="members_can_post_images" value="1"  {if $data.can_post_images}checked{/if}>
					&nbsp;{$lang.club.members_can_post_images}
				</div>
			</div>
            <div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.country}:&nbsp;</div>
				<div>
					<select style="width: 160px" name="country" onchange="SelectRegion('qs', this.value, document.getElementById('region_div'), document.getElementById('city_div'));">
						<option value="0">{$lang.home_page.select_default}</option>
						{section name=s loop=$countries}
						<option value="{$countries[s].id}" {if $countries[s].sel}selected="selected"{/if}>{$countries[s].name}</option>
						{/section}
					</select>
				</div>
			</div>
            <div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.region}:&nbsp;</div>
				<div id="region_div">
					{if $regions}
					<select style="width: 160px" name="region" onchange="SelectCity('qs', this.value, document.getElementById('city_div'));">
						<option value="0">{$lang.home_page.select_default}</option>
						{section name=s loop=$regions}
						<option value="{$regions[s].id}" {if $regions[s].sel}selected="selected"{/if}>{$regions[s].name}</option>
						{/section}
					</select>
					{/if}&nbsp;
				</div>
			</div>
            <div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.city}:&nbsp;</div>
				<div id="city_div">
					{if $cities}
					<select style="width: 160px" name="city">
						<option value="0">{$lang.home_page.select_default}</option>
						{section name=s loop=$cities}
						<option value="{$cities[s].id}" {if $cities[s].sel}selected="selected"{/if}>{$cities[s].name}</option>
						{/section}
					</select>
					{/if}&nbsp;
				</div>
			</div>
            <div class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.description}:{*<br />{$lang.club.no_html}&nbsp;*}</div>
				{$redactor_description}
				<textarea id="description" name="description" class="redactor_normal">{*$data.description*}</textarea>
                <div id="bad_div_description" class="bad_div_left"></div>
			</div>
            <div class="form_edit_input">
				<div class="form_edit_input_text">
					<input type="checkbox" name="use_agreement" id="use_agreement" value="1" {if $data.use_agreement eq 1} checked{/if} onclick="AgreementForm();">
					&nbsp;{$lang.club.use_agreement}
				</div>
			</div>
            <div id="agreement_text_cont" class="form_edit_input">
				<div class="form_edit_input_text">{$lang.club.user_agreement}:{*<br />{$lang.club.no_html}&nbsp;*}</div>
				{$redactor_agreement_text}
				<textarea id="agreement_text" name="agreement_text" class="redactor_normal"></textarea>
                <div id="bad_div_agreement_text" class="bad_div_left"></div>
			</div>
			<div class="form_edit_input">
				<input type="submit" value="{$lang.button.save}" class="button">
			</div>
            </form>
        </div>
       {* {if $banner.right}<div style="float: left;">{$banner.right}</div>{/if}	*}	
    </div>

{literal}
<script type="text/javascript">
AgreementForm();
function AgreementForm() {
	if (document.getElementById('use_agreement').checked) {
		$('#agreement_text_cont').show();
	} else {
		$('#agreement_text_cont').hide();
	}
	return;
}
</script>
{/literal}
{include file="$gentemplates/$footer_tpl"}