2024-07-03 09:48:38 +01:00
|
|
|
{% extends "base.html" %}
|
|
|
|
|
|
|
|
{% block title %}Online text file editor{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
<h2>Editing text file (not fully working yet)</h2>
|
|
|
|
<style>
|
|
|
|
input, textarea, pre {font-family: monospace; font-weight: bold; text-align:left; font-size: 100%; padding: 0.5em; }
|
|
|
|
textarea {text-align:left }
|
|
|
|
pre {text-align:left; font-size: 110% }
|
|
|
|
</style>
|
|
|
|
<div style = "max-width:95%; margin-left:4%; font-family: monospace; font-weight: bold; font-size: 110%; text-align: left; " >
|
|
|
|
File: {{path}} <br>
|
|
|
|
Full path on server: {{filepath}}
|
2024-07-03 10:34:21 +01:00
|
|
|
{% if message %}
|
|
|
|
<p style="color:red">{{message}}</p>
|
|
|
|
{% endif %}
|
2024-07-03 09:48:38 +01:00
|
|
|
|
|
|
|
<form method ='post' >
|
|
|
|
{% csrf_token %}
|
|
|
|
<br />
|
|
|
|
<textarea {% if not user.username %} disabled{% endif %}
|
|
|
|
rows="{% if textrows%}{{textrows}}{% else %}20{% endif %}" cols="100"
|
|
|
|
label = "" name = "text"
|
2024-07-03 17:27:37 +01:00
|
|
|
required />{% if text %}{{text}}{% else %}Placeholder text{% endif %}
|
2024-07-03 09:48:38 +01:00
|
|
|
</textarea>
|
|
|
|
<br>
|
|
|
|
[Edit the text by just typing in the box.]
|
|
|
|
|
|
|
|
|
|
|
|
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px" name="Save" type = "submit"
|
|
|
|
title="Saves the file in UTF-8 characterset" value = "Save" >
|
|
|
|
Save the file
|
|
|
|
</button>
|
2024-07-03 10:34:21 +01:00
|
|
|
<button class="fancybutton2" style="padding: 0.5em 25px; margin-left: 110px" name="Cancel" type = "submit"
|
|
|
|
title="Aborts the editing" value = "Cancel" >
|
|
|
|
Cancel
|
|
|
|
</button>
|
2024-07-03 09:48:38 +01:00
|
|
|
</form>
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br />
|
|
|
|
<hr />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|