Sha256: 18056125be4201487552cfdf95a334839d001fb0b321ca36403bba2ba645cfa0
Contents?: true
Size: 1.58 KB
Versions: 42
Compression:
Stored size: 1.58 KB
Contents
<%= flash_message %> <h2>Edit Template</h2> <%= form_tag({}, { :onsubmit => "temp_content.toggleEditor();" }) do %> <table width="100%" height="100%"> <col width="100" /> <tr> <td>Name:</td> <td><%= text_field :temp, :name %></td> </tr> <tr> <td valign="top"><div style="margin-top: 2px">Content:</div></td> <td> <%= text_area :temp, :content, :class => 'codepress html autocomplete-off', :style => 'width: 100%; height: 600px;' %> </td> </tr> <tr> <td></td> <td> <%= submit_tag 'Save Template', :class => 'form_button' %> <button onclick="$('preview_frame').scrollIntoView(); temp_content.toggleEditor(); $('preview_content').value = $('temp_content_cp').value; $('preview_form').submit(); temp_content.toggleEditor(); return false;" class="form_button">Preview</button> <%= link_to 'Cancel', :action => 'templates' %> </td> </tr> </table> <br/> <%= render :partial => 'template_reference' %> <br/> <table width="100%"> <col width="100" /> <tr> <td valign="top"><div style="margin-top: 2px">Preview:</div></td> <td> <iframe id="preview_frame" name="preview_frame" style="width: 100%; height: 600px; border: 1px solid gray;"></iframe> <%= submit_tag 'Save Template', :class => 'form_button' %> </td> </tr> </table> <% end -%> <%= form_tag({ :controller => '/cms/content', :action => 'preview_template' }, :id => 'preview_form', :target => 'preview_frame') do %> <%= text_area_tag 'temp[content]', '', :id => 'preview_content', :style => 'display: none;' %> <%= hidden_field_tag 'mode', 'preview' %> <% end %>
Version data entries
42 entries across 42 versions & 1 rubygems