質問編集履歴

2

追記

2020/05/12 15:01

投稿

yu_yu
yu_yu

スコア7

test CHANGED
File without changes
test CHANGED
@@ -25,3 +25,217 @@
25
25
  <hr>を2つ付けた場合は上記のようにグレーの線とブラックの線が出てきます。
26
26
 
27
27
  1つのみにした場合は色が反映されずグレーの線になります。
28
+
29
+
30
+
31
+
32
+
33
+ <追記>
34
+
35
+ 下記がHTMLとCSSになります。<hr>タグは
36
+
37
+ <%= f.fields_for :schedules do |f| %>の下についています。
38
+
39
+
40
+
41
+ ```ここに言語を入力
42
+
43
+
44
+
45
+ <%= nested_form_for(@user) do |f| %>
46
+
47
+ <% if user.errors.any? %>
48
+
49
+ <div id="error_explanation">
50
+
51
+ <h2><%= pluralize(user.errors.count, "error") %> prohibited this user from being saved:</h2>
52
+
53
+
54
+
55
+ <ul>
56
+
57
+ <% user.errors.full_messages.each do |message| %>
58
+
59
+ <li><%= message %></li>
60
+
61
+ <% end %>
62
+
63
+ </ul>
64
+
65
+ </div>
66
+
67
+ <% end %>
68
+
69
+
70
+
71
+
72
+
73
+ <div class="field">
74
+
75
+ <%= f.label "企業名" %>
76
+
77
+ <%= f.text_field :company,class:"form-control",placeholder:"企業名" %>
78
+
79
+ </div>
80
+
81
+
82
+
83
+ <div class="field">
84
+
85
+ <%= f.label "ユーザーID" %>
86
+
87
+ <%= f.text_field :userid,class:"form-control",placeholder:"ユーザーID" %>
88
+
89
+ </div>
90
+
91
+
92
+
93
+ <div class="field">
94
+
95
+ <%= f.label "パスワード" %>
96
+
97
+ <%= f.text_field :pass,class:"form-control",placeholder:"パスワード" %>
98
+
99
+ </div>
100
+
101
+
102
+
103
+ <div class="field">
104
+
105
+ <%= f.label "メモ" %>
106
+
107
+ <%= f.text_field :memo,class:"form-control",placeholder:"メモ" %>
108
+
109
+ </div>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+ <%= f.fields_for :schedules do |f| %>
122
+
123
+ <hr color="black">
124
+
125
+ <div class="field">
126
+
127
+ <%= f.collection_select :category_id, @category, :id, :name,{:prompt => "予定を選択"},class:"form-control",id:"select-form"%>
128
+
129
+ <%= f.text_field :time, class:"form-control",placeholder:"日程"%>
130
+
131
+ </div>
132
+
133
+ <div class="buttons">
134
+
135
+ <%= f.link_to_remove do%>
136
+
137
+ <span class="glyphicon glyphicon-trash"></span>
138
+
139
+ </div>
140
+
141
+
142
+
143
+ <% end %>
144
+
145
+ <% end %>
146
+
147
+
148
+
149
+
150
+
151
+ <%= f.link_to_add "予定の追加", :schedules, class:"button-4" %>
152
+
153
+ <%= f.submit "作成",class:"button-4-1"%>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+ <% end %>
162
+
163
+
164
+
165
+
166
+
167
+ ```
168
+
169
+ ```ここに言語を入力
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+ @import "bootstrap-sprockets";
178
+
179
+ @import "bootstrap";
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ #select-form {
188
+
189
+ width:150px;
190
+
191
+ }
192
+
193
+
194
+
195
+
196
+
197
+ .container{
198
+
199
+ width:800px;
200
+
201
+ margin:0 auto;
202
+
203
+ }
204
+
205
+
206
+
207
+ .glyphicon{
208
+
209
+ color: #F08080;
210
+
211
+
212
+
213
+
214
+
215
+ }
216
+
217
+
218
+
219
+ .buttons{
220
+
221
+ text-align:right;
222
+
223
+ text-decoration: none;
224
+
225
+ }
226
+
227
+
228
+
229
+
230
+
231
+ .new-back{
232
+
233
+ margin-top:20px;
234
+
235
+
236
+
237
+ }
238
+
239
+
240
+
241
+ ```

1

誤字の修正

2020/05/12 15:01

投稿

yu_yu
yu_yu

スコア7

test CHANGED
File without changes
test CHANGED
@@ -22,6 +22,6 @@
22
22
 
23
23
 
24
24
 
25
- <hr>を2つ付けた場合は上記のようにグレーの線ブラックの線が出てきます。
25
+ <hr>を2つ付けた場合は上記のようにグレーの線ブラックの線が出てきます。
26
26
 
27
27
  1つのみにした場合は色が反映されずグレーの線になります。