diff options
author | pnshiralkar | 2020-05-04 16:36:33 +0530 |
---|---|---|
committer | pnshiralkar | 2020-05-04 16:36:33 +0530 |
commit | d380ab3f8f0c721bc80fc321119817606d9d8666 (patch) | |
tree | d79b9913052cdd1af137602aeaa22f32a2b53e50 /workshop_app/templates | |
parent | 477c4cd6057a97cb401c2d3227febf2b40533ff6 (diff) | |
download | workshop_booking-d380ab3f8f0c721bc80fc321119817606d9d8666.tar.gz workshop_booking-d380ab3f8f0c721bc80fc321119817606d9d8666.tar.bz2 workshop_booking-d380ab3f8f0c721bc80fc321119817606d9d8666.zip |
Added form errors and view profile, workshop name bug fixed
Diffstat (limited to 'workshop_app/templates')
3 files changed, 84 insertions, 86 deletions
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html index f39c8e8..b6e3731 100644 --- a/workshop_app/templates/workshop_app/my_workshops.html +++ b/workshop_app/templates/workshop_app/my_workshops.html @@ -101,13 +101,13 @@ {% if workshop.status == 1 and workshop.workshop_type %} {% if request.user.profile.position == 'instructor' %} <td> - <a href="{{ URL_ROOT }}/view_comment_profile/{{ workshop.coordinator.profile.user.id }}"> + <a href="{{ URL_ROOT }}/view_profile/{{ workshop.coordinator.profile.user.id }}"> {{ workshop.coordinator.get_full_name }}</a></td> <td>{{ workshop.coordinator.profile.institute }}</td> {% else %} <td>{{ workshop.instructor.get_full_name }}</td> {% endif %} - <td>{{ workshop.title |capfirst }}</td> + <td>{{ workshop.workshop_type |capfirst }}</td> {% if workshop.date > today %} <td>{{ workshop.date | date }} <span class="material-icons" style="cursor:pointer;" data-toggle="popinfo" @@ -132,38 +132,6 @@ {% endif %} <td><span class="badge badge-success">{{ workshop.get_status }}</span></td> {% endif %} - {% if workshop.status == 1 and workshop.condition_one %} - {% if request.user.profile.position == 'instructor' %} - <td> - <a href="{{ URL_ROOT }}/view_comment_profile/{{ workshop.coordinator.profile.user.id }}"> - {{ workshop.coordinator.get_full_name }}</a></td> - <td>{{ workshop.coordinator.profile.institute }}</td> - {% else %} - <td>{{ workshop.instructor.get_full_name }}</td> - {% endif %} - <td>{{ workshop.title }}</td> - {% if workshop.date > today %} - <td>{{ workshop.date | date }} - <span class="glyphicon glyphicon-calendar" - class="datepicker" data-toggle="popinfo" title="Note" - data-content="Click here to change date" - onclick="changeDate('P,{{ workshop.date | safe }}, {{ forloop.counter }}')"> - </span> - <div class="myDialogP{{ forloop.counter }}" style="display: none;" - title="Select New Date"> - - <input type="text" class="pDate{{ forloop.counter }}"/><br> - <button class="btn btn-primary btn-xs" type="submit" - onclick="submitNewDate('{{ forloop.counter }},P,{{ workshop.instructor_id }},{{ workshop.coordinator_id }},{{ workshop.title_id }},{{ workshop.date | safe }}')"> - Update - </button> - </div> - </td> - {% else %} - <td>{{ workshop.date | date }}</td> - {% endif %} - <td><span class="badge badge-success">{{ workshop.status }}</span></td> - {% endif %} </tr> </tbody> diff --git a/workshop_app/templates/workshop_app/propose_workshop.html b/workshop_app/templates/workshop_app/propose_workshop.html index 0f02c34..678d11e 100644 --- a/workshop_app/templates/workshop_app/propose_workshop.html +++ b/workshop_app/templates/workshop_app/propose_workshop.html @@ -60,7 +60,15 @@ {{ form.date }} <br> {{ form.tnc_accepted }} I accept the <a href="/tnc">terms and conditions</a> - <br><br> + <br> + {% if form.errors %} + <br> + <div style="text-align: left; border: 1px solid red; padding-top: 5px"> + <h5 style="text-align: center; color: red; font-weight: bolder">Errors</h5> + {{ form.errors }} + </div> + {% endif %} + <br> <button class="btn btn-success" type="submit">Submit</button> </form> </div> diff --git a/workshop_app/templates/workshop_app/view_profile.html b/workshop_app/templates/workshop_app/view_profile.html index 6be4b7e..9330cb0 100644 --- a/workshop_app/templates/workshop_app/view_profile.html +++ b/workshop_app/templates/workshop_app/view_profile.html @@ -1,62 +1,84 @@ {% extends 'workshop_app/base.html' %} {% block title %} - View Profile + Coordinator Profile {% endblock %} - {% block extra %} - <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> - <script src="{{URL_ROOT}}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> - {% endblock %} +{% block extra %} + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> + <script src="{{ URL_ROOT }}/static/workshop_app/js/bootstrap-3.3.7.min.js"></script> +{% endblock %} {% csrf_token %} {% block content %} - <div class="container"> - <table class="table table-bordered"> - <tr> - <th><label for="id_first_name"><h5>First name:</h5></label></th> - <th><label for="id_first_name"><h5>{{ user.first_name }}</h5></label></th> - </tr> - <tr> - <th><label for="id_last_name"><h5>Last name:</h5></label></th> - <th><label for="id_last_name"><h5>{{ user.last_name }}</h5></label></th> - </tr> - <tr> - <th><label for="id_email"><h5>Email:</h5></label></th> - <th><label for="id_email"><h5>{{ user.email }}</h5></label></th> - </tr> - <tr> - <th><label for="id_institute"><h5>Institute:</h5></label></th> - <th><label for="id_institute"><h5>{{ user.profile.institute }}</h5></label></th> - </tr> - <tr> - <th><label for="id_phone_number"><h5>Phone Number:</h5></label></th> - <th><label for="id_phone_number"><h5>{{ user.profile.phone_number }}</h5></label></th> - </tr> - <tr> - <th><label for="id_department"><h5>Department:</h5></label></th> - <th><label for="id_department"><h5>{{ user.profile.department }}</h5></label></th> - </tr> - <tr> - <th><label for="id_location"><h5>Location:</h5></label></th> - <th><label for="id_location"><h5>{{ user.profile.location }}</h5></label></th> - </tr> - <tr> - <th><label for="id_position"><h5>Position:</h5></label></th> - <th><label for="id_position"><h5>{{ user.profile.position }}</h5></label></th> - </tr> - </table> - <br> - <a class="btn btn-primary" href="{{ URL_ROOT }}/edit_profile/">Edit Profile</a> - {% if user.profile.position == 'instructor' %} - <a class="btn btn-primary " href="{{ URL_ROOT }}/download/">Download Workshop</a> - {% endif %} - - - </div> - - - + <div class="container"> + <table class="table table-bordered"> + <tr> + <th><label for="id_first_name"><h5>First name:</h5></label></th> + <th><label for="id_first_name"><h5>{{ coordinator_profile.user.first_name }}</h5></label></th> + </tr> + <tr> + <th><label for="id_last_name"><h5>Last name:</h5></label></th> + <th><label for="id_last_name"><h5>{{ coordinator_profile.user.last_name }}</h5></label></th> + </tr> + <tr> + <th><label for="id_email"><h5>Email:</h5></label></th> + <th><label for="id_email"><h5>{{ coordinator_profile.user.email }}</h5></label></th> + </tr> + <tr> + <th><label for="id_institute"><h5>Institute:</h5></label></th> + <th><label for="id_institute"><h5>{{ coordinator_profile.user.profile.institute }}</h5></label></th> + </tr> + <tr> + <th><label for="id_phone_number"><h5>Phone Number:</h5></label></th> + <th><label for="id_phone_number"><h5>{{ coordinator_profile.user.profile.phone_number }}</h5></label> + </th> + </tr> + <tr> + <th><label for="id_department"><h5>Department:</h5></label></th> + <th><label for="id_department"><h5>{{ coordinator_profile.user.profile.department }}</h5></label></th> + </tr> + <tr> + <th><label for="id_location"><h5>Location:</h5></label></th> + <th><label for="id_location"><h5>{{ coordinator_profile.user.profile.location }}</h5></label></th> + </tr> + <tr> + <th><label for="id_position"><h5>Position:</h5></label></th> + <th><label for="id_position"><h5>{{ coordinator_profile.user.profile.position }}</h5></label></th> + </tr> + </table> + <br> + <div class="container"> + <h2>Workshop Details</h2> + <table class="table table-bordered"> + <tr> + <th><label for="id_instructor_name">Instructor name</label></th> + <th><label for="id_workshop_date">Workshop date</label></th> + <th><label for="id_workshop_type">Workshop type</label></th> + </tr> + {% for workshop in Workshops %} + {% if workshop.instructor %} + <tr> + <td><label for="id_instructor_name">{{ workshop.instructor }} + </label></td> + <td><label for="id_workshop_date">{{ workshop.date }}</label> + </td> + <td><label for="id_workshop_type">{{ workshop.workshop_type }}</label> + </td> + </tr> + {% else %} + <tr> + <td><span class="badge badge-warning">Pending</span></td> + <td><label for="id_workshop_date">{{ workshop.date }}</label> + </td> + <td><label for="id_workshop_type">{{ workshop.workshop_type }}</label> + </td> + </tr> + {% endif %} + {% endfor %} + </table> + </div> + </div> {% endblock %} |