Skip to content

Commit 2cdd073

Browse files
committed
tweaks to request form ui
- Legacy-Id: 10898
1 parent 3b609f6 commit 2cdd073

4 files changed

Lines changed: 62 additions & 17 deletions

File tree

ietf/meeting/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,15 +892,15 @@ def sort_key(session):
892892
@role_required('Area Director','Secretariat','IRTF Chair','WG Chair')
893893
def interim_request(request):
894894
'''View for requesting an interim meeting'''
895-
form = InterimRequestForm(request=request)
895+
#form = InterimRequestForm(request=request)
896896

897897
if request.method == 'POST':
898898
form = InterimRequestForm(request, data=request.POST)
899899
if form.is_valid():
900900
form.save()
901901
return redirect(upcoming)
902902
else:
903-
form = InterimRequestForm(request=request)
903+
form = InterimRequestForm(request=request,initial={'meeting_type':'single'})
904904

905905
return render(request, "meeting/interim_request.html", {"form":form})
906906

ietf/static/ietf/css/ietf.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,3 +448,17 @@ form.navbar-form input.form-control.input-sm { width: 141px; }
448448
padding: inherit;
449449
outline: inherit;
450450
}
451+
452+
/* Interim Meetings
453+
========================================================================== */
454+
#meeting-type-options {
455+
display: inline-block;
456+
margin-left: 4em;
457+
}
458+
459+
.fieldset {
460+
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12) !important;
461+
background-color: #f1f1f1;
462+
padding: 16px 16px;
463+
margin-bottom: 20px;
464+
}
Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
2+
var interimRequest = {
3+
// functions for Interim Meeting Request
4+
init : function() {
5+
interimRequest.form = $(this);
6+
$('.select2-field').select2();
7+
$('#id_face_to_face').change(interimRequest.toggleLocation);
8+
$('#id_face_to_face').each(interimRequest.toggleLocation)
9+
},
10+
11+
toggleLocation : function() {
12+
if(this.checked){
13+
$("#id_city").prop('disabled', false);
14+
$("#id_country").prop('disabled', false);
15+
$("#id_timezone").prop('disabled', false);
16+
} else {
17+
$("#id_city").prop('disabled', true);
18+
$("#id_country").prop('disabled', true);
19+
$("#id_timezone").prop('disabled', true);
20+
}
21+
}
22+
}
23+
124
$(document).ready(function () {
2-
$('.select2-field').select2();
25+
$('#interim-request-form').each(interimRequest.init);
326
});

ietf/templates/meeting/interim_request.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,42 @@
1515
{% origin %}
1616
<h1>Interim Meeting Request</h1>
1717

18-
<form method="post" class="form-horizontal">
18+
<form id="interim-request-form" role="form" method="post" class="form-horizontal">
1919
{% csrf_token %}
2020

2121
{% bootstrap_field form.group layout='horizontal' %}
2222

23-
<div class="form-group">
24-
<div class="checkbox">
25-
<label class="checkbox-inline">{% render_field form.face_to_face class="form-control" %}Face to Face</label>
26-
</div>
23+
<div class="form-group form-inline">
24+
<div class="col-md-offset-2">
2725

26+
<div class="col-md-3">
27+
<!-- <div class="checkbox"> -->
28+
<label class="checkbox-inline">{% render_field form.face_to_face %}<strong>Face to Face</strong></label>
29+
<!-- </div> -->
30+
</div>
31+
32+
33+
<!-- <div id="meeting-type-options"> -->
34+
<div class="col-md-2 radio-inline"><strong>Meeting Type:</strong></div>
2835
<label class="radio-inline">
29-
<input type="radio" name="optradio">Option 1
36+
<input type="radio" value="single" name="meeting_type">Single
3037
</label>
3138
<label class="radio-inline">
32-
<input type="radio" name="optradio">Option 2
39+
<input type="radio" value="multi-day" name="meeting_type">Multi-Day
3340
</label>
3441
<label class="radio-inline">
35-
<input type="radio" name="optradio">Option 3
42+
<input type="radio" value="series" name="meeting_type">Series
3643
</label>
44+
<!-- </div> -->
3745

38-
{% render_field form.multi_day class="form-control" %}
39-
{% render_field form.series class="form-control" %}
40-
46+
</div>
47+
4148
</div>
4249

43-
50+
<div class="fieldset">
4451
<div class="form-group">
4552
<label for="face-to_face" class="col-md-2 control-label">Location</label>
46-
<div class="form-inline">
53+
<div class="col-md-10 form-inline">
4754
{% render_field form.city class="form-control" placeholder="City" %}
4855
{% render_field form.country class="form-control" %}
4956
{% render_field form.timezone class="form-control" %}
@@ -68,13 +75,14 @@ <h1>Interim Meeting Request</h1>
6875

6976
<div class="form-group">
7077
<label for="agenda" class="col-md-2 control-label">Agenda</label>
71-
<div class="col-md-10">{% render_field form.agenda class="form-control" placeholder="Meeting agenda" %}</div>
78+
<div class="col-md-10">{% render_field form.agenda class="form-control" rows="6" placeholder="paste agenda here" %}</div>
7279
</div>
7380

7481
<div class="form-group">
7582
<label for="agenda_note" class="col-md-2 control-label">Agenda Note</label>
7683
<div class="col-md-10">{% render_field form.agenda_note class="form-control" placeholder="Note" %}</div>
7784
</div>
85+
</div> <!-- fieldset -->
7886

7987
{% buttons %}
8088
<button type="submit" class="btn btn-primary">Submit</button>

0 commit comments

Comments
 (0)