diff --git a/files/www/aredn.css b/files/www/aredn.css index 40c3b1b6..5785cabb 100644 --- a/files/www/aredn.css +++ b/files/www/aredn.css @@ -44,4 +44,16 @@ body table { border: solid 1px black; border-radius: 10px; background-color: rgb(108,231,232); -} \ No newline at end of file +} +#node_description_entry { +vertical-align: middle; +resize: none; +} +#node_description_display { +text-align: center; +vertical-align: middle; +background-color: gainsboro; +font-size: 12pt; +width: 40%; +} + diff --git a/files/www/black_on_white.css b/files/www/black_on_white.css index b6b215e8..e5819c9b 100644 --- a/files/www/black_on_white.css +++ b/files/www/black_on_white.css @@ -32,3 +32,15 @@ body table { .LogoDiv { position:absolute left:0px; width:100%; height:95; } .AREDNLogo { background: white; position:absolute; left:10%; width:175; height:95; } .PartOfAREDN { font-family:Verdana; font-size:xx-small; text-align:center; } + +#node_description_entry { +vertical-align: middle; +resize: none; +} +#node_description_display { +text-align: center; +vertical-align: middle; +background-color: whitesmoke; +font-size: 12pt; +width: 40%; +} diff --git a/files/www/cgi-bin/perlfunc.pm b/files/www/cgi-bin/perlfunc.pm index 59dad66a..c969bf45 100644 --- a/files/www/cgi-bin/perlfunc.pm +++ b/files/www/cgi-bin/perlfunc.pm @@ -199,6 +199,12 @@ sub read_postdata $line = fgets(10); push(@parse_errors, "not blank: '$line'") unless $line eq "\r\n"; $line = fgets(1000); + if($parm =~ 'description_node') { + $line = substr($line, 0, 210); + $line =~ s/'/'/g; + $line =~ s//>/g; + } $line =~ s/[\r\n]+$//; $parms{$parm} = $line; $state = "boundary"; diff --git a/files/www/cgi-bin/setup b/files/www/cgi-bin/setup index aa0fd846..c0fb8c13 100755 --- a/files/www/cgi-bin/setup +++ b/files/www/cgi-bin/setup @@ -433,13 +433,6 @@ if($parms{button_save}) push (@errors, "OK") unless @errors; } - if($description_node) - { - if($description_node =~ /<.*>|<\/.*>/) { - push(@errors, "Node description cannot contain html like tags") - } - } - unless(@errors) { $parms{node} = $node; @@ -564,7 +557,7 @@ function toggleMap(toggleButton) { print ""; alert_banner(); -print "
\n" unless $debug == 2; +print "\n" unless $debug == 2; print "\n" if $debug == 2; print "\n"; @@ -642,7 +635,7 @@ print " -"; +"; push @hidden, ""; print " @@ -965,6 +958,14 @@ page_footer(); print < + +function doSubmit() { + var desc_text = document.mainForm.description_node.value; + var singleLine = desc_text.replace(new RegExp( "\\n", "g" ), " "); + document.mainForm.description_node.value = singleLine; + return true; +} + var map = L.map('map').setView([0.0, 0.0], 1); var dotIcon = L.icon({iconUrl: '/dot.png'}); EOF diff --git a/files/www/cgi-bin/status b/files/www/cgi-bin/status index 5bd63836..1de0babc 100755 --- a/files/www/cgi-bin/status +++ b/files/www/cgi-bin/status @@ -78,7 +78,7 @@ alert_banner(); print "

$node"; print " / $tactical" if $tactical; print "

"; -print "$node_desc" if $node_desc; +print "
Node Description (optional)Verify Password
$node_desc
" if $node_desc; print "
\n"; # nav buttons diff --git a/files/www/cgi-bin/sysinfo.json b/files/www/cgi-bin/sysinfo.json index 5e023b19..00a71465 100755 --- a/files/www/cgi-bin/sysinfo.json +++ b/files/www/cgi-bin/sysinfo.json @@ -55,7 +55,7 @@ end info={} -- API version -info['api_version']="1.3" +info['api_version']="1.4" -- NODE name css=getUciConfType("system", "system") @@ -65,6 +65,9 @@ info['node']=css[0]['hostname'] m=os.capture("/usr/local/bin/get_model") info['model']=m:chomp() +-- DESCRIPTION +info['description']=css[0]['description'] + -- BOARD ID info['board_id']=hardware_boardid() diff --git a/files/www/help.html b/files/www/help.html index fa29c971..d8cde986 100644 --- a/files/www/help.html +++ b/files/www/help.html @@ -272,8 +272,7 @@ manually configure the network. The buttons on this page work as follows: