Mercurial > zeropaste
annotate app/views/pastes/new.html.erb @ 476:5d3567759915
Update gems
author | nanaya <me@nanaya.pro> |
---|---|
date | Thu, 06 Aug 2020 23:08:41 +0900 |
parents | c8e2f6b22527 |
children |
rev | line source |
---|---|
398 | 1 <% provide :title, t(".title") %> |
402 | 2 |
398 | 3 <%= form_for @paste do |f| %> |
379 | 4 <%= render "shared/filter_spam" %> |
398 | 5 |
469 | 6 <div class="form-group"> |
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 %> | |
2 | 12 </div> |
189
b4b7a29b70f6
Initial work for paste deletion.
Edho Arief <edho@myconan.net>
parents:
56
diff
changeset
|
13 |
402 | 14 |
469 | 15 <div class="row"><div class="col-12"> |
16 <button type="button" class="btn btn-secondary ml-auto d-block js-paste-preview-md"> | |
17 <%= t(".preview_md") %> | |
18 </button> | |
403 | 19 </div></div> |
20 | |
469 | 21 <div class="form-group row"> |
22 <%= f.label :key, t('.deletion_key'), class: 'col-sm-2 col-form-label' %> | |
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> | |
424 | 30 </div> |
402 | 31 |
469 | 32 <div class="form-group row"> |
33 <label class="col-sm-2 col-form-label pt-0"> | |
34 <%= t(".privacy.label") %> | |
35 </label> | |
379 | 36 |
469 | 37 <div class="col-sm-10"> |
424 | 38 <% paste_privacy_options.each do |label, value| %> |
469 | 39 <label class="custom-control custom-radio mb-0"> |
40 <%= f.radio_button :is_private, value, class: 'custom-control-input' %> | |
41 | |
471 | 42 <span class="custom-control-label d-inline-block"> |
424 | 43 <%= t(".privacy.#{label}") %> |
469 | 44 </span> |
45 </label> | |
424 | 46 <% end %> |
379 | 47 </div> |
424 | 48 </div> |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
49 |
469 | 50 <div class="form-group row"> |
51 <%= f.label :language, class: 'col-sm-2 col-form-label' %> | |
417
080dd141898c
Add support for explicit highlighter languages
nanaya <me@myconan.net>
parents:
410
diff
changeset
|
52 |
469 | 53 <div class="col-auto"> |
54 <%= f.select :language, [], { prompt: t(".language_none") }, class: 'custom-select' %> | |
55 </div> | |
424 | 56 </div> |
379 | 57 |
424 | 58 <div class="form-group"> |
59 <%= f.button :class => "btn btn-primary" %> | |
403 | 60 |
424 | 61 <%= link_to t(".clear"), "#", :class => "btn btn-danger js-paste-clear" %> |
62 </div> | |
2 | 63 <% end %> |
402 | 64 |
409 | 65 <div class="modal fade js-paste-preview-md-modal" tabindex="-1" role="dialog"> |
402 | 66 <div class="modal-dialog" role="document"> |
67 <div class="modal-content"> | |
68 <div class="modal-body js-paste-preview-md-box"> | |
69 </div> | |
70 <div class="modal-footer"> | |
469 | 71 <button type="button" class="btn btn-secondary" data-dismiss="modal"> |
408 | 72 <%= t("buttons.close") %> |
402 | 73 </button> |
74 </div> | |
75 </div> | |
76 </div> | |
77 </div> |