diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-12-19 16:29:16 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-12-19 16:29:16 -0500 |
commit | 346cc87f87559f8d4bd75ca0c6dc01c9dce7fc6e (patch) | |
tree | a5645e9a9d02640ad481d2dfb1e06043af39a5c3 /usr | |
parent | 28a9cb7f4bbf0b5876a66e91525ff2ad93af099c (diff) | |
download | pfsense-346cc87f87559f8d4bd75ca0c6dc01c9dce7fc6e.zip pfsense-346cc87f87559f8d4bd75ca0c6dc01c9dce7fc6e.tar.gz |
Disable changing of allocated box. Merge two functions into one
Diffstat (limited to 'usr')
-rw-r--r-- | usr/local/www/installer/installer.php | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php index dbef003..ef97507 100644 --- a/usr/local/www/installer/installer.php +++ b/usr/local/www/installer/installer.php @@ -709,7 +709,8 @@ function installer_custom() { page_table_start($g['product_name'] . " installer - Customize disk(s) layout"); echo <<<EOF <script type="text/javascript"> - function onfstypeChange() { + function row_helper_dynamic_custom() { + var totalsize = 0; for(var x = 0; x<99; x++) { //optimize me better if(\$('fstype' + x)) { var fstype = \$F('fstype' + x); @@ -724,21 +725,18 @@ function installer_custom() { } } } - } - 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)) { if(parseInt($('size' + x).value) > 0) totalsize += parseInt($('size' + x).value); } } - \$('totalsize').value = totalsize; + if(\$('totalsize')) { + \$('totalsize').value = totalsize; + \$('totalsize').disabled = 1; + } } + row_helper_dynamic_custom(); </script> <script type="text/javascript" src="/javascript/row_helper_dynamic.js"></script> <script type="text/javascript"> @@ -1049,7 +1047,7 @@ function return_rowhelper_row($rownum, $mountpoint, $fstype, $disk, $size, $encp } // fstype form field - $custom_txt .= "<td><select onChange='javascript:onfstypeChange()' id='fstype{$rownum}' name='fstype{$rownum}'>"; + $custom_txt .= "<td><select onChange='javascript:row_helper_dynamic_custom()' id='fstype{$rownum}' name='fstype{$rownum}'>"; $select_txt = ""; foreach($types as $type => $desc) { if($type == $fstype) |