Commit e5c5773f authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza
Browse files

Remove "Create a new team" functionality from frontend.

parent 0904f8ef
......@@ -93,19 +93,6 @@
</security:authorize>
</div>
<h3><spring:message code="team.user-teams" /></h3>
<ul class="funny-list">
<c:forEach items="${teams}" var="team" varStatus="status">
<li class="${status.count % 2 == 0 ? 'even' : 'odd'}"><a href="<c:url value="/team/${team.uuid}" />"><c:out value="${team.name}" /></a>
<security:authorize access="isAuthenticated() && principal.id == #user.id">
<a x-team-id="${team.id}" class="pull-right"><spring:message code="team.leave-team" /></a>
</security:authorize>
</li>
</c:forEach>
</ul>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
......@@ -113,18 +100,6 @@
</div>
</div>
<!--End modal-->
<security:authorize access="isAuthenticated() && principal.id == #user.id">
<h4><spring:message code="team.create-new-team" /></h4>
<form id="new-team-form" class="form-horizontal">
<div class="form-group">
<label for="team-name" class="col-lg-2 control-label"><spring:message code="team.team-name" /></label>
<div class="col-lg-3"><input type="text" name="name" id="team-name" class="span3 form-control" /></div>
<div class="col-lg-1">
<input type="submit" value="<spring:message code="create" />" class="btn btn-primary" />
</div>
</div>
</form>
</security:authorize>
<content tag="javascript">
<security:authorize access="isAuthenticated()">
......@@ -133,25 +108,6 @@
<script type="text/javascript">
jQuery(document).ready(function() {
<security:authorize access="principal.id == #user.id">
$("#new-team-form input[type=submit]").on("click", function(e) {
e.preventDefault();
x01("<c:url value="/json/v0/me/teams" />", { success: function(e) {
window.location.reload();
}}, $(this.form).serializeObject());
});
$("a[x-team-id]").on("click", function(e) {
e.preventDefault();
x01("<c:url value="/json/v0/me/teams/" />" + $(this).attr('x-team-id') + "/leave",
{ success: function(e) {
window.location.reload();
}});
});
</security:authorize>
<security:authorize access="hasRole('ADMINISTRATOR')">
$("button#acccount-enable").on("click", function(e) {
e.preventDefault();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment