summaryrefslogtreecommitdiff
path: root/certificate/templates/download.html
blob: 232a9f5c124447f0e3edb924413465452beb5707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{% extends 'base.html' %}

{% block content %}
          <div class="modal fade" id="invalidModal" tabindex="-1" role="dialog" aria-labelledby="invalidModalLabel" aria-hidden="true">
              <div class="modal-dialog">
                <div class="modal-content">
                  <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title" id="invalidModalLabel">Invalid Email ID</h4>
                  </div>
                  <div class="modal-body">
                    Email ID you entered is not registered. Please use the Email ID which you used while registering for the conference.
                  </div>
                </div>
              </div>
          </div>
          <form class="col-lg-12" action="" method="post">
            {% csrf_token %}
            {{ error }}
            <div class="input-group" style="width:340px;text-align:center;margin:0 auto;">
            <input style="width:450;" class="form-control input-lg" placeholder="Enter the email address you used for registration" type="text" id="email" name=email>
              <span class="input-group-btn"><button class="btn btn-lg btn-primary" type="submit">Get Certificate</button></span>
            </div>
            <hr>
            <p>Please choose the appropriate one</p>
            <input type="radio" name="type" id="P" value="P" checked="True">Participant
            &nbsp;&nbsp;<input type="radio" name="type" id="A" value="A">Speaker
            &nbsp;&nbsp;<input type="radio" name="type" id="W" value="W">Workshop
            <hr>
            <br>
            <center>
            {% if user_papers %}
                <br><br>
                <span><h3>Papers presented</h3><span>
                {% for user in user_papers %}
                <br>
                <input type="radio" name="paper" value="{{ user.paper }}">{{ user.paper }}
                {% endfor %}
                {% endif %}
                {% if workshops %}
                <br><br>
                <span><h3>Workshop Attended</h3><span>
                {% for user in workshops %}
                <br>
                <input type="radio" name="workshop" value="{{ user.workshops }}">{{ user.workshops }}
                {% endfor %}
          {% endif %}
          </center>
          </form>
          <center><h4>Problem in downloading certificate ? write to us at <a href="mailto:info@fossee.in">info[at]fossee[dot]in</a></h4>
{% endblock %}

{% block javascript %}
<script>
    $(document).ready(function(){
        value = "{{ v }}"
        email = ""
        if(value == "paper"){
            $('#A').prop('checked', true)
            email = "{{ user_papers.0.email }}";
        }
        if(value == "workshop"){
            $('#W').prop('checked', true)
            email = "{{ workshops.0.email }}"
        }
        $('#email').val(email);
    });
</script>
<script>
notreg = {{ notregistered }}
$( document ).ready(function() {
    if(notreg == 1)
    {
        $("#invalidModal").modal(); 
    }
});
</script>
{% endblock %}