<script type="text/javascript">
  var localDomains = "";
  $(document).ready(function() {
    $.validationEngineLanguage.newLang(localDomains);
    $("#user").validationEngine();
  });
</script>
<fieldset>
  <h2>ユーザ情報編集</h2>
  <%= form_with(model: @user, url: {action: :update, id: @user.id}, 
              id: 'user', html: {name: "user"}) do |f| -%>
    <div class="table-sys-a">
      <div class="item-mid2">ユーザＩＤ</div>
      <div class="input-mid2"><%= f.text_field :login, class: "validate[required, maxSize[30], custom[onlyHalfWidthAlphanumeric], funcCall[validateLogin[#{f.object.id}]]]", style: "width:150px;" %></div>
      <div class="item-mid2">ユーザ名</div>
      <div class="input-mid2"><%= f.text_field :name, class: 'validate[required, maxSize[50]]', style: "width:150px;" %></div>
      <div class="item-mid2">メールアドレス</div>
      <div class="input-mid2"><%= f.text_field :email, class: 'validate[required, maxSize[255], custom[email]]', style: "width:150px;" %></div>
      <div class="item-mid2">備考</div>
      <div class="input-mid2"><%= f.text_area :note, cols: '40', rows: '10', class: 'validate[maxSize[400]]' %></div>
      <div class="item-mid2"></div>
      <div class="input-mid2" align="left"><%= f.submit "更　新" %></div>
    </div>
  <% end %>
</fieldset>

<br>
<div align="left">
<% if session[:target_for_back_id] -%>
  <%= link_to "戻る", {action: session[:target_for_back], id: session[:target_for_back_id]} %><br />
<% else -%>
  <%= link_to "戻る", {action: session[:target_for_back]} %><br />
<% end -%>
</div>
<br><br>
