|
1 | 1 | <%# |
2 | | - Post create/edit form covering all post types. |
3 | | - Variables: |
4 | | - post : a Post instance to work on (either via .new or .find - doesn't matter if it has content or not) |
5 | | - submit_path : the URL to submit the form to (must accept POST requests) |
6 | | - post_type : a PostType instance describing the requested post type |
7 | | - category : a Category instance, required if the post type has a category, indicating which category to post in |
8 | | - parent : a Post instance containing the parent for this post (required if the post type has a parent) |
9 | | - inline_parent : optional, default true: display an inline copy of the parent? (if present) |
10 | | - type_summary : optional, default true: display a summary of the requested post type? |
11 | | - edit_comment : optional, default false: include a field for an edit comment? |
12 | | -%> |
| 2 | + "Post create/edit form covering all post types. |
| 3 | +
|
| 4 | + Variables: |
| 5 | + post : a Post instance to work on (either via .new or .find - doesn't matter if it has content or not) |
| 6 | + submit_path : the URL to submit the form to (must accept POST requests) |
| 7 | + post_type : a PostType instance describing the requested post type |
| 8 | + category : a Category instance, required if the post type has a category, indicating which category to post in |
| 9 | + parent : a Post instance containing the parent for this post (required if the post type has a parent) |
| 10 | + inline_parent : optional, default true: display an inline copy of the parent? (if present) |
| 11 | + type_summary : optional, default true: display a summary of the requested post type? |
| 12 | + edit_comment : optional, default false: include a field for an edit comment? |
| 13 | +"%> |
13 | 14 |
|
14 | 15 | <% |
15 | 16 | # defaults |
|
54 | 55 | </p> |
55 | 56 | <% end %> |
56 | 57 |
|
57 | | - <%= render 'shared/body_field', f: f, field_name: :body_markdown, field_label: t('posts.body_label'), post: post, |
58 | | - cur_length: post.body_markdown&.length, min_length: min_body_length(category), max_length: max_body_length(category) %> |
| 58 | + <%= render 'shared/body_field', |
| 59 | + f: f, |
| 60 | + field_name: :body_markdown, |
| 61 | + field_label: t('posts.body_label'), |
| 62 | + post: post, |
| 63 | + cur_length: post.body_markdown&.length, |
| 64 | + min_length: min_body_length(category), |
| 65 | + max_length: max_body_length(category) %> |
59 | 66 |
|
60 | 67 | <div class="rejected-elements notice is-warning hide"> |
61 | 68 | <h3>Unsupported HTML detected</h3> |
|
144 | 151 | <% category_default = category.license %> |
145 | 152 | <% user_default = user_preference('default_license', community: true) %> |
146 | 153 | <% if site_default.present? %> |
147 | | - community default: <a href="javascript:void(0)" class="js-license-autofill" data-license-id="<%= site_default.id %>"> |
| 154 | + community default: <a href="javascript:void(0)" |
| 155 | + class="js-license-autofill" |
| 156 | + data-license-id="<%= site_default.id %>"> |
148 | 157 | <%= site_default.name %> |
149 | 158 | </a> |
150 | 159 | <% end %> |
151 | 160 | <% if site_default.present? && category_default.present? %> |
152 | 161 | · |
153 | 162 | <% end %> |
154 | 163 | <% if category_default.present? %> |
155 | | - category default: <a href="javascript:void(0)" class="js-license-autofill" data-license-id="<%= category_default.id %>"> |
| 164 | + category default: <a href="javascript:void(0)" |
| 165 | + class="js-license-autofill" |
| 166 | + data-license-id="<%= category_default.id %>"> |
156 | 167 | <%= category_default.name %> |
157 | 168 | </a> |
158 | 169 | <% end %> |
|
0 commit comments