user « views « app - alaveteli - Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/user/set_draft_profile_photo.html.erb
blob: b4bdd80f36551e7d9de2bffbc7eae6d79766d7fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<% @title = "Change profile photo" %>

<% raise "internal error" if not @user %>

<h2><%= _("Choose your profile photo") %></h2>

<%= foi_error_messages_for :draft_profile_photo %>

<div id="set_draft_profile_photo">

<%= form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %>
    <p>
	    <label class="form_label" for="file_1"><%= _('Photo of you:')%></label>
        <%= file_field_tag :file, :size => 35, :id => 'file_1' %>
    </p>

<ul>
    <li><%= _('Your photo will be shown in public <strong>on the Internet</strong>,
    wherever you do something on {{site_name}}.', :site_name=>site_name)%>
    </li>

    <li><%= _('Please don\'t upload offensive pictures. We will take down images
    that we consider inappropriate.')%>
    </li>
</ul>


    <p>
        <%= hidden_field_tag 'submitted_draft_profile_photo', 1 %>

        <script type="text/javascript" charset="utf-8">
            document.write('<%= submit_tag _("Next, crop your photo &gt;&gt;") %>');
        </script>
    </p>

    <noscript>
        <div>
            <%= hidden_field_tag 'automatically_crop', 1 %>
            <%= submit_tag _("Done &gt;&gt;") %>
        </div>
    </noscript>
<% end %>

<% if @user.profile_photo %>

    <h2><%= _('OR remove the existing photo')%></h2>

    <%= form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %>
        <%= submit_tag _("Clear photo") %>
    <% end %>

<% end %>

<p>
    <%= link_to _("Cancel, return to your profile page"), user_path(@user) %>
</p>

</div>