diff --git a/fhem/FHEM/01_FHEMWEB.pm b/fhem/FHEM/01_FHEMWEB.pm index 578167c39..668433ba0 100755 --- a/fhem/FHEM/01_FHEMWEB.pm +++ b/fhem/FHEM/01_FHEMWEB.pm @@ -142,6 +142,7 @@ FHEMWEB_Initialize($) closeConn:1,0 column defaultRoom + editConfig:1,0 endPlotNow:1,0 endPlotToday:1,0 fwcompress:0,1 @@ -1752,17 +1753,23 @@ FW_style($$) $data =~ s/&/&/g; + $attr{global}{configfile} =~ m,([^/]*)$,; + my $readOnly = (AttrVal($FW_wname, "editConfig", ($1 ne $fileName)) ? + "" : "readonly"); + my $ncols = $FW_ss ? 40 : 80; FW_pO "
"; FW_pO "
"; - FW_pO FW_submit("save", "Save $fileName"); - FW_pO "  "; - FW_pO FW_submit("saveAs", "Save as"); - FW_pO FW_textfieldv("saveName", 30, "saveName", $fileName); - FW_pO "

"; + if(!$readOnly) { + FW_pO FW_submit("save", "Save $fileName"); + FW_pO "  "; + FW_pO FW_submit("saveAs", "Save as"); + FW_pO FW_textfieldv("saveName", 30, "saveName", $fileName); + FW_pO "

"; + } FW_pO FW_hidden("cmd", "style save $fileName $cfgDB"); FW_pO FW_hidden("fwcsrf", $defs{$FW_wname}{CSRFTOKEN}) if($FW_CSRF); - FW_pO ""; FW_pO "
"; FW_pO "
"; @@ -2746,6 +2753,14 @@ FW_widgetOverride($$) See also the clearSvgCache command for clearing the cache.
+ +
  • editConfig
    + If this FHEMWEB attribute is set to 1, then you will be able to edit + the FHEM configuration file (fhem.cfg) in the "Edit files" section. + After saving this file a rereadcfg is executed automatically, which has + a lot of side effects.
    +

  • +
  • endPlotToday
    If this FHEMWEB attribute is set to 1, then week and month plots will @@ -3327,6 +3342,14 @@ FW_widgetOverride($$) Siehe den clearSvgCache Befehl um diese Daten zu löschen.

  • + +
  • editConfig
    + Falls dieses FHEMWEB Attribut (auf 1) gesetzt ist, dann kann man die + FHEM Konfigurationsdatei in dem "Edit files" Abschnitt bearbeiten. Beim + Speichern dieser Datei wird automatisch rereadcfg ausgefuehrt, was + diverse Nebeneffekte hat.
    +

  • +
  • endPlotToday
    Wird dieses FHEMWEB Attribut gesetzt, so enden Wochen- bzw. Monatsplots