mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
adding a bit of javascript to submit the form when done is checked
This commit is contained in:
parent
5fdc5ae436
commit
23e04b7884
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
</span>
|
||||
<% this_year = current_user.time.to_date.strftime("%Y").to_i
|
||||
if parent_container_type == 'show_mobile' -%>
|
||||
<p><label for="todo_done"><%= t('todos.done') %></label> <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %></p>
|
||||
<p><label for="todo_done"><%= t('todos.done') %></label> <%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1, "onClick" => "document.mobileEdit.submit()") %></p>
|
||||
<% end -%>
|
||||
<h2><label for="todo_description"><%= t('common.description') %></label></h2>
|
||||
<%= text_field( "todo", "description", "tabindex" => 2, "maxlength" => 100, "size" => 50) %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% form_tag todo_path(@todo, :format => 'm'), :method => :put do %>
|
||||
<% form_tag todo_path(@todo, :format => 'm'), :name => 'mobileEdit', :method => :put do %>
|
||||
<%= render :partial => 'edit_mobile', :locals => { :parent_container_type => "show_mobile" } %>
|
||||
<p><input type="submit" value="<%= t('common.update') %>" tabindex="6" accesskey="#" /></p>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue