You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/views/asciicasts/_form.html.erb

42 lines
1.2 KiB
Plaintext

<%= form_for @asciicast, :html => { :class => 'form-horizontal' } do |f| %>
<fieldset>
<legend><%= controller.action_name.capitalize %> asciicast</legend>
<div class="control-group">
<%= f.label :title, :class => 'control-label' %>
<div class="controls">
<%= f.text_field :title, :class => 'text_field span6' %>
</div>
</div>
<div class="control-group">
<%= f.label :description, :class => 'control-label' %>
<div class="controls">
<%= f.text_area :description, :class => 'text_area span6' %>
</div>
<div class="controls">
Parsed with <a href="http://github.github.com/github-flavored-markdown/"
target="_blank">GitHub Flavored Markdown</a>
</div>
</div>
<div class="form-actions">
<%= f.submit 'Update asciicast', :class => 'btn btn-primary' %>
<%= link_to 'Cancel', asciicast_path, :class => 'btn' %>
</div>
</fieldset>
<% end %>
<script>
$(function() {
if (window.location.toString().match(/focus-title/)) {
$('#asciicast_title').focus();
}
if (window.location.toString().match(/focus-desc/)) {
$('#asciicast_description').focus();
}
});
</script>