diff options
author | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-24 03:34:02 +0100 |
---|---|---|
committer | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-24 03:43:24 +0100 |
commit | 6966eb6938356224c61760ec44a15c2e690311e3 (patch) | |
tree | a3fdc93176a37f061c5c995ae27b746a4e737498 | |
parent | Adding RECAPTCHA, more standards work (diff) | |
download | gentoaster-6966eb6938356224c61760ec44a15c2e690311e3.tar.gz gentoaster-6966eb6938356224c61760ec44a15c2e690311e3.tar.bz2 gentoaster-6966eb6938356224c61760ec44a15c2e690311e3.zip |
Added disk size cap
-rw-r--r-- | web/index.php | 10 | ||||
-rw-r--r-- | web/js/gentoaster.js | 14 |
2 files changed, 17 insertions, 7 deletions
diff --git a/web/index.php b/web/index.php index 43be192..6b6abec 100644 --- a/web/index.php +++ b/web/index.php @@ -37,6 +37,11 @@ <script type="text/javascript" src="/js/bbq.js"></script> <script type="text/javascript" src="/js/jquery-ui-1.8.14.custom.min.js"></script> <script type="text/javascript" src=" /js/jquery.form.wizard.js"></script> + <script type="text/javascript"> + var RecaptchaOptions = { + theme : 'clean' + }; + </script> </head> <body> <div id="container"> @@ -108,7 +113,7 @@ <h1>Partitioning</h1> <label for="partitioning_size">Disk size</label><br /> - <input id="partitioning_size" class="required" type="text" name="size" value="4096"><br> + <input id="partitioning_size" class="required" type="text" name="image_size" value="4096"><br> <label for="">Split</label><br /><br /> <div id="partitioning_split" name="split"></div><br /><br /> @@ -148,6 +153,9 @@ </div> </form> </div> + <script type="text/javascript"> + MAX_DISK_SIZE = <?php echo MAX_DISK_SIZE; ?>; + </script> <script type="text/javascript" src=" /js/gentoaster.js"></script> </body> </html> diff --git a/web/js/gentoaster.js b/web/js/gentoaster.js index 99cd514..2ff875b 100644 --- a/web/js/gentoaster.js +++ b/web/js/gentoaster.js @@ -25,9 +25,10 @@ $(function(){ root_size: { min: 3072 }, - size: { - min: 4020 - } + image_size: { + min: 4020, + max: MAX_DISK_SIZE + }, }, messages: { username: { @@ -49,9 +50,10 @@ $(function(){ root_size: { min: "Your root partition must be at least 3072MB" }, - size: { - min: "Your disk image must be at least 4020MB" - } + image_size: { + min: "Your disk image must be at least 4020MB", + max: "Your disk image cannot be larger than "+MAX_DISK_SIZE+"MB" + }, } } }); |