Edit account / profile

<%= form_for(@user, :html => { multipart: true, class: 'form-horizontal'}) do |f| %> <%= render partial: 'form_errors', locals: { what: @user } %>

Account Settings:

<%= f.label :currency, "Display currency", class: 'col-sm-2 control-label' %>
<%= f.select(:currency, Rails.configuration.currencies, {}, class: 'form-control') %>

Display product prices in this currency.

<%= f.label :timezone, class: 'col-sm-2 control-label' %>
<%= f.time_zone_select(:timezone, nil, {}, class: 'form-control') %>

Display times in your specified timezone.

<%# Implement automatic payments for vendors only. Buyers don't really need this feature for refunds. %> <% if is_vendor? %>
<%= f.label :payout_btc_address, 'Pay BTC to', class: 'col-sm-2 control-label' %>
<%= f.text_field :payout_btc_address, class: 'form-control' %>

When bitcoin orders finalized, this address will be automatically set on the order.

If this field is empty, you must manually set your payment address on each finalized bitcoin order.

<% if PaymentMethod.litecoin_exists? %>
<%= f.label :payout_ltc_address, 'Pay LTC to', class: 'col-sm-2 control-label' %>
<%= f.text_field :payout_ltc_address, class: 'form-control' %>

Works the same as for bitcoin orders by automatically assigning payment address to order. Be careful not to enter a bitcoin address in this field.

If this field is empty, you must manually set your payment address on each finalized litecoin order.

<%end%>
Payout Schedule
<% (0..6).each do |i| %>
<% end %>

The payout schedule allows the vendor to restrict which days their bitcoin payments will be sent to them. For example, setting the schedule to Sunday only will result in a single payment on Sunday of all bitcoin owing to you from finalized orders.

<%= f.label :vacation, 'Vacation mode', class: 'col-sm-2 control-label' %>
<%= f.check_box(:vacation, class: 'checkbox') %>

Disables sales of all your products. Products will remain in listings.

<%end%>

Profile Settings:

<%# Only let vendors have images in their profile to minimize attack surface. %> <% if is_vendor? %>
<%= f.label :avatar, "Profile logo", class: 'col-sm-2 control-label' %>
<%= image_tag @user.avatar.url(:thumb), class: 'thumbnail', alt: 'profile image' %> <%= f.file_field :avatar %>

Max size 2MB, gif, jpeg, png. The server will strip exif but it is safer to remove exif yourself before upload.

<% if @user.avatar_file_name %>
<%= check_box_tag('delete_avatar', 'yes', false) %> Delete profile logo
<%end%>
<% end %>
<%= f.label :displayname, "Display name", class: 'col-sm-2 control-label' %>
<%= f.text_field :displayname, readonly: true, class: 'form-control' %>
<%= f.label :profile, "Profile", class: 'col-sm-2 control-label' %>
<%= f.text_area :profile, rows: 10, class: 'form-control' %> <% if is_vendor? %>

About vendor, products and policies such as refund policy

<%end%>
<%= f.label :publickey, "Public key", class: 'col-sm-2 control-label' %>

<%= simple_format h(Gpgkeyinfo.read_key(@user.publickey)) %>

<%= f.text_area :publickey, rows: 10, class: 'form-control' %>

<% if Rails.configuration.enable_mandatory_pgp_user_accounts %>

Public key is mandatory.

<%end%>
<% if @user.pgp_2fa %>
PGP 2FA

You have PGP 2FA enabled. Account and profile setting changes require you to decrypt this message to authorize any changes.

<%= label_tag :secret_word, "Decrypted word", class: 'col-sm-2 control-label' %>
<%= text_field_tag :secret_word, nil, class: 'form-control' %>
<%end%>
<%= f.submit "Save settings", id: 'submit', class: 'btn btn-primary form-button' %>
<% end %>