<html>
<head>
<title>{$site_name}</title>
<mets http-equiv=Content-Type content="text/html; charset=utf-8">
<link href="{$cssurl}/administrator.css" type=text/css rel=stylesheet>
{literal}
<script type="text/javascript">
  function checkForm() {
  title = document.getElementById("title").value;
  description = document.getElementById("description").value;
  
  if (title == "") {
  hideAllErrors();
document.getElementById("titleError").style.display = "inline";
document.getElementById("title").select();
document.getElementById("title").focus();
  return false;
  } else if (description == "") {
hideAllErrors();
document.getElementById("descriptionError").style.display = "inline";
document.getElementById("description").select();
document.getElementById("description").focus();
  return false;
  }
  return true;
  }
 
  function hideAllErrors() {
document.getElementById("titleError").style.display = "none"
document.getElementById("descriptionError").style.display = "none"
  }

</script>

<style>
  .error {
  font-family: Tahoma;
font-size: 8pt;
  color: red;
background-color: "#FFFF99";
font-weight: bold;
  margin-left: 5px;
  display:none;
  } 
</style>
{/literal}
</head>
<body>
<br>

<table width="90%" align="center" cellpadding="5" cellspacing="5">
<tr>
	<td>
    	<h3>Edit Video</h3>
    </td>
</tr>
<tr>
    <td colspan="2" height="1" bgcolor="#dfdfdf"></td>
</tr>
<table>

<form onSubmit="return checkForm();" action="listvideosedit.php" method="POST" enctype="multipart/form-data" name="form">
<table width="90%" align="center" cellpadding="5" cellspacing="5">
<tr>
	<td width="40%"><b>Title</b></td>
    <td>
    	<input type="text" id="title" name="title" value='{$video.title}' size="40"><br>
        <div align="center" class="error" id="titleError">ERROR: Please enter a video title.</div>
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Description</b></td>
    <td>
    	<textarea type=text value="{$video.description}" id=description name="description" rows=3 cols=40>{$video.description}</textarea><br>
        <div class=error id=descriptionError>ERROR: Please enter the video description.<br></div>
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Tags</b></td>
    <td>
    	<textarea type=text value="{$video.tags}" id="tags" name="tags" rows=3 cols=40>{$video.tags}</textarea><br>
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Categories</b></td>
    <td>
    			<select id="categories" name="categories">
                {insert name=get_video_categories assign=listvideocategories}
            	{section name=o loop=$listvideocategories}
	    		<option value="{$listvideocategories[o].CATID}" {if $video.categories eq $listvideocategories[o].CATID}selected{/if}>{$listvideocategories[o].name}</option>
            	{/section}
                </select>
        <br>
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Featured</b></td>
    <td>
    	<input type="radio" id="featured" name="featured" value="0" {if $video.featured eq "0"}checked{/if}>No
        <input type="radio" id="featured" name="featured" value="1" {if $video.featured eq "1"}checked{/if}>Yes
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Active</b></td>
    <td>
    	<input type="radio" id="active" name="active" value="0" {if $video.active eq "0"}checked{/if}>No
        <input type="radio" id="active" name="active" value="1" {if $video.active eq "1"}checked{/if}>Yes
    </td>
</tr>
<tr>
    <td width="40%" valign="top"><b>Mature</b></td>
    <td>
    	<input type="radio" id="mature" name="mature" value="0" {if $video.mature eq "0"}checked{/if}>No
        <input type="radio" id="mature" name="mature" value="1" {if $video.mature eq "1"}checked{/if}>Yes
    </td>
</tr>

<tr>
        <td colspan="2" align='center'>
        <input type="hidden" id="VIDEOID" name="VIDEOID" value='{$video.VIDEOID}' size="40">
        <input type='submit' name='edit_video' value='Submit'></td>
</tr>
<tr>
        <td colspan="2">&nbsp;</td>
</tr>
</table>
</form>

</body>
</head>
</html>