Merge branch 'master', remote branch 'origin' into tastypie2
commit
cbb801b9d9
|
@ -10,7 +10,7 @@ class ProfileForm(forms.ModelForm):
|
|||
model = UserProfile
|
||||
exclude = 'user'
|
||||
widgets = {
|
||||
'tagline': forms.Textarea(attrs={'cols': 70, 'rows': 2}),
|
||||
'tagline': forms.Textarea(attrs={'cols': 35, 'rows': 4}),
|
||||
}
|
||||
|
||||
class UserData(forms.Form):
|
||||
|
|
|
@ -131,25 +131,16 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
<div class="block block1">
|
||||
<div class="block-inner">
|
||||
<h3><a class="profile-edit" href="#">Profile / edit</a></h3>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||
<div class="profile-save">
|
||||
<a href="#" class="profile-save">Save setting</a>
|
||||
</div>
|
||||
<form method="POST" action="">
|
||||
{% csrf_token %}
|
||||
{{ profile_form.as_p }}
|
||||
|
||||
<input class="profile-save" type="submit" name="submit" value="Update" id="submit">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block block2">
|
||||
<h3 class="title">Pledges</h3>
|
||||
<div class="check-list">
|
||||
<input type="checkbox" />
|
||||
<label>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</label>
|
||||
</div>
|
||||
<div class="check-list">
|
||||
<input type="checkbox" />
|
||||
<label>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block block3">
|
||||
<h3 class="title">Links</h3>
|
||||
<div class="check-list">
|
||||
<input type="checkbox" />
|
||||
|
@ -160,7 +151,7 @@ how do I integrate the your wishlist thing with the tabs thing?
|
|||
<label>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="block block4">
|
||||
<div class="block block3">
|
||||
<h3 class="title">Privacy</h3>
|
||||
<div class="check-list">
|
||||
<input type="checkbox" />
|
||||
|
|
|
@ -17,7 +17,7 @@ from django.conf import settings
|
|||
from regluit.core import models, bookloader
|
||||
from regluit.core.search import gluejar_search
|
||||
|
||||
from regluit.frontend.forms import UserData
|
||||
from regluit.frontend.forms import UserData,ProfileForm
|
||||
from regluit.frontend.forms import CampaignPledgeForm
|
||||
|
||||
from regluit.payment.manager import PaymentManager
|
||||
|
@ -63,6 +63,15 @@ def supporter(request, supporter_username):
|
|||
else:
|
||||
shared_works = []
|
||||
|
||||
# added following blok to support profile admin form in supporter page
|
||||
if request.user.is_authenticated() and request.user.username == supporter_username:
|
||||
if request.method == 'POST':
|
||||
profile_form = ProfileForm(data=request.POST,instance=request.user.get_profile())
|
||||
if profile_form.is_valid():
|
||||
profile_form.save()
|
||||
else:
|
||||
profile_form = ProfileForm()
|
||||
|
||||
context = {
|
||||
"supporter": supporter,
|
||||
"wishlist": wishlist,
|
||||
|
@ -71,6 +80,7 @@ def supporter(request, supporter_username):
|
|||
"wished": wished,
|
||||
"date": date,
|
||||
"shared_works": shared_works,
|
||||
"profile_form": profile_form,
|
||||
}
|
||||
|
||||
return render(request, 'supporter.html', context)
|
||||
|
|
|
@ -523,7 +523,7 @@ div.content-block-content .cols3 .column {
|
|||
}
|
||||
.user-block-hide .block {
|
||||
float: left;
|
||||
width: 25%;
|
||||
width: 33%;
|
||||
}
|
||||
.user-block-hide input {
|
||||
float: left;
|
||||
|
@ -609,7 +609,7 @@ a.profile-edit {
|
|||
div.profile-save {
|
||||
padding-top: 15px;
|
||||
}
|
||||
a.profile-save {
|
||||
input.profile-save {
|
||||
background: url("/static/images/header/save-setting.png") 0 0 no-repeat;
|
||||
width: 116px;
|
||||
height: 42px;
|
||||
|
|
Loading…
Reference in New Issue