{# USAGE: This templates is for a three purposes, P1: user can see own profile. P2: admin is viewing others profile. P3: admin is adding new user #} {% extends "base.html.twig" %} {% block BeforeAnyCSSFile %} {% for file in encore_entry_css_files('select2__init') %} {% endfor %} {% endblock %} {% if is_granted('ROLE_SETTING_MANAGER') %} {% if category == 's' %} {% set pagename = 'Student Management' | trans %} {% set addBtnTitle = 'Add New Student?' | trans %} {% set addBtnLink = path('add_new_user') %} {% elseif category == 'a' %} {% set pagename = 'Employees Management' | trans %} {% set addBtnTitle = 'Add New Employee?' | trans %} {% set addBtnLink = path('add_new_admin_or_employee') %} {% elseif category == 't' %} {% set pagename = 'Teacher Management' | trans %} {% set addBtnTitle = 'Add New Teacher?' | trans %} {% set addBtnLink = path('add_new_teacher') %} {% else %} {% set pagename = 'User Management' | trans %} {% endif %} {% endif %} {% block MainContent %} {% set otherProfile = app.request.attributes.get('_route') == 'my_profile' ? false : true %} {% set addNewUser = false %} {% if app.request.attributes.get('_route') == 'add_new_user' or app.request.attributes.get('_route') == 'add_new_teacher' or app.request.attributes.get('_route') == 'add_new_admin_or_employee' %} {% set addNewUser = true %} {% endif %} {% set allowedUpdateOrAddRoles = ['ROLE_STUDENT_MANAGER'] %} {% set allowUpdateOrAdd = false %} {% if is_granted(allowedUpdateOrAddRoles) or not otherProfile %} {% set allowUpdateOrAdd = true %} {% endif %}

{# Basic information #}

{{ 'Basic Information'|trans }}

{{ 'User Info:'|trans }}

{# first name div. #}
{# last name div #}
{# email address div.#}
{% if userDetails.category == 'g' %} {# phone div #}
{% endif %}
{% if allowUpdateOrAdd %}
{% if userDetails.id is empty %} {% endif %} {% if addNewUser %}   {% else %}   {% endif %}
{% endif %}
{# Account information request #} {% if userDetails.category != 'g' %}

{{ 'Account Information'|trans }}

{{ 'Account:'|trans }}

{# admission number #}
{% if userDetails.category == 's' or app.request.attributes.get('_route') == 'add_new_user' %} {% else %} {% endif %}
{% if is_granted('ROLE_STUDENT_MANAGER') %} {% elseif userDetails.category != 'g' %}

{{ userDetails.admission_number }}

{% endif %}
{% if is_granted('ROLE_STUDENT_MANAGER') %} {# if current user is admin then give him option to edit his profile #} {% else %} {# if current user is normal use then show his roles in the list form. #}
    {% for role in userDetails.roles %} {% if role != 'ROLE_USER' %}
  • {{ role }}
  • {% endif %} {% endfor %}
{% endif %}
{# account information .#}

{{ 'Security:'|trans }}

{# deactive user account button #} {% set classAttr = 'd-none' %} {% if (getAppSetting('self_account_deactivation') == 'yes' or otherProfile) and userDetails.getIsActive %} {% set classAttr = '' %} {% endif %}

{{ userDetails.fName is empty ? 'This account' : userDetails.fName }} {{ 'is activated'|trans }}

{{ userDetails.fName is empty ? 'This account': userDetails.fName }} {{ 'is deactivated'|trans }}

{% if allowUpdateOrAdd %}
{% if addNewUser %}   {% else %}   {% endif %}
{% endif %}
{% endif %} {# Change password request #}

{{ 'Change Password'|trans }}

{# show only new password field to admins #} {% if app.request.attributes.get('_route') == 'my_profile' %}
{% else %} {# ignore the current password and verify password check #} {% endif %}
{% if app.request.attributes.get('_route') == 'my_profile' %}
{% endif %}
{% if allowUpdateOrAdd %}
{% if addNewUser %}   {% else %}   {% endif %} {##}
{% endif %}
{# only for the students #} {% if userDetails.category == 's' or app.request.attributes.get('_route') == 'add_new_user' and userDetails.id is not empty %} {# Student Encrollement #}

{{ 'Enrollment'|trans }}

{{ "Enrolled Classes"|trans }}

{# User's saved sections #} {% for enrolled_class in enrolledClasses %} {# get the class name #} {# class fee#} {# notes of the classes #} {# get the attached subjects #} {# actions #} {% if is_granted('ROLE_STUDENT_ENROLMENT') %} {% endif %} {% endfor %}
{{ 'Class Name'|trans }} {{ 'Fee'|trans }} {{ 'Notes'|trans }} {{ 'Subjects'|trans }}
{{ enrolled_class.getClassSession.name }}{{ enrolled_class.fee }}{{ enrolled_class.notes }} {% for enrolled_subjects in enrolled_class.getClassSessionEnrolmentSubjects.toArray() %} {{ enrolled_subjects.getClassSubject.getSubjectName }}
{% endfor %}
{# attached classes #} {% if is_granted('ROLE_STUDENT_ENROLMENT') %}
{# if current user is admin then give him option to edit viewed profile #}
{# display the subjects of enrolled classes #}
{% endif %}
{% if is_granted('ROLE_STUDENT_ENROLMENT') or allowUpdateOrAdd %}
{% if addNewUser %}   {% else %}   {% endif %}
{% endif %}
{# Student fee #}

{{ 'Student fee'|trans }}

{% for sf in specialFeeSchedule %} {% endfor %}
{{ "Fee Name"|trans }} {{ "Fee Amount"|trans }} {{ "Due Date"|trans }} {{ "Last Due Date"|trans }} {{ "Generation Date"|trans }} {{ "Session Name"|trans }} {{ "Action"|trans }}
{{ sf.getCsefsTitle }} {{ sf.getCsefsAmount }} {{ date_format(sf.getCsefsDueDate) }} {{ date_format(sf.getCsefsLastDueDate) }} {{ date_format(sf.getCsefsGenerationDate) }} {{ sf.getClassSessionEnrolment.getClassSession.name }}
{# {% if is_granted('ROLE_FEE_MANAGER') or allowUpdateOrAdd %}#} {% if is_granted('ROLE_SETTING_MANAGER') %} {# changer - Enable class fee or Student fee #}
{# special fee for student #}
{% include "fee/class_fee_schedule__content.html.twig" with {'classFee':classFee, 'classes':enrolledClasses, 'stu_fee':stu_fee,'u_r':userDetails.id} %}
{% endif %}
{% if allowUpdateOrAdd %}
{% if addNewUser %}   {% else %}   {% endif %}
{% endif %}
{# Reporting list #} {% endif %} {# Update custom field data #}

{{ 'More Information'|trans }}

{% set ColsClass = 'col-lg-6 col-md-6 col-sm-6 col-xs-12' %}
{% if addNewUser %} {% set source__ = 'add_new_user' %} {% else %} {% set source__ = 'profile' %} {% endif %} {% include "security/custom__fieldListView.html.twig" with {'fieldLIst':customFields,'ColsClass':ColsClass,'source_file':source__, 'userDetails' : userDetails} %}
{% if allowUpdateOrAdd %}
{% if addNewUser %}   {% else %}   {% endif %}
{% endif %}
{% endblock %} {% block ExtraJsFIles %} {% for file in encore_entry_js_files('usersProfile') %} {% endfor %}{% for file in encore_entry_js_files('studentFee') %} {% endfor %} {% endblock %} {% block documentation %}
Student Details

This Page suppose to add Student Information in Details, You can update or add Student Full Details from this page. This page divided into 8 Steps or Tab:

Warning: Input box behind the Asterik (*) supposed to be filled

{% endblock %}