diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 7662c12e0..ea36cbedf 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -4,7 +4,7 @@
- +
-
+ +
<%= render :partial => 'show_head', :locals => {:poll => @poll}%>
+
<% @poll.poll_questions.each do |poll_question|%> diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index d279df64e..ce74dc10a 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,9 +1,9 @@
-

+

<%= poll.polls_name%>

-

+

<%= @poll.polls_description%>

diff --git a/app/views/poll/update.js.erb b/app/views/poll/update.js.erb index e83b1b9f0..15d0fabd5 100644 --- a/app/views/poll/update.js.erb +++ b/app/views/poll/update.js.erb @@ -1 +1,6 @@ -$("#polls_head").html("<%= escape_javascript(render :partial => 'show_head', :locals => {:poll => @poll}) %>"); \ No newline at end of file +$("#polls_title").val("<%= @poll.polls_name%>"); +$("#polls_description").val("<%= @poll.polls_description %>"); +$("#polls_name_h").html("<%= @poll.polls_name %>"); +$("#polls_description_p").html("<%= @poll.polls_description %>"); +$("#polls_head_edit").hide(); +$("#polls_head_show").show(); \ No newline at end of file