mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 01:11:43 +02:00
Refactor setting view #2628
This commit is contained in:
parent
c68c0cd7bd
commit
d7e7d81c9f
3 changed files with 78 additions and 22 deletions
9
app/views/admin/settings/_setting_row.haml
Normal file
9
app/views/admin/settings/_setting_row.haml
Normal file
|
@ -0,0 +1,9 @@
|
|||
- value = Setting.send(var)
|
||||
%tr
|
||||
%td= t(var)
|
||||
- if [TrueClass, FalseClass].include?(value.class)
|
||||
%td
|
||||
= hidden_field_tag("[settings][#{var}]", '')
|
||||
= check_box_tag("[settings][#{var}]", true, value)
|
||||
- else
|
||||
%td= text_field_tag("[settings][#{var}]", value)
|
Loading…
Add table
Add a link
Reference in a new issue