Add IntelliJ IDEA project configuration files

This commit adds IntelliJ IDEA-specific configuration files for the project, including module setup, version control integration, inspection profiles, and workspace settings. These files facilitate development environment configuration for contributors using IntelliJ IDEA.
This commit is contained in:
2025-07-03 18:43:27 +03:00
parent 0eefaad424
commit 78d570ad4f
17 changed files with 1022 additions and 95 deletions
+51 -10
View File
@@ -1,14 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Register User</title>
</head>
<body>
{% extends 'client-base.html' %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
{{ form }}
<button type="submit">Register</button>
</form>
</body>
</html>
<script>
document.addEventListener('DOMContentLoaded', function() {
const userTypeSelect = document.getElementById('id_user_type');
const companyPerms = document.getElementById('id_company_permissions');
const employeePerms = document.getElementById('id_employee_permissions');
function handleUserTypeChange(select) {
console.log('User type changed to:', userTypeSelect.value); // Add this line
// {#if (!userTypeSelect || !companyPerms || !employeePerms) return;#}
const isSuperuser = {{ user.is_superuser|yesno:"true,false" }};
const isCompanyAdmin = ('{{ user.user_type }}' === 'CA');
// Remove disabled attribute first
companyPerms.removeAttribute('disabled');
employeePerms.removeAttribute('disabled');
switch(userTypeSelect.value) {
case 'CL': // Client
companyPerms.disabled = false;
employeePerms.disabled = true;
break;
case 'EM': // Employee
companyPerms.disabled = true;
employeePerms.disabled = false;
break;
default:
companyPerms.disabled = true;
employeePerms.disabled = true;
break;
}
companyPerms.parentElement.hidden = companyPerms.disabled;
employeePerms.parentElement.hidden = employeePerms.disabled;
}
// Add change event listener
if (userTypeSelect) {
userTypeSelect.addEventListener('change', handleUserTypeChange);
// Initial call to set up the form correctly
handleUserTypeChange();
}
});
</script>
{% endblock content %}