36 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
<!DOCTYPE html>
 | 
						|
<html lang="en">
 | 
						|
<head>
 | 
						|
    <meta charset="UTF-8">
 | 
						|
    <title>{% if file %}Edit /etc/hosts File{% else %}New /etc/hosts File{% endif %}</title>
 | 
						|
    <style>
 | 
						|
        body { font-family: Arial, sans-serif; background: #f1f1f1; padding: 20px; }
 | 
						|
        .container { max-width: 600px; margin: 0 auto; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px #ccc; }
 | 
						|
        label { display: block; margin-top: 1em; }
 | 
						|
        input[type="text"], textarea { width: 100%; padding: 8px; margin-top: 4px; box-sizing: border-box; }
 | 
						|
        button { margin-top: 1em; padding: 10px 20px; background: #007bff; border: none; color: #fff; cursor: pointer; border-radius: 4px; }
 | 
						|
        button:hover { background: #0056b3; }
 | 
						|
        .links { text-align: center; margin-top: 10px; }
 | 
						|
        .links a { color: #007bff; text-decoration: none; }
 | 
						|
        .links a:hover { text-decoration: underline; }
 | 
						|
 | 
						|
    </style>
 | 
						|
</head>
 | 
						|
<body>
 | 
						|
<div class="container">
 | 
						|
    <h1>{% if file %}Edit /etc/hosts File{% else %}New /etc/hosts File{% endif %}</h1>
 | 
						|
    <form method="POST" action="">
 | 
						|
        <label for="title">Name:</label>
 | 
						|
        <input type="text" name="title" id="title" value="{% if file %}{{ file.title }}{% endif %}" required>
 | 
						|
        <label for="content">Content:</label>
 | 
						|
        <textarea name="content" id="content" rows="15" required>{% if file %}{{ file.content }}{% endif %}</textarea>
 | 
						|
        <button type="submit">{% if file %}Save Changes{% else %}Create File{% endif %}</button>
 | 
						|
    </form>
 | 
						|
    <div class="links">
 | 
						|
        <a href="{{ url_for('list_hosts_files') }}">Back to /etc/hosts Files</a> |
 | 
						|
        <a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
 | 
						|
    </div>
 | 
						|
</div>
 | 
						|
</body>
 | 
						|
</html>
 |