Skip to content

Commit c8d298a

Browse files
committed
Added spacing between buttons and dubious button for HX when seeing a detail application
1 parent e27073f commit c8d298a

File tree

3 files changed

+89
-14
lines changed

3 files changed

+89
-14
lines changed

app/static/css/custom-bootstrap.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}
817817
.btn-group-lg>.btn,.btn-lg{line-height:1.3333333;border-radius:8px}
818818
.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:8px}
819819
.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:8px}
820-
.btn-block{display:block;width:100%}
820+
.btn-block{display:block;width:100%;margin-top:5px}
821821
.btn-block+.btn-block{margin-top:5px}
822822
input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}
823823
.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}

applications/templates/application.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
{% endif %}
2525
<div style="padding-left: 15px; padding-right: 15px">
2626
<div class="alert alert-warning">
27-
{% if application.can_be_edit %}
28-
29-
30-
<p>
31-
Be careful, you can only edit the application until 2 hours after <b style="text-decoration: underline;">{{application.submission_date}}</b></p>
27+
{% if application.can_be_edit %}
28+
29+
30+
<p>
31+
Be careful, you can only edit the application until 2 hours after <b style="text-decoration: underline;">{{application.submission_date}}</b></p>
3232

3333
{% else %}
34-
<p>Your application has been reviewed already. Editing has been disabled to make sure all reviewers get the
34+
<p>Your application has been reviewed already. Editing has been disabled to make sure all reviewers get the
3535
same data. If you would like to change something important, please email us at {{ h_contact_email|urlize }}.</p>
36-
{% endif %}
36+
{% endif %}
3737
</div>
3838
</div>
3939
{% include 'include/application_form.html' %}

organizers/templates/application_detail.html

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
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">&times;</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

Comments
 (0)