<commit_before>{% extends "ndf/mis_base_create_edit.html" %}
{% load i18n %}
{% load ndf_tags %}
{% load pagination_tags %}

{% block style %}
  {{block.super}}

  /* Resetting css-properties for fieldset (also legend, input) */
    /* fieldset (padding-bottom) */ 
    fieldset {
      padding: 1.25rem 1.25rem 1.25rem 1.25rem !important;
    }

    /* legend (background-color) */
    fieldset legend {
      background-color: transparent !important;
    }

    /* input (margin) */
    fieldset input {
      margin: 0 !important;
    }

  /* Setting css-properties for reveal-modal's label */
    div.reveal-modal > label {
      color: white;
      font-weight: bold;
      font-size: 1rem;
    }
{% endblock %}

{% block body_content %} 
  <div id="alertModal" class="reveal-modal medium alert-box radius" data-reveal data-alert>
    <label id="alertModalLabel"></label>
    <a class="close-reveal-modal">&#215;</a>
  </div>

  <form data-abide enctype="multipart/form-data" id="form-edit-node" method="POST" action="">
    <nav class="row" style="margin-top: 0.5rem;">
      <dl class="tabs small-12 columns" data-tab data-options="deep_linking:true">
        <dd>
          <label><h4>{% trans "Fill"%}:&nbsp;&nbsp;</h4></label>
        </dd>

        {% for tab_details in property_order_list %}
        <dd {% if forloop.counter == 1 %}class="active"{% endif %} title="STEP-{{forloop.counter}}: Fill {{tab_details.0|lower}} details...">
          <a href="#panel_{{tab_details.0}}" class="disable">
            {{tab_details.0}}
          </a>
        </dd>
        {% endfor %}
      </dl>
    </nav>


	{% csrf_token %}
	<ul class="mtree course-section">
	<li>
	<div id="course-structure-div" class="tabs-content" style="border-style: solid; border-width: 1.5px; border-color: #0eacb5; padding: 0px 5px;">
      <div class="active content row" id="panel_{{property_order_list.0.0}}">
        <div class="row">
          <div class="small-4 columns">
            <label for="{{property_order_list.0.1.0.name}}" class="right inline"> 
              {% blocktrans with label_val=property_order_list.0.1.0.altnames %} {{label_val}} {% endblocktrans %}
            </label>
          </div>
      	  <div class="small-6 columns">
        	{% html_widget groupid node.pk property_order_list.0.1.0 %}
    	  </div>
        </div>
        <div class="row">
          <div class="small-4 columns">
            <label for="{{property_order_list.0.1.0.name}}" class="right inline"> 
              {% blocktrans with label_val=property_order_list.0.1.1.altnames %} {{label_val}} {% endblocktrans %}
            </label>
          </div>
      	  <div class="small-6 columns">
        	{% html_widget groupid node.pk property_order_list.0.1.1 %}
    	  </div>
        </div>

      </div>
    </div>
    </li>
    </ul>

	<ul class="mtree course-subsection">
	<li>
	<div id="course-structure-div" class="tabs-content" style="border-style: solid; border-width: 1.5px; border-color: #0eacb5; padding: 0px 5px;">
      <div class="active content row" id="panel_{{property_order_list_css.0.0}}">
        <div class="row">
          <div class="small-4 columns">
            <label for="{{property_order_list_css.0.1.0.name}}" class="right inline"> 
              {% blocktrans with label_val=property_order_list_css.0.1.0.altnames %} {{label_val}} {% endblocktrans %}
            </label>
          </div>
      	  <div class="small-6 columns">
        	{% html_widget groupid node.pk property_order_list_css.0.1.0 %}
    	  </div>
        </div>
        <div class="row">
          <div class="small-4 columns">
            <label for="{{property_order_list_css.0.1.0.name}}" class="right inline"> 
              {% blocktrans with label_val=property_order_list_css.0.1.1.altnames %} {{label_val}} {% endblocktrans %}
            </label>
          </div>
      	  <div class="small-6 columns">
        	{% html_widget groupid node.pk property_order_list_css.0.1.1 %}
    	  </div>
        </div>

      </div>
    </div>
    </li>
    </ul>
  </form>
  
{% endblock %}

{% block script %}
  {{block.super}}
{% endblock %}
<commit_msg>Course Structure Design Part2<commit_after>{% extends "ndf/mis_base_create_edit.html" %}
{% load i18n %}
{% load ndf_tags %}
{% block title %} {{title}} {% endblock %}
{% load pagination_tags %}

{% block style %}
  {{block.super}}

  /* Resetting css-properties for fieldset (also legend, input) */
    /* fieldset (padding-bottom) */ 
    fieldset {
      padding: 1.25rem 1.25rem 1.25rem 1.25rem !important;
    }

    /* legend (background-color) */
    fieldset legend {
      background-color: transparent !important;
    }

    /* input (margin) */
    fieldset input {
      margin: 0 !important;
    }

  /* Setting css-properties for reveal-modal's label */
    div.reveal-modal > label {
      color: white;
      font-weight: bold;
      font-size: 1rem;
    }

    li{
        
        font-size: 0

    }

