Skip to content

Commit

Permalink
view domain
Browse files Browse the repository at this point in the history
  • Loading branch information
devfemibadmus committed Mar 2, 2024
1 parent d040d61 commit 0245e5e
Showing 1 changed file with 24 additions and 36 deletions.
60 changes: 24 additions & 36 deletions templates/server/domain.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
<!--User profile-->
<p>User: {{request.user.username}}</p>
<p>Domain: {{domain}}</p>
<!--End user profile-->

<!--User domains-->
{% with domains=request.user.get_owned_domains %}
{% for domain in domains %}
<p>{{domain.name}} {{domain.name}}</p>
{% endfor %}
{% endwith %}
<!--End user domains-->

<!--Mail messages-->
{% if request.domain_obj %}
{{request.domain_obj.name}}
{% with emails=request.domain_obj.get_emails %}
{% for email in emails %}
<p>{{email.sender}} {{email.message}}</p>
{% endfor %}
{% endwith %}
{% endif %}
<!--End mail messages-->

<!--Messages or notification-->
<!-- Messages -->
{% for message in messages %}
<p>{{message.tags}} {{message}}</p>
<p>{{ message.tag }} {{ message }}</p>
{% endfor %}
<!--End messages-->

<!--
/domain/[
messages -> get messages -> GET -> ?domain ?categories ?id
messages/clear -> clear messages -> GET -> ?domain ?categories ?id
messages/create -> create message -> POST -> ?domain ?categories
messages/download -> download message -> GET -> ?domain ?categories ?id
]
-->
<br/>

{% if domain %}
<p>Domain: {{ domain.name }}</p>
{% with users=domain.get_virtual_users %}
<form method="post">
<p>password is encrypt u can only change password</p>
{% csrf_token %}
<label for="email">Select Email:</label>
<select id="email" name="email">
{% for user in users %}
{% if forloop.first %}
<option value="{{ user.email }}" selected>{{ user.email }}</option>
{% else %}
<option value="{{ user.email }}">{{ user.email }}</option>
{% endif %}
{% endfor %}
</select>
<input type="password" name="password"/>
<button type="submit">Submit</button>
</form>
{% endwith %}
{% endif %}

0 comments on commit 0245e5e

Please sign in to comment.