{% extends "ndf/base.html" %} {% load pagination_tags %} {% load ndf_tags %} {% load i18n %} {% block title %} {% blocktrans %} {{title}} {% endblocktrans %} {% endblock %} {% block style %} .divider-line { font-size: xx-large; color:lightgray; } .line-height-2 { line-height:2; } .line-height-2pt5 { line-height:2.5; } .fontsize-x-large { font-size: x-large; } .margin-0 { margin: 0 !important ;} /* Setting css-properties for reveal-modal's label */ div.reveal-modal > label { color: white; font-weight: bold; font-size: 1rem; } .resource-drawer { border-color: #D3D3D3; border-style: solid; padding: 0 !important; overflow-y: auto; } .resource-drawer li.bullet-item:hover{ background-color: #ecf0f1; cursor:pointer; } .posted-by{ color: #808080; font-size: small; } .selected-resource { background-color:lightgray !important ; } .resource-type-image { height:40px; background-repeat:no-repeat; background-size: 48px 48px {% endblock %} {% block meta_content %}

Batch

{% endblock %} {% block related_content %}

New

{% if user.is_authenticated %} {% user_access_policy groupid request.user as user_access %} {% if user_access == "allow" %} Create {{title}} {% endif %} {% endif %}
{% endblock %} {% block body_content %} {% get_group_name groupid as group_name_tag %}
×
All Batches {% if batch_coll.count %}({{ batch_coll.count }}){% endif %}
{% csrf_token %}
{% html_widget groupid "" ATs.0 %}
{% endblock %} {% block script %} var announced_course_name_v1 = "" //For selecting Course type $("select#nussd_course_type").change(function() { var nussd_course_type = $("#nussd_course_type").val(); success_state = false; $("#nussd_course_name").val(nussd_course_type) $.ajax({ url: "{% url 'get_announced_courses_with_ctype' group_id %}", data: { nussd_course_type: nussd_course_type }, type: "GET", dataType: "json", complete: function () { // Enable AC field if(announced_course_name_v1 != ""){ $("select#acourse_list option[value='{{announced_course_name_var}}']").prop("selected", true); announced_course_name_v1 = ""; } $("select#acourse_list").removeAttr('disabled') }, success: function(data){ success_state = data["success"] if (success_state){ ac_data = data["acourse_ctype_list"] ac_data = JSON.parse(ac_data) $("select#acourse_list").empty(); $("select#acourse_list").append( $("") .attr("value", "") .text("{% trans ' - - - Select course - - - ' %}") ); $.each(ac_data, function(i,v){ se = v["_id"]; ac_name = v["name"]; scount_lbl = v["enrolled_stud_count"] $("select#acourse_list").append( $("") .attr("value", se) .text(ac_name) .attr("scount", scount_lbl) ); }); $("select#acourse_list").prop("selectedIndex", 0); } else { $("#alertModalLabel").text(data["message"]); $("#alertModal").removeClass("success").removeClass("warning"); $("#alertModal").addClass("alert"); $("#alertModal").foundation('reveal', 'open'); $("select#nussd_course_type").prop("selectedIndex", 0); $("select#acourse_list").prop("selectedIndex", 0); } }, });//end of ajax });//end of nussd_course_type.change function //For selecting Announced Course type $("select#acourse_list").change(function() { ac_id = $("#acourse_list").val(); $("#announced_course_name").val(ac_id) });//end of acourse_list.change function $("#form-batch").submit(function(event){ $("#batches_of_acourse").empty(); }) {% endblock %} {% block document_ready %} {% if nussd_course_name_var != "" %} $("select#nussd_course_type").val("{{nussd_course_name_var}}"); announced_course_name_v1 = "{{announced_course_name_var}}"; $('select#nussd_course_type').trigger('change'); {% endif %} {% if announced_course_name_var != "" %} $("select#acourse_list option[value='{{announced_course_name_var}}']").prop("selected", true); {% endif %} {% endblock %}