about summary refs log tree commit diff
path: root/app/views/filters/_fields.html.haml
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-07-10 10:52:18 +0200
committerGitHub <noreply@github.com>2018-07-10 10:52:18 +0200
commite6647ccf6d13030a91c7e635526e1e40a059ce31 (patch)
treeeda07c40c934ab9a55d7847afe4af3e54bce86b8 /app/views/filters/_fields.html.haml
parentc699b2d141d7aa910bd81ae5fe881ecec7039395 (diff)
parent402da8065c2b378cca6361f2c7252bd766f25dde (diff)
Merge pull request #557 from ThibG/glitch-soc/tentative-merge
Merge upstream changes
Diffstat (limited to 'app/views/filters/_fields.html.haml')
-rw-r--r--app/views/filters/_fields.html.haml14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/views/filters/_fields.html.haml b/app/views/filters/_fields.html.haml
new file mode 100644
index 000000000..a5a3f0337
--- /dev/null
+++ b/app/views/filters/_fields.html.haml
@@ -0,0 +1,14 @@
+.fields-group
+  = f.input :phrase, as: :string, wrapper: :with_block_label
+
+.fields-group
+  = f.input :context, wrapper: :with_block_label, collection: CustomFilter::VALID_CONTEXTS, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label_method: lambda { |context| I18n.t("filters.contexts.#{context}") }, include_blank: false
+
+.fields-group
+  = f.input :irreversible, wrapper: :with_label
+
+.fields-group
+  = f.input :whole_word, wrapper: :with_label
+
+.fields-group
+  = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')