3838 < div class ="col-md-8 margin-right ">
3939 < h2 > {% if vote %}Review applications{% else %}{{ app.user.name }}'s application{% endif %}
4040 {% if vote %}
41- < span style ="font-size:18px ">
41+ < span style ="font-size:18px ">
4242 ({{ apps_left_to_vote }} left)
4343 </ span >
4444 {% endif %}
4545 </ h2 >
4646 < a target ="_blank " style ="color:black; text-decoration: none; " class ="pull-right fa-solid fa-link "
47- href ="{% url 'app_detail' app.uuid_str %} ">
47+ href ="{% url 'app_detail' app.uuid_str %} ">
4848 </ a >
4949
5050 < dl class ="dl-horizontal ">
@@ -62,7 +62,7 @@ <h3>Personal</h3>
6262 {% include 'include/field.html' with desc='Email' value=app.user.email %}
6363 {% include 'include/field.html' with desc='Travel reimbursement?' value=app.reimb|yesno:'Yes,No,Maybe' %}
6464 {% include 'include/field.html' with desc='Money needed' value=app.reimb_amount %}
65- {% include 'include/field.html' with desc='Origin' value=app.origin %}
65+ {% include 'include/field.html' with desc='Origin' value=app.origin %}
6666 {% endif %}
6767 {% include 'include/field.html' with desc='Under age (-18)' value=app.under_age|yesno:'Yes,No,Maybe' %}
6868 {% if app.resume %}
@@ -176,7 +176,7 @@ <h4>{{ comment.text }}</h4>
176176 < input type ="hidden " name ="app_id " value ="{{ app.pk }} "/>
177177 < textarea id ="commentSection " name ="comment_text " class ="form-control " placeholder ="Write a comment... " rows ="3 " required maxlength ="500 "> </ textarea >
178178 < input type ="hidden " name ="add_comment " value ="comment ">
179- < button id ="submitCommentButton " type ="submit " class ="btn btn-block btn-default "> Add comment
179+ < button id ="submitCommentButton " type ="submit " class ="btn btn-block btn-default " style =" margin-bottom: 10px; " > Add comment
180180 </ button >
181181 </ form >
182182 < script >
@@ -197,7 +197,7 @@ <h4>{{ comment.text }}</h4>
197197 } ) ;
198198 </ script >
199199 < script >
200- // JS script to handle the dubious modal
200+ // JS script to handle the dubious modal
201201 document . addEventListener ( 'DOMContentLoaded' , function ( ) {
202202 const confirmBtn = document . getElementById ( 'confirmDubious' ) ;
203203 if ( confirmBtn ) {
@@ -347,7 +347,7 @@ <h5 class="modal-title" id="dubiousModalLabel">Select Dubious Type</h5>
347347
348348 </ form >
349349 </ div >
350- {% elif app and user.is_director %}
350+ {% elif app and user.is_director %}
351351 < div class ="panel-footer ">
352352
353353 {% if app.is_blacklisted %}
@@ -530,5 +530,80 @@ <h5 class="modal-title" id="dubiousModalLabel">Select Dubious Type</h5>
530530 </ button >
531531 </ form >
532532 </ div >
533+ {% else%}
534+ < div class ="panel-footer ">
535+ < form action ="" method ="post ">
536+ {% csrf_token %}
537+ < input type ="hidden " name ="app_id " value ="{{ app.pk }} "/>
538+ {% if user.can_review_dubious and app.is_pending%}
539+ < div class ="modal fade " id ="dubiousModal " tabindex ="-1 " role ="dialog " aria-labelledby ="dubiousModalLabel " aria-hidden ="true ">
540+ < div class ="modal-dialog " role ="document ">
541+ < div class ="modal-content ">
542+ < div class ="modal-header ">
543+ < h5 class ="modal-title " id ="dubiousModalLabel "> Select Dubious Type</ h5 >
544+ < button type ="button " class ="close " data-dismiss ="modal " aria-label ="Close ">
545+ < span aria-hidden ="true "> ×</ span >
546+ </ button >
547+ </ div >
548+ < div class ="modal-body ">
549+ < div class ="form-group ">
550+ < label > Why is this application dubious?</ label >
551+ < div class ="icon-options-container text-center mb-3 ">
552+ < div class ="row ">
553+ < div class ="col-3 mb-3 ">
554+ < div class ="icon-option " data-value ="INVALID_CV ">
555+ < i class ="fas fa-file-alt fa-2x mb-2 "> </ i >
556+ < div > Invalid CV</ div >
557+ </ div >
558+ </ div >
559+ < div class ="col-3 mb-3 ">
560+ < div class ="icon-option " data-value ="LATE_GRAD ">
561+ < i class ="fas fa-graduation-cap fa-2x mb-2 "> </ i >
562+ < div > Wrong Graduation</ div >
563+ </ div >
564+ </ div >
565+ < div class ="col-3 ">
566+ < div class ="icon-option " data-value ="NOT_STUDENT ">
567+ < i class ="fas fa-briefcase fa-2x mb-2 "> </ i >
568+ < div > Not a Student</ div >
569+ </ div >
570+ </ div >
571+ < div class ="col-3 ">
572+ < div class ="icon-option " data-value ="INVALID_SCHOOL ">
573+ < i class ="fas fa-school fa-2x mb-2 "> </ i >
574+ < div > Invalid School</ div >
575+ </ div >
576+ </ div >
577+ < div class ="col-3 ">
578+ < div class ="icon-option " data-value ="OTHER ">
579+ < i class ="fas fa-question fa-2x mb-2 "> </ i >
580+ < div > Other</ div >
581+ </ div >
582+ </ div >
583+ </ div >
584+ </ div >
585+ < input type ="hidden " id ="dubiousType " name ="dubious_type " required >
586+
587+ < label for ="commentBox "> Add a comment on why it's dubious</ label >
588+ < textarea id ="commentBox " name ="dubious_comment " class ="form-control " placeholder ="Write a comment... " rows ="3 " maxlength ="500 "> </ textarea >
589+ </ div >
590+ </ div >
591+ < div class ="modal-footer ">
592+ < button type ="button " class ="btn btn-secondary " data-dismiss ="modal "> Cancel</ button >
593+ < button type ="submit " class ="btn btn-warning " id ="confirmDubious "> Confirm</ button >
594+ </ div >
595+ </ div >
596+ </ div >
597+ </ div >
598+
599+ < button type ="button " class ="btn btn-warning btn-block " data-toggle ="modal " data-target ="#dubiousModal ">
600+ Dubious Application
601+ </ button >
602+ < input type ="hidden " name ="set_dubious " value ="true ">
603+ < input type ="hidden " name ="dubious_type " id ="dubiousTypeInput ">
604+ < input type ="hidden " name ="dubious_comment_text " id ="commentTextInput ">
605+ {% endif %}
606+ </ form >
607+ </ div >
533608 {% endif %}
534609{% endblock %}
0 commit comments