|
6 | 6 | end
|
7 | 7 | %>
|
8 | 8 |
|
9 |
| -<section class="form--section"> |
10 |
| - <input type="hidden" name="settings[enabled]" value="1"/> |
| 9 | +<div id="settings"> |
| 10 | + <%= styled_form_tag({controller: '/admin/settings', action: 'update_plugin' }) do %> |
| 11 | + <input type="hidden" name="settings[enabled]" value="1"/> |
11 | 12 |
|
12 |
| - <div class="form--field"> |
13 |
| - <%= styled_label_tag("settings[webhook_url]", t("slack.default_webhook_url")) %> |
14 |
| - <div class="form--field-container"> |
15 |
| - <%= |
| 13 | + <div class="form--field"> |
| 14 | + <%= styled_label_tag("settings[webhook_url]", t("slack.default_webhook_url")) %> |
| 15 | + <div class="form--field-container"> |
| 16 | + <%= |
16 | 17 | styled_text_field_tag(
|
17 | 18 | "settings[webhook_url]",
|
18 | 19 | Setting.plugin_openproject_slack["webhook_url"],
|
19 |
| - container_class: '-xwide' |
| 20 | + container_class: '-xwide', |
| 21 | + type: 'url', |
| 22 | + pattern: "[ -~]*", |
| 23 | + title: t("slack.only_ascii_chars_url"), |
20 | 24 | )
|
21 |
| - %> |
| 25 | + %> |
| 26 | + </div> |
22 | 27 | </div>
|
23 |
| - </div> |
24 | 28 |
|
25 |
| - <span class="form--field-instructions"> |
26 |
| - <%# Creates the custom field if not yet present. %> |
27 |
| - <% custom_field = OpenProject::Slack.project_custom_field %> |
28 |
| - <% edit_url = edit_admin_settings_project_custom_field_path custom_field %> |
29 |
| - <%= |
30 |
| - t( |
| 29 | + <span class="form--field-instructions"> |
| 30 | + <%# Creates the custom field if not yet present. %> |
| 31 | + <% custom_field = OpenProject::Slack.project_custom_field %> |
| 32 | + <%= t( |
31 | 33 | "slack.per_project_instructions_html",
|
32 |
| - custom_field_url: edit_url, |
| 34 | + custom_field_url: edit_admin_settings_project_custom_field_path(custom_field), |
33 | 35 | custom_field_name: custom_field.name
|
34 |
| - ) |
35 |
| - %> |
36 |
| - </span> |
37 |
| -</section> |
| 36 | + ) %> |
| 37 | + </span> |
| 38 | + <%= styled_submit_tag t(:button_apply), class: '-primary' %> |
| 39 | + <% end %> |
| 40 | +</div> |
0 commit comments