summaryrefslogtreecommitdiff
path: root/gstudio/templates/gstudio/NewGroup.html
blob: df0009d1f10e05bbf6aff01afd4ce2e2f23186b4 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{%extends "gstudio/base.html"%}
{% load gstudio_tags %}
{%load i18n %}
{%block extrahead%}
        <script type="text/javascript">
        $(document).ready(function()
        {          
        $('#id_value_1').datepicker();
        $('#id_value_2').datepicker();
        });
	function slnchange()
	{
	   var a= document.getElementById("opt");
	   var b=a.options[a.selectedIndex].value;
           var currentDate = new Date();
           var endd=new Date();
           var dat=parseInt(currentDate.getMonth(),10)+1
           var d=dat+"/"+currentDate.getDate()+"/"+currentDate.getFullYear()
	   $('#id_value_1').datepicker().val(d);
	   $('#id_hr1').val('0');
	   $('#id_hr2').val('0');
	   $('#id_min1').val('0');
	   $('#id_min2').val('0');
	if (b=='Quiz'){
	   endd.setDate(currentDate.getDate()+5);
           var d=dat+"/"+endd.getDate()+"/"+endd.getFullYear();
	   $('#id_value_2').datepicker().val(d);
        }
	else if(b=='Online Meeting')
	{
           endd.setHours(currentDate.getHours()+6);
	   var d=dat+"/"+endd.getDate()+"/"+endd.getFullYear()
	   $('#id_value_2').datepicker().val(d);
	}
	else if(b=='Discussion Forum')
	{
	   var y=parseInt(currentDate.getFullYear(),10)+100;
           var d =dat+"/"+endd.getDate()+"/"+y;
	   $('#id_value_2').datepicker().val(d)
	}
	else
	{
       	   obj = document.getElementById('opt');
	   obj.value ="";
	}
	}
        </script>
{%endblock%}
{% block content  %}
<style type="text/css">
#content
{
 width:1000px;
}
</style>
{%if user.is_authenticated%}
{% if errors %}
<ul>
{% for error in errors %}
<li><font color="red">{{ error }}</font></li>
{% endfor %}
</ul>
{% endif %}
<form action="" method="post">
{% csrf_token %}
<p><font size ="3" >Name of the Thread:</font> <input type="text" name="subject"></p>
<p><font size ="3" >Substance:</font> </p> 
<textarea id="threadcontent" name="message" rows="10" cols="50" style="display:none"></textarea>

<input type="button" id="addthreadcontent"  name="content" value="Add Description">
<input type="button" id="threadsave" name="savecontent" value="Save" style="display:none">
</br>

{% get_factory_looms as abc %}

<p><font size ="3" >Type:</font></p>
<select id="opt" onchange="slnchange()" >
 {% for each in abc %}
 <option value="{{each}}" >{{each}}</option> 
{% endfor %}
</select>
<br/>

<font size ="3" >Please Set the time 
<p>Creating a thread will require to schedule it for an indefinite period of time. So in this case, please enter end time of say 50 years from now</p></font>
</br>
<font size ="3" >Start time:</font>
</br>
        <span class="datetimeshortcuts">
        	<a href="javascript:DateTimeShortcuts.openCalendar(0);"id = "calendarlink0"></a>
        </span>
       <font size ="2" > Date:</font> <input id="id_value_1" type="text" class="vTimeField hasTimepicker" name="stDate" size ="8">
        <font size ="2" >Hours:</font><input id = "id_hr1" type = "text" name = "hours1">
        <font size ="2" >Minutes:</font><input id = "id_min1" type = "text" name = "minutes1"><br/>
	<font size ="3" ><p><b>Note</b>&nbsp;The thread will be accessible to members (except the creator)only after the scheduled start time</p></font>
       <font size ="3" > End time:  </font> </br>
        <font size ="2" >Date: </font><input id="id_value_2" type="text" class="vTimeField hasTimepicker" name="endDate" size ="8">
        <font size ="2" >Hours:</font><input id = "id_hr2"  type = "text" name = "hours2">
        <font size ="2" >Minutes:</font><input id = "id_min2"  type = "text" name = "minutes2">
<font size ="3" ><p>After this time the threads remain but it will be inactive<p></font>
<input type="hidden" value={{user.id}} name = "idusr">
<input type="hidden" value={{user.username}} name = "usr">
<input type="submit" value="Submit">
</form>
{%else%}
<font size ="3" ><p> Please Login </p></font>

{%endif%}
{% endblock %}