Subversion Repositories SmartDukaan

Rev

Rev 8578 | Rev 9155 | 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>
8917 kshitij.so 66
<a href="/user-image">Back to listing</a>
6848 kshitij.so 67
<h2>New Banner</h2>
68
<div style="padding-bottom: 20px;" id="upload-form">
6875 kshitij.so 69
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
6848 kshitij.so 70
	  <label for="imagePath">Image Path : </label>
71
	  <input name="userImage" id="file" type="file">
72
	  <br></br>
73
	  <label for="bannerName">Banner Name : </label>
74
      <input id="bannerName" name="bannerName" type="text"/>
75
      <br></br>
8917 kshitij.so 76
	  <label for="fileExtenstion">Image Extention : </label>
77
	  <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>
78
	  <br></br>
6848 kshitij.so 79
      <label for="link">Link : </label>
80
      <input id="link" name="link" type="text"/>
81
	  <br></br>
8578 kshitij.so 82
	  <div id="uri-div">
83
		<div id="uri-container">
84
			<label>URI To Map With: </label>
85
			<input id="uri" name="uri" type="textbox"/>
86
			<br><br>
87
			<label>Acitive / InActive : </label>
88
			<select id ="isActive" name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
89
		</div>
90
	  <img id = "add-uri" src = "/images/add.png" />
91
	  <br></br>
92
	  </div>
6848 kshitij.so 93
      <label for="priority">Priority : </label>
94
      <select name="priority">
95
		#foreach( $val in [1..10] )
96
			#if ($val == 1)
97
				<option value='$val' selected="selected">$val</option>
98
			#else
99
				<option value='$val'>$val</option>
100
			#end	
101
		#end
102
		</select>
103
	  <br></br>
104
	  <label for="hasMap">Add Map : </label>
105
      <select name="hasMap" id="has_Map" onchange="showHide(this)"><option selected="selected" value="False">No</option><option value="True">Yes</option></select>
106
      <br></br>
107
	  <div id = "image-map-div" align = "left">
108
				<h3>Map Details</h5>
109
                <div id = "image-map-container">
110
    				<label>Coordinates : </label>
111
    				<input id="mapCoordinates" name = "mapCoordinates" type = "textbox"/>
112
					<br></br>
113
    				<label>Link : </label>
114
    				<input id="mapLink" name = "mapLink" type = "textbox"/>
115
                </div>
116
				<img id = "add-map" src = "/images/add.png" />
117
            </div>
118
	  <br>
119
	  <input style="margin-top: 8px;" name="upload" value="Upload" type="submit">
6875 kshitij.so 120
	  <input type="button" id="cancelbutton" name="cancel" value="Cancel"/>
6848 kshitij.so 121
</form>
122
</div>
123
</body>
124
</html>