forked from thomcowell/radiant-gallery
/
_form.html.erb
35 lines (35 loc) · 1.44 KB
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<script type="text/javascript" charset="utf-8">
function toggle_advanced() {
['advanced_options', 'open_advanced_options', 'close_advanced_options'].each(function(id) {
Element.toggle(id);
});
}
</script>
<div class="form-area">
<p class="title">
<label for="gallery_name">Gallery name</label>
<%= f.text_field "name", :class => 'textbox', :maxlength => 255 %>
</p>
<p class="description">
<label for="gallery_description">Gallery description</label>
</p>
<div>
<%= f.text_area "description", :class => 'textbox', :maxlength => 255 %>
</div>
<div>
<label for="gallery_keywords"> Keywords for gallery. </label>
<%= f.text_field "keywords", :class => 'textbox', :maxlength => 255 %>
</div>
<p id="advanced_options" style="display: none;">
<%= f.check_box :hidden, {:id => 'hide_gallery'} %>
<label for="hide_gallery"> Hide this gallery in galleries list. </label>
</p>
<p>
<small id="close_advanced_options" style="display: none;"><a href="#" onclick="toggle_advanced(); return false;">Close advanced options</a></small>
<small id="open_advanced_options"><a href="#" onclick="toggle_advanced(); return false;">Advanced options</a></small>
</p>
<span class="clear"> </span>
</div>
<p class="buttons">
<%= save_model_button(@gallery) %> <%= save_model_and_continue_editing_button(@gallery) %> or <%= link_to "Cancel", admin_galleries_path %>
</p>