Subversion Repositories SmartDukaan

Rev

Rev 8433 | Rev 8917 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8433 Rev 8578
Line 15... Line 15...
15
    </script>
15
    </script>
16
	<script type="text/javascript">
16
	<script type="text/javascript">
17
function validateForm()
17
function validateForm()
18
{
18
{
19
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
19
var x=document.forms["uploadFileToMyFolder"]["bannerName"].value;
20
var y=document.forms["uploadFileToMyFolder"]["imageName"].value;
-
 
21
if (x==null || x=="")
20
if (x==null || x=="")
22
  {
21
  {
23
  alert("Banner name must be filled out");
22
  alert("Banner name must be filled out");
24
  return false;
23
  return false;
25
  }
24
  }
26
if (y==null || y=="" )
-
 
27
  {
-
 
28
  alert("Image name must be filled out along with file extension");
-
 
29
  return false;
-
 
30
  }
-
 
31
}
25
}
32
</script>
26
</script>
33
 
27
 
34
	<script type="text/javascript">
28
	<script type="text/javascript">
35
	$(function() {
29
	$(function() {
Line 43... Line 37...
43
  $('#cancelbutton').click(function(e) {
37
  $('#cancelbutton').click(function(e) {
44
    window.location.href = '/user-image';
38
    window.location.href = '/user-image';
45
  });
39
  });
46
});
40
});
47
	</script>
41
	</script>
-
 
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>
48
		<style type="text/css">
50
		<style type="text/css">
49
		* { font-family: Verdana; font-size: 96%; }
51
		* { font-family: Verdana; font-size: 96%; }
50
		label {
52
		label {
51
    float: left;
53
    float: left;
52
    width: 150px;
54
    width: 150px;
Line 62... Line 64...
62
</head>
64
</head>
63
<body>
65
<body>
64
<h2>New Banner</h2>
66
<h2>New Banner</h2>
65
<div style="padding-bottom: 20px;" id="upload-form">
67
<div style="padding-bottom: 20px;" id="upload-form">
66
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
68
<form id="uploadFileToMyFolder" name="userImage" action="/user-image" onsubmit="return validateForm()" enctype="multipart/form-data" method="post">
67
	  <label for="isActive">Active / InActive : </label>
-
 
68
      <select name="isActive"><option selected="selected" value="False">InActive</option><option value="True">Active</option></select>
-
 
69
      <br></br>
-
 
70
	  <label for="imagePath">Image Path : </label>
69
	  <label for="imagePath">Image Path : </label>
71
	  <input name="userImage" id="file" type="file">
70
	  <input name="userImage" id="file" type="file">
72
	  <br></br>
71
	  <br></br>
73
	  <label for="bannerName">Banner Name : </label>
72
	  <label for="bannerName">Banner Name : </label>
74
      <input id="bannerName" name="bannerName" type="text"/>
73
      <input id="bannerName" name="bannerName" type="text"/>
75
      <br></br>
74
      <br></br>
76
	  <label for="imageName">Image Name : </label>
-
 
77
      <input id="imageName" name="imageName" type="text"/>
-
 
78
	  <span class="red" style="color: red;">*File extension mandatory<span></span></span>
-
 
79
      <br></br>
-
 
80
      <label for="link">Link : </label>
75
      <label for="link">Link : </label>
81
      <input id="link" name="link" type="text"/>
76
      <input id="link" name="link" type="text"/>
82
	  <br></br>
77
	  <br></br>
-
 
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>
83
      <label for="priority">Priority : </label>
89
      <label for="priority">Priority : </label>
84
      <select name="priority">
90
      <select name="priority">
85
		#foreach( $val in [1..10] )
91
		#foreach( $val in [1..10] )
86
			#if ($val == 1)
92
			#if ($val == 1)
87
				<option value='$val' selected="selected">$val</option>
93
				<option value='$val' selected="selected">$val</option>