-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#766] Merging new version of feature/rsr_v3 into branch
- Loading branch information
Showing
9 changed files
with
163 additions
and
27 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
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
{% extends "myrsr/myrsr_base.html" %} | ||
|
||
{% load i18n bootstrap3 %} | ||
|
||
{% block title %}{% trans 'MyRSR' %} - {{ user.first_name }} {{ user.last_name }}{% endblock %} | ||
|
||
{% block head_js %} | ||
<script> | ||
$(document).ready(function() { | ||
|
||
$('#profileForm').submit(function(event) { | ||
|
||
var $form = $(this); | ||
var serializedData = $form.serialize(); | ||
|
||
$.post('/myrsr/', serializedData, function(response) { | ||
response = JSON.parse(response); | ||
$( "#profile" ).prepend('<div class="alert alert-' + response["status"] + '" role="alert">' + response["message"] + '</div>'); | ||
}); | ||
|
||
event.preventDefault(); | ||
|
||
}); | ||
|
||
$('#passwordForm').submit(function(event) { | ||
|
||
var $form = $(this); | ||
var serializedData = $form.serialize(); | ||
|
||
$.post('/myrsr/', serializedData, function(response) { | ||
response = JSON.parse(response); | ||
$( "#password" ).prepend('<div class="alert alert-' + response["status"] + '" role="alert">' + response["message"] + '</div>'); | ||
}); | ||
|
||
event.preventDefault(); | ||
|
||
}); | ||
|
||
$('#organisationForm').submit(function(event) { | ||
|
||
var $form = $(this); | ||
var serializedData = $form.serialize(); | ||
|
||
$.post('/myrsr/', serializedData, function(response) { | ||
response = JSON.parse(response); | ||
$( "#organisations" ).prepend('<div class="alert alert-' + response["status"] + '" role="alert">' + response["message"] + '</div>'); | ||
}); | ||
|
||
event.preventDefault(); | ||
|
||
}); | ||
}); | ||
</script> | ||
{% endblock %} | ||
|
||
{% block myrsr_main %} | ||
<div class="row"> | ||
<div class="col-md-6 col-xs-6 col-ts-12" id="profile"> | ||
<h1>My details</h1> | ||
<form method="post" action="" id="profileForm"> | ||
{% csrf_token %} | ||
{% for field in profileform %} | ||
{% bootstrap_field field %} | ||
{% endfor %} | ||
{% buttons %} | ||
<button type="submit" class="btn btn-primary"> | ||
{% trans 'Update details' %} | ||
</button> | ||
{% endbuttons %} | ||
</form> | ||
</div> | ||
|
||
<div class="col-md-6 col-xs-6 col-ts-12" id="organisations"> | ||
<h1>My organisations</h1> | ||
{% if user.organisations.all %} | ||
<ul> | ||
{% for org in user.organisations.all %} | ||
<li>{{ org.name }}</li> | ||
{% endfor %} | ||
</ul> | ||
{% else %} | ||
<h2><small>Not affiliated with an organisation.</small></h2> | ||
{% endif %} | ||
|
||
<h3>Connect with an organisation</h3> | ||
<form method="post" action="" id="organisationForm"> | ||
{% csrf_token %} | ||
{% for field in organisationform %} | ||
{% bootstrap_field field %} | ||
{% endfor %} | ||
{% buttons %} | ||
<button type="submit" class="btn btn-success"> | ||
{% trans 'Request to join' %} | ||
</button> | ||
{% endbuttons %} | ||
</form> | ||
</div> | ||
</div> | ||
{% 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
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