summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-04-25 12:13:49 +0200
committerPeter Kozak <spag@golwen.net>2013-04-25 12:13:49 +0200
commit7e6b6a93a2d21c0e5bd8ad4c2b7be6172cb2638b (patch)
treedda2a53a2e024c283b6b145c99680bf5961433f2 /app
parentebd0b70051c53d207ab21d9671944201894baea3 (diff)
edit form
Diffstat (limited to 'app')
-rw-r--r--app/views/voicemail_settings/_edit_form.html.haml8
-rw-r--r--app/views/voicemail_settings/_edit_form_core.html.haml2
-rw-r--r--app/views/voicemail_settings/edit.html.haml2
3 files changed, 11 insertions, 1 deletions
diff --git a/app/views/voicemail_settings/_edit_form.html.haml b/app/views/voicemail_settings/_edit_form.html.haml
new file mode 100644
index 0000000..374df9f
--- /dev/null
+++ b/app/views/voicemail_settings/_edit_form.html.haml
@@ -0,0 +1,8 @@
+
+= simple_form_for([@voicemail_account, @voicemail_setting]) do |f|
+ = f.error_notification
+
+ = render "edit_form_core", :f => f
+
+ .form-actions
+ = f.button :submit, conditional_t('voicemail_settings.form.submit')
diff --git a/app/views/voicemail_settings/_edit_form_core.html.haml b/app/views/voicemail_settings/_edit_form_core.html.haml
new file mode 100644
index 0000000..4352f24
--- /dev/null
+++ b/app/views/voicemail_settings/_edit_form_core.html.haml
@@ -0,0 +1,2 @@
+.inputs
+ = f.input :value, :label => t("voicemail_settings.settings.#{@voicemail_setting.name.to_s}"), :hint => @voicemail_setting.description, :as => @input_type, input_html: @input_html
diff --git a/app/views/voicemail_settings/edit.html.haml b/app/views/voicemail_settings/edit.html.haml
index cb9924b..cfda363 100644
--- a/app/views/voicemail_settings/edit.html.haml
+++ b/app/views/voicemail_settings/edit.html.haml
@@ -1,3 +1,3 @@
- content_for :title, t("voicemail_settings.edit.page_title")
-= render "form" \ No newline at end of file
+= render "edit_form" \ No newline at end of file