## $Header: /cvs/sakai2/legacy/tools/src/webapp/vm/chat/chef_chat-customize.vm,v 1.3 2005/05/23 16:04:03 gsilver.umich.edu Exp $
## chef_chat-customize.vm, use with org.chefproject.ChatAction.java
##     context: $chat_channel: String channel name
##              $chat_ascending: Ascending flag
##              $chat_channels: List of potential channel ids
##              $chat_channel_form: form name for selected channel
##				$new_chat_channel: 
##              $chat_ascending_form: form name for ascending field
##              $action: action= value
##              $form-submit: submit button name
##
<div class="portletBody">
	<h3>
		$tlang.getString("custom.cuschat")
	</h3>
		#if ($alertMessage)<div class="alertMessage">$tlang.getString("gen.alert") $validator.escapeHtml($alertMessage)</div><div class="clear"></div>#end
		<form name="customize" id="customize" action="#toolForm("$action")" method="post">
		<h4 class="indnt1">
	      $tlang.getString("custom.chatroom")
		</h4>
		<p class="instruction indnt3">
			$tlang.getString("custom.which")
		</p>
		#set($optionCounter=0)
		#if ($default_chat_channel == $chat_channel)
			<p class="checkbox indnt3">
				<input 
				type="radio" 
				value="$default_chat_channel" 
				name="$chat_channel_form" 
				id="$validator.escapeHtml("${chat_channel_form}_$optionCounter")" 
				checked="checked" />
				<label for="$validator.escapeHtml("${chat_channel_form}_$optionCounter")">
				   $tlang.getString("custom.use1")
				</label>
			</p>
		#set($optionCounter=$optionCounter + 1)
		#else
			<p class="checkbox indnt3">
				<input 
				type="radio" 
				value="$chat_channel" 
				name="$chat_channel_form" 
				id="$validator.escapeHtml("${chat_channel_form}_$optionCounter")" 
				checked="checked" />
				<label for="$validator.escapeHtml("${chat_channel_form}_$optionCounter")">
				   $tlang.getString("custom.use2") "$chat_channel"
				</label>
			</p>
			#set($optionCounter=$optionCounter + 1)
			<p class="checkbox indnt3">
				<input 
					type="radio" 
					value="$default_chat_channel" 
					name="$chat_channel_form" 
					id="$validator.escapeHtml("${chat_channel_form}_$optionCounter")" />
				<label for="$validator.escapeHtml("${chat_channel_form}_$optionCounter")">
					$tlang.getString("custom.use1")
				</label>
			</p>
			#set($optionCounter=$optionCounter + 1)
		#end
		#foreach ($channel in $chat_channels)
			#if (!$channel.equals($chat_channel) && !$channel.equals($default_chat_channel))
				<p class="checkbox indnt3">
					<input 
					type="radio" 
					value="$channel" 
					name="$chat_channel_form" 
					id="$validator.escapeHtml("${chat_channel_form}_$optionCounter")" />
					<label for="$validator.escapeHtml("${chat_channel_form}_$optionCounter")">
						$tlang.getString("custom.use2") "$channel"
					</label>
				</p>
				#set($optionCounter=$optionCounter + 1)
			#end
		#end
		<p class="checkbox indnt3">
			<input 
				type="radio" 
				value="$new_chat_channel" 
				onclick="if(checked) document.getElementById('new-channel').focus()"
				onkeypress="if(checked) document.getElementById('new-channel').focus()"
				name="$chat_channel_form" 
				id="$validator.escapeHtml("${chat_channel_form}_new_channel")" />
			<label for="$validator.escapeHtml("${chat_channel_form}_new_channel")">
				$tlang.getString("custom.use3")
			</label>
			<label for="$form_new_channel">
				$tlang.getString("custom.called")
			</label>
			<input 
				type="text"
				class="indnt2"
				name="$form_new_channel" 
				id="$form_new_channel" 
				onclick="document.getElementById('${chat_channel_form}_new_channel').checked=true" 
				onkeypress="document.getElementById('${chat_channel_form}_new_channel').checked=true" 
				onchange="document.getElementById('${chat_channel_form}_new_channel').checked=true" 
				size="30" />
		</p>
		<h4  class="indnt1">
			$tlang.getString("custom.msgdisp")
		</h4>
		<p class="instruction indnt3">
			$tlang.getString("custom.howmany")
		</p>
		<p class="checkbox indnt3">
			<input 
			type="radio" 
			name="$filter_type_form" 
			id="$validator.escapeHtml("${filter_type_form}-SelectAllMessages")" 
			#if($filter_type == "SelectAllMessages")
				checked="checked"
			#end 
			value="SelectAllMessages" />
			<label for="${filter_type_form}-SelectAllMessages">
				$tlang.getString("custom.showall")
			</label>
		</p>
				<p class="checkbox indnt3">
			<input 
			type="radio" 
			name="$filter_type_form" 
			id="${filter_type_form}_SelectMessagesByNumber" 
			#if($filter_type == "SelectMessagesByNumber") 
				checked="checked"
			#end
			value="SelectMessagesByNumber" 

			onclick="if(checked) document.getElementById('$filter_number_param_form').focus()"
			onkeypress="if(checked) document.getElementById('$filter_number_param_form').focus()"

			/>
			<label for="${filter_type_form}_SelectMessagesByNumber">
				$tlang.getString("custom.showlast")
			</label>
			<input 
			type="text" 
			name="$filter_number_param_form" 
			id="$filter_number_param_form" 
			size="3" 
			onclick="document.getElementById('${filter_type_form}_SelectMessagesByNumber').checked=true"
			onkeypress="document.getElementById('${filter_type_form}_SelectMessagesByNumber').checked=true"
			onchange="document.getElementById('${filter_type_form}_SelectMessagesByNumber').checked=true"
			value="$!filter_number_param" />
			<label for="$filter_number_param_form"> $tlang.getString("custom.mess")</label>
		</p>	
		<p class="checkbox indnt3">
			<input 
			type="radio" 
			name="$filter_type_form" 
			id="${filter_type_form}_SelectMessagesByTime" 
			#if($filter_type == "SelectMessagesByTime") 
				checked="checked"
			#end 
			value="SelectMessagesByTime"

			onclick="if(checked) document.getElementById('$filter_days_param_form').focus()" />

			<label for="${filter_type_form}_SelectMessagesByTime">
				$tlang.getString("custom.showpast")
			</label>

			<input 
			type="text" 
			name="$filter_days_param_form" 

			id="$filter_days_param_form" 

			size="3" 
			onclick="document.getElementById('${filter_type_form}_SelectMessagesByTime').checked=true"
			onchange="document.getElementById('${filter_type_form}_SelectMessagesByTime').checked=true"
			value="$!filter_days_param" />
			<label for="$filter_days_param_form"> $tlang.getString("custom.days")</label>
		</p>
		<div class="act">
			<input type="submit" class="active" name="$form-submit" value="$tlang.getString("gen.save")"  accesskey="s" />
			<input type="submit" name="$form-cancel" value="$tlang.getString("gen.cancel")"  accesskey="x" />
		</div>
	</form>
</div>
