summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index cf17346..4dca1a1 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -356,7 +356,7 @@ def editexpopage(request, path):
body = body.replace("\r", "")
result = "%s<head%s>%s</head>%s<body%s>\n%s</body>%s" % (preheader, headerargs, head, postheader, bodyargs, body, postbody)
- if result != html: # Check if content changed at all
+ if not filefound or result != html: # Check if content changed at all
try:
change_message = pageform.cleaned_data["change_message"]
write_and_commit([(filepath, result, "utf-8")], f'{change_message} - online edit of {path}')
@@ -382,6 +382,5 @@ class ExpoPageForm(forms.Form):
'''
title = forms.CharField(widget=forms.TextInput(attrs={'size':'60', 'placeholder': "Enter title (displayed in tab)"}))
html = forms.CharField(widget=HTMLarea(attrs={"height":"80%", "rows":20, 'placeholder': "Enter page content (using HTML)"},
- preview = True
- ))
+ preview = True), required=False)
change_message = forms.CharField(widget=forms.Textarea(attrs={"cols":80, "rows":3, 'placeholder': "Describe the change made (for version control records)"}))