summaryrefslogtreecommitdiffstats
path: root/usr/local/www/installer/installer.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-12-19 16:14:44 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-12-19 16:14:44 -0500
commita17f284ccf3279b1f04b174b8a58d6de5396c849 (patch)
treed3851a613ebb7483cc30ac251237a595da6cb1cc /usr/local/www/installer/installer.php
parenta1532937b1c5b5be837d7400dcb43f2f53018efc (diff)
downloadpfsense-a17f284ccf3279b1f04b174b8a58d6de5396c849.zip
pfsense-a17f284ccf3279b1f04b174b8a58d6de5396c849.tar.gz
Add rowhelper_onChange variable for row helper and remove the previous function detection code
Diffstat (limited to 'usr/local/www/installer/installer.php')
-rw-r--r--usr/local/www/installer/installer.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php
index cfc2d57..dae33f6 100644
--- a/usr/local/www/installer/installer.php
+++ b/usr/local/www/installer/installer.php
@@ -709,7 +709,27 @@ function installer_custom() {
page_table_start($g['product_name'] . " installer - Customize disk(s) layout");
echo <<<EOF
<script type="text/javascript">
- function row_helper_dynamic_custom(tr) {
+ function onfstypeChange() {
+ for(var x = 0; x<99; x++) { //optimize me better
+ if(\$('fstype' + x)) {
+ var fstype = \$F('fstype' + x);
+ if(fstype.substring(fstype.length - 4) == ".eli") {
+ \$('encpass' + x).disabled = 0;
+ if(!encryption_warning_shown) {
+ alert('NOTE: If you define a disk encryption password you will need to enter it on *EVERY* bootup!');
+ encryption_warning_shown = true;
+ }
+ } else {
+ \$('encpass' + x).disabled = 1;
+ }
+ }
+ }
+ }
+ onfstypeChange();
+ </script>
+ <script type="text/javascript">
+ function row_helper_dynamic_custom() {
+ onfstypeChange();
var totalsize = 0;
for(var x = 0; x<99; x++) { //optimize me better
if(\$('size' + x)) {
@@ -742,6 +762,7 @@ function installer_custom() {
rows = 1;
totalrows = 1;
loaded = 1;
+ rowhelper_onChange = " onChange='javascript:row_helper_dynamic_custom()' ";
</script>
<form action="installer.php" method="post">
<input type="hidden" name="state" value="verify_before_install">
@@ -886,23 +907,6 @@ EOF;
<script type="text/javascript">
var encryption_warning_shown = false;
\$('contentdiv').appear();
- function onfstypeChange() {
- for(var x = 0; x<99; x++) { //optimize me better
- if(\$('fstype' + x)) {
- var fstype = \$F('fstype' + x);
- if(fstype.substring(fstype.length - 4) == ".eli") {
- \$('encpass' + x).disabled = 0;
- if(!encryption_warning_shown) {
- alert('NOTE: If you define a disk encryption password you will need to enter it on *EVERY* bootup!');
- encryption_warning_shown = true;
- }
- } else {
- \$('encpass' + x).disabled = 1;
- }
- }
- }
- }
- onfstypeChange();
</script>
</center>
</td></tr>
OpenPOWER on IntegriCloud