-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing Groups (creating and joining) joining has to be fixed
- Loading branch information
1 parent
2eaab16
commit 01dab21
Showing
5 changed files
with
116 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
{% extends "base.html" %} {% block title %}Group Channels{% endblock %} {% block content | ||
%} | ||
<h1 align="center">Groups</h1> | ||
<ul class="list-group list-group-flush" id="groups"> | ||
{% for group in groups %} | ||
<li class="list-group-item"> | ||
<a href="{{ url_for('views.group_page', group_id=group.id) }}">{{ group.name }}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<form method="POST"> | ||
<textarea name="group_name" id="group_name" class="form-control"></textarea> | ||
<br /> | ||
<ul class="list-group list-group-flush" id="groups"> | ||
{% for group in groups %} | ||
<li class="list-group-item"> | ||
<a href="{{ url_for('views.group_page', group_id=group.id) }}">{{ group.name }}</a> | ||
<input type="text" name="group_key_join_{{ group.id }}" class="form-control" placeholder="Enter group key"> | ||
<button type="submit" class="btn btn-primary" name="join_group" value="{{ group.id }}">Join Group</button> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<input type="text" name="group_name" class="form-control" placeholder="Enter group name"> | ||
<br> | ||
<input type="text" name="group_key" class="form-control" placeholder="Enter group key"> | ||
<br> | ||
<div align="center"> | ||
<button type="submit" class="btn btn-primary">Add Group</button> | ||
<button type="submit" class="btn btn-primary" name="add_group">Add Group</button> | ||
</div> | ||
</form> | ||
{% endblock %} | ||
{% endblock %} | ||
|
||
|
||
|
||
|
24 changes: 24 additions & 0 deletions
24
service/src/FlaskWebsite/website/templates/groups_copy.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{% extends "base.html" %} {% block title %}Group Channels{% endblock %} {% block content | ||
%} | ||
<h1 align="center">Groups</h1> | ||
|
||
<form method="POST"> | ||
<ul class="list-group list-group-flush" id="groups"> | ||
{% for group in groups %} | ||
<li class="list-group-item"> | ||
<a href="{{ url_for('views.group_page', group_id=group.id) }}">{{ group.name }}</a> | ||
<input type="text" id="group_key" class="form-control" placeholder="Enter group key"> | ||
<button class="btn btn-primary" onclick="join_group('{{ group.id }}', document.getElementById('group_key').value)">Join Group</button> | ||
<!-- <button class="btn btn-secondary" disabled>Join Group</button> --> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
<input type="text" name="group_name" id="group_name" class="form-control" placeholder="Enter group name"> | ||
<br /> | ||
<input type="text" name="group_key" id="group_key" class="form-control" placeholder="Enter group key"> | ||
<br /> | ||
<div align="center"> | ||
<button type="submit" class="btn btn-primary">Add Group</button> | ||
</div> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters