Subversion Repositories SmartDukaan

Rev

Rev 20424 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
20424 kshitij.so 1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
3
<head>
20427 kshitij.so 4
	<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
5
    <script type="text/javascript" src="/js/jquery.validate.js"></script>
20424 kshitij.so 6
	<script type="text/javascript">
7
     function showHide(option) {
8
     if (option.value == 'True') {
9
         document.getElementById('image-map-div').style.display = 'block';
10
        }
11
        else{
12
        document.getElementById('image-map-div').style.display = 'none';
13
        }
14
     }
15
    </script>
16
	<script type="text/javascript">
17
function validateForm()
18
{
19
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
20
if (x==null || x=="")
21
  {
22
  alert("Banner name must be filled out");
23
  return false;
24
  }
25
var y=document.forms["uploadFileToMyFolder"]["userImage"].value;
26
	if (y==null || y=="")
27
  {
28
  alert("No image file selected");
29
  return false;
30
  }
31
}
32
</script>
33
 
34
	<script type="text/javascript">
35
	$(function() {
36
	$('#add-map').live('click', function(){
37
		$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
38
				+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
39
	 });
40
	});
41
	$(document).ready(function() {
42
  //alert("document ready");
43
  $('#cancelbutton').click(function(e) {
20427 kshitij.so 44
    window.location.href = '/banner';
20424 kshitij.so 45
  });
46
});
47
	</script>
48
<script>
49
$(function() {
50
	$('#add-uri').live('click', function(){
51
		$('<br/><br/><label>On Page: </label> <input id="uri" name = "uri" type = "textbox"/>'
52
		+'<br><br><label>Acitive / InActive : </label><select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select><br><br><label>Target: </label><select id ="linkTarget" name="linkTarget"><option selected="selected" value="False">Same Window</option><option value="True">New Window</option></select>').appendTo('#uri-container');
53
	 });
54
	});
55
</script>
56
		<style type="text/css">
57
		* { font-family: Verdana; font-size: 96%; }
58
		label {
59
    float: left;
60
    width: 150px;
61
}
62
    #image-map-div {
63
     display:none;
64
    }
65
select {
66
    width: 100px;
67
}
68
		</style>
69
<title>Upload Banner</title>
70
</head>
71
<body>
72
<a href="/banner">Back to listing</a>
73
<h2>New Banner</h2>
74
<div style="padding-bottom: 20px;" id="upload-form">
20427 kshitij.so 75
<form id="uploadFileToMyFolder" name="banner" action="/banner" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
20424 kshitij.so 76
	  <label for="imagePath">Image Path : </label>
77
	  <input name="userImage" id="file" type="file">
78
	  <br></br>
79
	  <label for="bannerName">Banner Name : </label>
80
      <input id="bannerName" name="bannerName" type="text"/>
81
      <br></br>
82
	  <label for="fileExtenstion">Image Extention : </label>
83
	  <select name="fileExtention" id="fileExtention"><option selected="selected" value="jpg">jpg</option><option value="jpeg">jpeg</option><option value="png">png</option><option value="gif">gif</option></select>
84
	  <br></br>
85
      <label for="link">Link : </label>
86
      <input id="link" name="link" type="text"/>
87
	  <br></br>
88
	  <label>Target : </label>
89
	  <select id ="linkTarget" name="sameWindowTarget"><option selected="selected" value="true">Same Window</option><option value="false">New Window</option></select>
90
	  <br><br>
91
      <label for="priority">Priority : </label>
92
      <select name="priority">
93
		#foreach( $val in [1..5] )
94
			#if ($val == 1)
95
				<option value='$val' selected="selected">$val</option>
96
			#else
97
				<option value='$val'>$val</option>
98
			#end	
99
		#end
100
		</select>
101
	  <br></br>
102
	  <input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
103
	  <input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
104
</form>
105
</div>
106
</body>
107
</html>