Skip to content

Commit

Permalink
Merge pull request #197 from farziengineer/master
Browse files Browse the repository at this point in the history
Fixed the button problem Issue #196
  • Loading branch information
Martti Sasi authored Jun 6, 2017
2 parents d0d3d18 + bbe4308 commit 91d92b0
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions website/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@ <h1 class="page-header text-capitalize">{{ user.username }}</h1>
</div>
<div class="col-md-3">
{% if request.user == user %}
<button class="btn btn-primary btn-small edit-pic">Change Profile Picture</button>
<div class="update-pic" style="display: none">


<form method="post" action="." enctype="multipart/form-data">
{% csrf_token %}
{{ profile_form.user_avatar }}
<br/>
<span>
<input type="file" class="required" style="opacity: 0; width: 1px;height:1px;" id='${multipartFilePath}' name="user_avatar" onchange="$(this).parent().find('span').html($(this).val().replace('C:\\fakepath\\', ''))" />
<button class="btn btn-primary" name="test_files" type="button" onclick="$(this).parent().find('input[type=file]').click();"> <i class="fa fa-upload" aria-hidden="true"></i> Upload Profile Pic </button>
&nbsp;
<span class="badge badge-important" ></span>
</span>
<br/> <br>
<button type="submit" class="btn btn-primary btn-small">Upload</button>
</form>
</div>

{% endif %}
</div>
<div class="col-md-3 col-md-offset-3">
Expand Down

0 comments on commit 91d92b0

Please sign in to comment.