refactor: rename app from itsm -> app

used app as this is a root application and not a django project app

!1
This commit is contained in:
2024-05-13 17:39:54 +09:30
parent eb9eeff4ed
commit 0edfba604a
41 changed files with 18 additions and 18 deletions

View File

@ -0,0 +1,78 @@
{% extends 'base.html.j2' %}
{% block title %}Organization - {{ organization.name }}{% endblock %}
{% block body%}
<form method="post">
{% csrf_token %}
<section class="content-header">
<fieldset><label>Name</label><!-- <input type="text" value="{{ organization.name }}" /> -->{{form.name}}</fieldset>
<fieldset><label>Created</label><input type="text" value="{{ organization.created }}" readonly /></fieldset>
<fieldset><label>Modified</label><input type="text" value="{{ organization.modified }}" readonly /></fieldset>
</section>
<input type="submit" value="Submit">
<input type="button" value="New Team" onclick="window.location='{% url 'Access:_team_add' organization.id %}';">
</form>
{{ formset.non_form_errors.as_ul }}
<form method="post">
{{form.name.as_hidden}}
{% csrf_token %}
<!-- <input type="submit" value="Submit"> -->
{{ formset.management_form }}
{{ formset.non_form_errors.as_ul }}
<table id="formset" class="form">
{% for form in formset.forms %}
{% if forloop.first %}
<thead>
<tr>
<!-- {% for field in form.visible_fields %}
<th>{{ field.label|capfirst }}</th>
{% endfor %} -->
<th>Team Name</th>
<th>Created</th>
<th>Modified</th>
</tr>
</thead>
{% endif %}
<tr>
{% for field in form.visible_fields %}
{% if field.name == 'team_name' and form.initial.id %}
<td>
{# Include the hidden fields in the form #}
{% if forloop.first %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
{% endif %}
{{ field.errors.as_ul }}
<a href="{% url 'Access:_organization' organization.id %}team/{{ form.initial.id }}">{{ form.instance.team_name }}</a>
{{ field.as_hidden }}
</td>
<td>{% if form.initial.id %}{{ form.instance.created }}{% endif %}</td>
<td>{% if form.initial.id %}{{ form.instance.modified }}{% endif %}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</table>
<!--
<br>
<hr>
<hr>
{{ formset.forms.0.initial }}
{% for key, value in formset.forms.items %}
{{values}}
<hr>
{% endfor%} -->
{% endblock %}