{% endblock %}

{% block body_content %} 
  <div id="alertModal" class="reveal-modal medium alert-box radius" data-reveal data-alert>
    <label id="alertModalLabel"></label>
    <a class="close-reveal-modal">&#215;</a>
  </div>

  <form data-abide enctype="multipart/form-data" id="form-edit-node" method="POST" action="">
	{% csrf_token %}
	<li class="hide" id="course-section">
	<div id="course-structure-div" class="tabs-content" style="border-style: solid; border-width: 1.5px; border-color: #0eacb5; padding: 0px 5px;">
      <div class="active content row" id="panel_{{property_order_list.0.0}}">
        <div class="row">
          <div class="small-2 columns">
            <label for="{{property_order_list.0.1.0.name}}" class="right inline"> 
              {% blocktrans with label_val=property_order_list.0.1.0.altnames %} {{label_val}} {% endblocktrans %}
            </label>
          </div>
      	  <div class="small-4 columns end">
        	{% html_widget groupid node.pk property_order_list.0.1.0 %}
    	  </div>
          <div class="small-6 columns">
		        <input type="button" value="Save" class="button small round save-cs">
		        <input type="button" value="Cancel" class="button small round cancel-cs">
	        </div>
	     </div>
        <div class="row">
        	<div class="small-10 small-centered columns">
        		<input type="button" value="Add Sub section" class="button round expand sub-section-btn" id="add-sub-section-btn" onclick="add_course_sub_section(this.id)">
        	</div>
        </div>
      </div>
    </div>
    </li>

	<li class="hide" id="course-subsection">
    	<div id="course-structure-div" class="tabs-content" style="border-style: solid; border-width: 1.5px; border-color: #0eacb5; padding: 0px 5px;">
          <div class="active content row" id="panel_{{property_order_list_css.0.0}}">
            <div class="row">
              <div class="small-1 columns">
                <label for="{{property_order_list_css.0.1.0.name}}" class="right inline"> 
                  {% blocktrans with label_val=property_order_list_css.0.1.0.altnames %} {{label_val}} {% endblocktrans %}
                </label>
              </div>
          	  <div class="small-4 columns end">
            	{% html_widget groupid node.pk property_order_list_css.0.1.0 %}
        	  </div>
              <div class="small-1 columns end">
                <label for="{{property_order_list_css.0.1.0.name}}" class="right inline"> 
                  {% blocktrans with label_val=property_order_list_css.0.1.1.altnames %} {{label_val}} {% endblocktrans %}
                </label>
              </div>
          	  <div class="small-2 columns end">
            	{% html_widget groupid node.pk property_order_list_css.0.1.1 %}
        	  </div>
              <div class="small-4 columns">
                    <input type="button" value="Save" class="button small round" id="save-css" onclick="save(this.id)">
                    <input type="button" value="Cancel" class="button small round" id="cancel-css" onclick="cancel(this.id)">
              </div>
            </div>
          </div>
        </div>
    </li>

    <ul class="ul-course-section">
		<input type="button" class="button expand round" value="Add Course Section" onclick="add_course_section()">
    </ul>

  </form>
  
{% endblock %}

{% block script %}
  {{block.super}}
//<script>
//Global var declarations
  var cs_cloned_id = 1
  var css_cloned_id = 1

//Adding Course Section
  function add_course_section(){
    $(".ul-course-section").before($("#course-section").clone().attr('id',function(i,id){
     cloned_ele_id = id+"_cloned"+cs_cloned_id;
     return cloned_ele_id
     }).removeClass("hide"));
    // $("#"+cloned_ele_id).find("input").each(function(){
    //     $(this).attr("id",function(i,id){
    //         return id+"_cloned"+cs_cloned_id;
    //     });
    // });
    cs_cloned_id+=1
  }  

//Adding Course Subsection
  function add_course_sub_section(ele_id){
    $("#"+ele_id).before($("#course-subsection").clone().attr('id',function(i,id){
     cloned_ss_ele_id = id+"_cloned"+css_cloned_id;
     return cloned_ss_ele_id}).removeClass("hide"));
    css_cloned_id+=1
  }

//Save Course Section
  $(document).on('click','.save-cs',function(){
    parent_id = $(this).parents("li").attr("id")
    lbl_val = $("#"+parent_id).find("input[id='name']").val()
    if(lbl_val==""){
        alert("Please enter Name");
        event.preventDefault();
    }
    else{
        $("#"+parent_id).children().hide();
        $("#"+parent_id).append("<label id='lbl_for_"+parent_id +"'><h4>"+lbl_val+"</h4><label>")
    }
  })



// Cancel Course Section
  $(document).on('click','.cancel-cs',function(){
    parent_id = $(this).parents("li").attr("id")
    $("#"+parent_id).remove()
  });
  </script>
{% endblock %}

{'fraction_non_alphanumeric': 0.17561075334764387, 'fraction_numerical': 0.017274864560973116, 'mean_word_length': 2.5891415994130593, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3524029', 'n_tokens_mistral': 3410, 'n_tokens_neox': 3194, 'n_words': 620}