{% extends "formwizard/profesor/wizard_base.html" %} 
{% block formwizard%}

               <form id="publish" method="post" action="" class="form-horizontal ">
                  {% csrf_token %}
                  
                  	<div class="control-group">
						<label class="control-label" for="input01" style="margin-right:10%;">
							<p><strong>¿Desea hacer publica la actividad?: </strong></p>
						</label>
		
						<div class="controls">						
							{% if publicado %}
                     		<a href="{% url ocultar_actividad_wizard informacion.asignatura.slug step0 %}" class="btn btn-primary btn-large btn-danger">Ocultar</a>
                     		{% else %}
                     		<a href="{% url ocultar_actividad_wizard informacion.asignatura.slug step0 %}" class="btn btn-primary btn-large btn-info">Publicar</a>
                     		{% endif %}
						</div>

					</div>

                  <div id="form-edit">
				  <div class="form-actions">
				  	<div class="pull-left">
                     <a href="{% url repartir_actividad_wizard informacion.asignatura step0 %}" class="btn btn-primary btn-large btn-info">Anterior</a>
				  	</div>
				  	<div class="pull-right">
                     <button type="submit" class="btn btn-primary btn-large btn-success">Finalizar</button>
				  	</div>
                  </div>
              	</div>

               </form>
{% endblock %}

{% block extra_js%}

<script src="{{MEDIA_URL}}js/bootstrap/bootstrap-datepicker.js"></script>
<script src="{{MEDIA_URL}}js/bootstrap/bootstrap-timepicker.js"></script>

<script type="text/javascript"> 
 	$(document).ready(function () { 


	  $("#title-0").removeClass("current-step");
	  $("#title-1").removeClass("current-step");
	  $("#title-2").removeClass("current-step");
	  $("#title-3").addClass("current-step")

	  $('#title-0 a').attr('href', '{% url editar_actividad_wizard informacion.asignatura step0 %}');
	  $('#title-1 a').attr('href', '{% url crear_cuestionario_wizard informacion.asignatura step0 %}');
	  $('#title-2 a').attr('href', '{% url repartir_actividad_wizard informacion.asignatura step0 %}');
	  $('#title-0 span').replaceWith('<span>Modifica la tarea</span>');
	  $('#title-1 span').replaceWith('<span>Modifica el cuestionario</span>');
	  $('#title-2 span').replaceWith('<span>Modifica la correcion</span>');
	  $('#title-3 span').replaceWith('<span>Publicalo</span>');
        });

 	/*

	$('#publish').submit(function(){

		    $('#publish').ajax({

			    alert($('#publish').serialize());

		        type: 'POST',
		        url: '{% url publicar_actividad_wizard informacion.asignatura step0 %}',
		        data: $(this).serialize(),
		        dataType: 'json',

			});
		    
		    return false; // poner a true para salir



		  });
 	*/
	</script>

{%endblock%}
