Commit 04de548274f524c31142254b905c51be2e545d04

Authored by Valessio Soares de Brito
1 parent b528360b
Exists in master and in 1 other branch add_vagrant

fix bug submit null; insert alert js

src/web/static/css/style.css
... ... @@ -132,6 +132,7 @@ float: right;
132 132 }
133 133  
134 134 #maincontent {
  135 +padding-top: 10px;
135 136 }
136 137  
137 138 .align-left {
... ...
src/web/templates/layout.html
... ... @@ -28,6 +28,16 @@ $ url_base = "http://localhost:8080"
28 28 window.onload = function() {
29 29 setupDependencies('weboptions'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
30 30 };
  31 +
  32 +function validateForm()
  33 +{
  34 +var x=document.forms["weboptions"]["pkgs_list"].value
  35 +if (x==null || x=="Write your list App here or send a file list this icon:")
  36 + {
  37 + alert("Write your list App!");
  38 + return false;
  39 + }
  40 +}
31 41 </script>
32 42 <script type="text/javascript">
33 43 $$(document).ready(function() {
... ... @@ -45,7 +55,7 @@ window.onload = function() {
45 55 <div id="header">
46 56 <a href="$url_base" title="AppRecommender"><h1 id="logo"><span>AppRecommender</span></h1></a>
47 57 <div id="recommender-box">
48   - <form action="apprec" enctype="multipart/form-data" method="post" name="weboptions">
  58 + <form action="apprec" enctype="multipart/form-data" method="post" name="weboptions" onsubmit="return validateForm()">
49 59 <fieldset>
50 60 <div id="submit-box">
51 61 <input type="submit" value="RECOMMENDER" id="submit-button"><br />
... ...