comparison app/views/pastes/new.html.erb @ 469:68231013b01b bootstrap-4

Now with more bootstrap than ever
author nanaya <me@nanaya.pro>
date Sun, 23 Feb 2020 22:25:50 +0900
parents b2991317d4d7
children c8e2f6b22527
comparison
equal deleted inserted replaced
468:802dcd44188e 469:68231013b01b
1 <% provide :title, t(".title") %> 1 <% provide :title, t(".title") %>
2 2
3 <%= form_for @paste do |f| %> 3 <%= form_for @paste do |f| %>
4 <%= render "shared/filter_spam" %> 4 <%= render "shared/filter_spam" %>
5 5
6 <div class="form-group <%= error_class f.object, :paste %>"> 6 <div class="form-group">
7 <%= f.text_area :paste, :autofocus => true, :class => "form-control paste-paste js-paste-paste", :rows => 20 %> 7 <%= f.text_area :paste,
8 autofocus: true,
9 class: "form-control paste-paste js-paste-paste #{error_class f.object, :paste}",
10 rows: 20
11 %>
8 </div> 12 </div>
9 13
10 14
11 <div class="row"><div class="col-xs-12"> 15 <div class="row"><div class="col-12">
12 <%= link_to t(".preview_md"), "#", 16 <button type="button" class="btn btn-secondary ml-auto d-block js-paste-preview-md">
13 :class => "btn btn-default js-paste-preview-md pull-right" 17 <%= t(".preview_md") %>
14 %> 18 </button>
15 </div></div> 19 </div></div>
16 20
17 <div class="form-group <%= error_class f.object, :key %> form-group--narrow"> 21 <div class="form-group row">
18 <%= f.label :key, t(".deletion_key") %> 22 <%= f.label :key, t('.deletion_key'), class: 'col-sm-2 col-form-label' %>
19 <%= f.text_field :key, :autocomplete => "off", :class => "form-control" %> 23
24 <div class="col-auto">
25 <%= f.text_field :key,
26 autocomplete: 'off',
27 class: "form-control #{error_class f.object, :key}"
28 %>
29 </div>
20 </div> 30 </div>
21 31
22 <div class="form-group"> 32 <div class="form-group row">
23 <label><%= t(".privacy.label") %></label> 33 <label class="col-sm-2 col-form-label pt-0">
34 <%= t(".privacy.label") %>
35 </label>
24 36
25 <div class="radio-container"> 37 <div class="col-sm-10">
26 <% paste_privacy_options.each do |label, value| %> 38 <% paste_privacy_options.each do |label, value| %>
27 <div class="radio"> 39 <label class="custom-control custom-radio mb-0">
28 <label> 40 <%= f.radio_button :is_private, value, class: 'custom-control-input' %>
29 <%= f.radio_button :is_private, value %> 41
42 <span class="custom-control-label">
30 <%= t(".privacy.#{label}") %> 43 <%= t(".privacy.#{label}") %>
31 </label> 44 </span>
32 </div> 45 </label>
33 <% end %> 46 <% end %>
34 </div> 47 </div>
35 </div> 48 </div>
36 49
37 <div class="form-group form-group--narrow"> 50 <div class="form-group row">
38 <%= f.label :language %> 51 <%= f.label :language, class: 'col-sm-2 col-form-label' %>
39 52
40 <%= f.select :language, [], { :prompt => t(".language_none") }, :class => "form-control" %> 53 <div class="col-auto">
54 <%= f.select :language, [], { prompt: t(".language_none") }, class: 'custom-select' %>
55 </div>
41 </div> 56 </div>
42 57
43 <div class="form-group"> 58 <div class="form-group">
44 <%= f.button :class => "btn btn-primary" %> 59 <%= f.button :class => "btn btn-primary" %>
45 60
51 <div class="modal-dialog" role="document"> 66 <div class="modal-dialog" role="document">
52 <div class="modal-content"> 67 <div class="modal-content">
53 <div class="modal-body js-paste-preview-md-box"> 68 <div class="modal-body js-paste-preview-md-box">
54 </div> 69 </div>
55 <div class="modal-footer"> 70 <div class="modal-footer">
56 <button type="button" class="btn btn-default" data-dismiss="modal"> 71 <button type="button" class="btn btn-secondary" data-dismiss="modal">
57 <%= t("buttons.close") %> 72 <%= t("buttons.close") %>
58 </button> 73 </button>
59 </div> 74 </div>
60 </div> 75 </div>
61 </div> 76 </div>