Rev 6875 | Rev 8917 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><script type="text/javascript" src="/js/jquery-1.4.2.js"></script><script type="text/javascript" src="/js/jquery.validate.js"></script><script type="text/javascript">function showHide(option) {if (option.value == 'True') {document.getElementById('image-map-div').style.display = 'block';}else{document.getElementById('image-map-div').style.display = 'none';}}</script><script type="text/javascript">function validateForm(){var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;var y=document.forms["uploadFileToMyFolder"]["imageName"].value;if (x==null || x==""){alert("Banner name must be filled out");return false;}if (y==null || y=="" ){alert("Image name must be filled out along with file extension");return false;}}</script><script type="text/javascript">$(function() {$('#add-map').live('click', function(){$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');});});$(document).ready(function() {//alert("document ready");$('#cancelbutton').click(function(e) {window.location.href = '/user-image';});});</script><style type="text/css">* { font-family: Verdana; font-size: 96%; }label {float: left;width: 150px;}#image-map-div {display:none;}select {width: 100px;}</style><title>Upload Banner</title></head><body><h2>New Banner</h2><div style="padding-bottom: 20px;" id="upload-form"><form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post"><label for="isActive">Active / InActive : </label><select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select><br></br><label for="imagePath">Image Path : </label><input name="userImage" id="file" type="file"><br></br><label for="bannerName">Banner Name : </label><input id="bannerName" name="bannerName" type="text"/><br></br><label for="imageName">Image Name : </label><input id="imageName" name="imageName" type="text"/><span class="red" style="color: red;">*File extension mandatory<span></span></span><br></br><label for="link">Link : </label><input id="link" name="link" type="text"/><br></br><label for="priority">Priority : </label><select name="priority">#foreach( $val in [1..10] )#if ($val == 1)<option value='$val' selected="selected">$val</option>#else<option value='$val'>$val</option>#end#end</select><br></br><label for="hasMap">Add Map : </label><select name="hasMap" id="has_Map" onchange="showHide(this)"><option selected="selected" value="False">No</option><option value="True">Yes</option></select><br></br><div id = "image-map-div" align = "left"><h3>Map Details</h5><div id = "image-map-container"><label>Coordinates : </label><input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/><br></br><label>Link : </label><input id="mapLink" name = "mapLink" type = "textbox"/></div><img id = "add-map" src = "/images/add.png" /></div><br><input style="margin-top: 8px;" name="upload" value="Upload" type="submit"><input type="button" id="cancelbutton" name="cancel" value="Cancel"/></form></div></body></html>