aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/oauth2/group_join_or_create.html
blob: 8255d2f81fefcae1ee077dbff6f9563da5c1189a (about) (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
{%extends "base.html"%}
{%from "oauth2/profile_nav.html" import profile_nav%}
{%block title%}Join or Create Group{%endblock%}

{%block css%}
<link rel="stylesheet" type="text/css" href="/static/new/css/mytooltip.css" />
{%endblock%}
{%block content%}
<div class="container" style="min-width: 1250px;">
  {{profile_nav("group", user_privileges)}}

  <h3>Join or Create Group</h3>

  {{flash_me()}}

  {%if group_join_request is defined  and group_join_request.exists %}
  <p>
    <span class="glyphicon glyphicon-info-sign text-warning"></span>
    &nbsp;
    <span class="text-info">You have an active request to join a group.</span>
  </p>

  <p class="explainer">
    You cannot create a group, or request to join a new group until your
    currently active request has been either accepted or rejected.
  </p>
  {%else%}
  <p>You can</p>

  {%if groups | length > 0 %}
  <div  class="explainer">
    <p>
    For most users, this is the preffered choice. You request access to an
    existing group, and the group leader will chose whether or not to add you to
    their group.</p>

    <p>You can only be a member of a single group.</p>
  </div>

  <form action="{{url_for('oauth2.user.request_add_to_group')}}"
	method="POST">
    <legend>Request to be added to group</legend>
    <div class="form-group">
      <label class="control-label" for="group">Group</label>
      <select class="form-control" id="group" required="required" name="group">
	<option value="">Select a group</option>
	{%for group in groups%}
	<option value="{{group.group_id}}">{{group.group_name}}</option>
	{%endfor%}
      </select>
    </div>
    <div class="form-group">
      <input type="submit" value="Request Access" class="btn btn-primary" />
    </div>
  </form>

  <p>or</p>
  {%else%}
  <p>
    <span class="glyphicon glyphicon-warning-sign text-warning"></span>
    &nbsp;
    <span class="text-warning">There an currently no groups to join.</span>
  </p>
  {%endif%}

  <div  class="explainer">
  <p>
    Creating a new group automatically makes you that group's administrator.
  </p>

  <p>You can only be a member of a single group.</p>
  </div>

  <form action="{{url_for('oauth2.group.create_group')}}"
	method="POST">
    <legend>Create a new group</legend>
    <div class="form-group mytooltip">
      <label class="control-label" for="group_name">Group Name</label>
      <input type="text" class="form-control" id="group_name"
	     name="group_name"required="required" />
      <span class="mytooltiptext">
	Name of the group.
      </span>
    </div>
    <div class="form-group mytooltip">
      <label class="control-label" for="group_desc">Group Description</label>
      <textarea class="form-control" id="group_description"
		name="group_description"></textarea>
      <span class="mytooltiptext">
	A description to help identify the purpose/goal of the group
      </span>
    </div>
    <div class="form-group">
      <input type="submit" value="Create Group" class="btn btn-primary" />
    </div>
  </form>
  {%endif%}
</div>
{%endblock%}