mirror of
https://github.com/writeas/writefreely
synced 2025-02-08 03:18:49 +01:00
Merge pull request #110 from writeas/fix-rtl
Enable un-setting RTL setting via web
This commit is contained in:
commit
73f627a6c2
7
posts.go
7
posts.go
@ -67,7 +67,8 @@ type (
|
|||||||
}
|
}
|
||||||
|
|
||||||
AuthenticatedPost struct {
|
AuthenticatedPost struct {
|
||||||
ID string `json:"id" schema:"id"`
|
ID string `json:"id" schema:"id"`
|
||||||
|
Web bool `json:"web" schema:"web"`
|
||||||
*SubmittedPost
|
*SubmittedPost
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,6 +624,10 @@ func existingPost(app *app, w http.ResponseWriter, r *http.Request) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.Web {
|
||||||
|
p.IsRTL.Valid = true
|
||||||
|
}
|
||||||
|
|
||||||
if p.SubmittedPost == nil {
|
if p.SubmittedPost == nil {
|
||||||
return ErrPostNoUpdatableVals
|
return ErrPostNoUpdatableVals
|
||||||
}
|
}
|
||||||
|
@ -263,6 +263,7 @@
|
|||||||
</dd>
|
</dd>
|
||||||
<dt> </dt><dd><input type="submit" value="Save changes" /></dd>
|
<dt> </dt><dd><input type="submit" value="Save changes" /></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
<input type="hidden" name="web" value="true" />
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user