Archived
more forum stuff
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%= link_to "Your profile", current_user %> → Edit
|
||||
<%= link_to (@user.is?(current_user) ? "Your profile" : @user.name), current_user %> → Edit
|
||||
<h1>Edit profile</h1>
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
@@ -32,15 +32,19 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Skype username<br>
|
||||
Show to...
|
||||
Skype username
|
||||
</td>
|
||||
<td>
|
||||
<%= f.input :skype, label: false, placeholder: "Skype username", disabled: !((@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role)) %>
|
||||
<%= f.input :skype_public, label: false, as: :radio_buttons, collection: [['all users', false], ['only staff', true]], input_html: { disabled: !((@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role)) } %>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Show Skype to
|
||||
</td>
|
||||
<td>
|
||||
<%= f.input :skype_public, label: false, as: :select, collection: [["Staff only", false], ["All users", true]], include_blank: false, input_html: { disabled: !((@user.is?(current_user) && confirmed?) || (mod? && current_user.role >= @user.role)) } %>
|
||||
</td>
|
||||
<tr>
|
||||
<td>YouTube username</td>
|
||||
<td>
|
||||
@@ -61,8 +65,13 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= f.submit "Save profile", disabled: @user.unconfirmed? %>
|
||||
<%= f.submit "Save profile", class: "btn blue", disabled: @user.unconfirmed? %>
|
||||
<% if @user.unconfirmed? %>
|
||||
<span class='red-alert'>Please confirm your email adress first.</span>
|
||||
<% if @user.is?(current_user) %>
|
||||
<span class='red-alert'>Please confirm your email adress first!</span>
|
||||
<% else %>
|
||||
<span class='red-alert'>This user has not confirmed his email!</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to "Cancel", @user, class: "btn red right" %>
|
||||
<% end %>
|
||||
@@ -1,10 +1,19 @@
|
||||
<h1>Register</h1>
|
||||
<h1>Sign up</h1>
|
||||
|
||||
<%= simple_form_for @user do |f| %>
|
||||
<%= f.input :name, label: "Display Name" %>
|
||||
<%= f.input :ign, label: "Case sensitive Minecraft name" %>
|
||||
<%= f.input :email %>
|
||||
<%= f.input :password %>
|
||||
<%= f.input :password_confirmation %>
|
||||
<%= f.submit "Register" %>
|
||||
<div id="form_labels">
|
||||
<%= f.label :name, "Display name" %>
|
||||
<%= f.label :ign, "Minecraft name" %>
|
||||
<%= f.label :email, "Email" %>
|
||||
<%= f.label :password, "Password" %>
|
||||
<%= f.label :password_confirmation, "Confirm" %>
|
||||
</div>
|
||||
<div id="form_inputs">
|
||||
<%= f.input :name, placeholder: "John" %>
|
||||
<%= f.input :ign, placeholder: "johndoe_1337" %>
|
||||
<%= f.input :email, placeholder: "johndoe@example.com" %>
|
||||
<%= f.input :password, placeholder: "••••••" %>
|
||||
<%= f.input :password_confirmation, placeholder: "••••••" %>
|
||||
</div>
|
||||
<%= f.submit "Sign up", class: "btn blue" %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user