diff --git a/FHEM/98_SVG.pm b/FHEM/98_SVG.pm index 10e37d18a..a4a52d3e3 100644 --- a/FHEM/98_SVG.pm +++ b/FHEM/98_SVG.pm @@ -531,7 +531,7 @@ SVG_PEdit($$$$) $ret .= ""; $ret .= (exists($conf{readonly}) ? - FW_submit("readonly", '.gplot file is set readonly'): + '.gplot file is "set readonly"' : FW_submit("submit", "Write .gplot file"))." ". FW_submit("showFileLogData", "Show preprocessed input"). ""; @@ -542,6 +542,12 @@ SVG_PEdit($$$$) if(defined($FW_pos{zoom}) && defined($FW_pos{off})) { $sl .= "&pos=zoom=$FW_pos{zoom};off=$FW_pos{off}"; } + my $ro=""; + if(exists($conf{readonly})) { + $ro = '$("table.plotEditor input").prop("readonly", true); + $("table.plotEditor input[type=checkbox]").prop("disabled", true); + $("table.plotEditor select").prop("disabled", true);'; + } $ret .= <<'EOF'; EOF return $ret; @@ -664,13 +671,6 @@ SVG_WriteGplot($) FW_digestCgi($arg); return if($FW_hiddenroom{detail}); - if($FW_webArgs{readonly}) { - $FW_RET .= - '
'. - "gplot file marked as readonly: won't write!". - '
'; - return 0; - } return SVG_showData() if($FW_webArgs{showFileLogData}); if(!defined($FW_webArgs{par_0_0})) {