Combined Mastodon username and instance fields into one field.

This commit is contained in:
Logan Fick
2017-10-15 17:07:51 -04:00
parent b07830fc7a
commit e0ca823245
2 changed files with 4 additions and 10 deletions

View File

@@ -56,10 +56,8 @@
</tr>
<tr>
<td>Mastodon</td>
<td style="display:inline;padding:0px">
<% mstdn_array = @user.mastodon.split("@") if @user.mastodon %>
<%= f.text_field :mastodon, value: (mstdn_array[0] if mstdn_array), placeholder: "Mastodon username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)), style: "width:49%;float:left;margin-right:2%" %>
<%= f.text_field :mastodon_instance, value: (mstdn_array[1] if mstdn_array), placeholder: "Mastodon instance", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)), style: "width:49%" %>
<td>
<%= f.text_field :mastodon, placeholder: "Mastodon username", disabled: !(@user.is?(current_user) && confirmed? || (mod? && current_user.role >= @user.role)) %>
</td>
</tr>
<tr>