Subversion Repositories SmartDukaan

Rev

Rev 8433 | Rev 8917 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6848 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>
4
	<script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
5
    <script type="text/javascript" src="/js/jquery.validate.js"></script>
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>
8433 amit.gupta 16
	<script type="text/javascript">
6875 kshitij.so 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
}
26
</script>
27
 
6848 kshitij.so 28
	<script type="text/javascript">
29
	$(function() {
30
	$('#add-map').live('click', function(){
31
		$('<br/><br/><label>Coordinates : </label> <input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>'
32
				+'<br/><br/><label>Link : </label> <input id="mapLink" name = "mapLink" type = "textbox"/>').appendTo('#image-map-container');
33
	 });
34
	});
6875 kshitij.so 35
	$(document).ready(function() {
36
  //alert("document ready");
37
  $('#cancelbutton').click(function(e) {
38
    window.location.href = '/user-image';
39
  });
40
});
6848 kshitij.so 41
	</script>
8578 kshitij.so 42
<script>
43
$(function() {
44
	$('#add-uri').live('click', function(){
45
		$('<br/><br/><label>URI To Map With: </label> <input id="uri" name = "uri" type = "textbox"/>'
46
		+'<br><br><label>Acitive / InActive : </label><select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>').appendTo('#uri-container');
47
	 });
48
	});
49
</script>
6848 kshitij.so 50
		<style type="text/css">
51
		* { font-family: Verdana; font-size: 96%; }
52
		label {
53
    float: left;
54
    width: 150px;
55
}
56
    #image-map-div {
57
     display:none;
58
    }
59
select {
60
    width: 100px;
61
}
62
		</style>
63
<title>Upload Banner</title>
64
</head>
65
<body>
66
<h2>New Banner</h2>
67
<div style="padding-bottom: 20px;" id="upload-form">
6875 kshitij.so 68
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
6848 kshitij.so 69
	  <label for="imagePath">Image Path : </label>
70
	  <input name="userImage" id="file" type="file">
71
	  <br></br>
72
	  <label for="bannerName">Banner Name : </label>
73
      <input id="bannerName" name="bannerName" type="text"/>
74
      <br></br>
75
      <label for="link">Link : </label>
76
      <input id="link" name="link" type="text"/>
77
	  <br></br>
8578 kshitij.so 78
	  <div id="uri-div">
79
		<div id="uri-container">
80
			<label>URI To Map With: </label>
81
			<input id="uri" name="uri" type="textbox"/>
82
			<br><br>
83
			<label>Acitive / InActive : </label>
84
			<select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
85
		</div>
86
	  <img id = "add-uri" src = "/images/add.png" />
87
	  <br></br>
88
	  </div>
6848 kshitij.so 89
      <label for="priority">Priority : </label>
90
      <select name="priority">
91
		#foreach( $val in [1..10] )
92
			#if ($val == 1)
93
				<option value='$val' selected="selected">$val</option>
94
			#else
95
				<option value='$val'>$val</option>
96
			#end	
97
		#end
98
		</select>
99
	  <br></br>
100
	  <label for="hasMap">Add Map : </label>
101
      <select name="hasMap" id="has_Map" onchange="showHide(this)"><option selected="selected" value="False">No</option><option value="True">Yes</option></select>
102
      <br></br>
103
	  <div id = "image-map-div" align = "left">
104
				<h3>Map Details</h5>
105
                <div id = "image-map-container">
106
    				<label>Coordinates : </label>
107
    				<input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>
108
					<br></br>
109
    				<label>Link : </label>
110
    				<input id="mapLink" name = "mapLink" type = "textbox"/>
111
                </div>
112
				<img id = "add-map" src = "/images/add.png" />
113
            </div>
114
	  <br>
115
	  <input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
6875 kshitij.so 116
	  <input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
6848 kshitij.so 117
</form>
118
</div>
119
</body>
120
</html>