ruby
1<%= form_with model: @user, url: user_registration_path, class: 'registration-main', local: true do |f| %> 2<div class='form-wrap'>3 <div class='form-header'>4 <h1 class='form-header-text'>5 会員情報入力 6 </h1>7 </div>8<div class="error-group">9 <%= render 'shared/error_messages', model:f.object %> 10</div> 11 12 <div class="form-group">13 <div class='form-text-wrap'>14 <label class="form-text">お名前</label>15 <span class="indispensable">必須</span>16 </div>17 <%= f.text_area :name, class:"input-default", id:"name", placeholder:"例) 田中 太郎", maxlength:"40" %> 18 </div> 19 <div class="form-group">20 <div class='form-text-wrap'>21 <label class="form-text">メールアドレス</label>22 <span class="indispensable">必須</span>23 </div>24 <%= f.email_field :email, class:"input-default", id:"email", placeholder:"PC・携帯どちらでも可", autofocus: true %> 25 </div> 26 <div class="form-group">27 <div class='form-text-wrap'>28 <label class="form-text">パスワード</label>29 <span class="indispensable">必須</span>30 </div>31 <%= f.password_field :password, class:"input-default", id:"password", placeholder:"6文字以上の半角英数字" %> 32 <p class='info-text'>※英字と数字の両方を含めて設定してください</p>33 </div>34 <div class="form-group">35 <div class='form-text-wrap'>36 <label class="form-text">パスワード(確認)</label>37 <span class="indispensable">必須</span>38 </div>39 <%= f.password_field :password_confirmation, class:"input-default", id:"password-confirmation", placeholder:"同じパスワードを入力して下さい" %> 40 </div> 41 <div class="form-group">42 <p class='form-info-header'>43 </div>44 <div class="form-group">45 <div class='form-text-wrap'>46 <label class="form-text">電話番号</label>47 <span class="indispensable">必須</span>48 </div>49 <%= f.text_field :phone_number, class:"input-default", id:"phone-number", placeholder:"例)09012345678",maxlength:"11"%> 50 </div> 51 <div class="form-group">52 <div class='form-text-wrap'>53 <label class="form-text">生年月日</label>54 <span class="indispensable">必須</span>55 </div>56 <div class='input-birth-wrap'>57 <%= raw sprintf( 58 f.date_select( 59 :birthday, 60 class:'select-birth', 61 id:"birth-date", 62 use_month_numbers: true, 63 prompt:'--', 64 start_year: 1930, 65 end_year: (Time.now.year - 5), 66 date_separator: '%s'), 67 "<p> 年 </p>", "<p> 月 </p>") + "<p> 日 </p>" %> 68 </div> 69 </div> 70 <div class="form-group">71 <div class='form-text-wrap'>72 <label class="form-text">血液型</label>73 <span class="indispensable">必須</span>74 </div>75 <div class='input-name-wrap'>76 <%# <%= f.text_field :blood_type_id, class:"input-name", id:"blood_type", placeholder:"例) O型" %> %>77 <%= f.collection_select(:blood_type_id, BloodType.all, :id, :name, {}, {class:"input-name", id:"blood_type"}) %> 78 </div> 79 </div> 80 <div class="form-group">81 <div class='form-text-wrap'>82 <label class="form-text">利用開始日</label>83 <span class="indispensable">必須</span>84 </div>85 <div class='input-birth-wrap'>86 <%= raw sprintf( 87 f.date_select( 88 :start_date, 89 class:'select-birth', 90 id:"start_date", 91 use_month_numbers: true, 92 prompt:'--', 93 start_year: 1930, 94 end_year: (Time.now.year - 5), 95 date_separator: '%s'), 96 "<p> 年 </p>", "<p> 月 </p>") + "<p> 日 </p>" %> 97 </div> 98 </div> 99 <div class='register-btn'><br><br>100 <%= f.submit "会員登録" ,class:"register-red-btn" %> 101 </div>102</div>103<% end %>
0 コメント