mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-15 16:56:32 +01:00
migrate project creation
This commit is contained in:
parent
36e63a4ad9
commit
4413cabbba
12 changed files with 152 additions and 94 deletions
|
|
@ -7,60 +7,8 @@
|
|||
<%= render :partial => 'project_state_group', :object => @completed_projects, :locals => { :state => 'completed'} %>
|
||||
</div>
|
||||
|
||||
<% @project = @new_project -%>
|
||||
<div id="input_box">
|
||||
<div id="project_new_project_filler">
|
||||
<div id="project_new_project_container">
|
||||
|
||||
<div id="toggle_project_link" class="hide_form">
|
||||
<a id="toggle_project_new" href="#" title="<%= t('projects.hide_new_project_form') %>" accesskey="n">« <%= t('projects.hide_form') %></a>
|
||||
</div>
|
||||
|
||||
<div id="project_new" class="project_new" style="display:block">
|
||||
<% form_remote_tag(:url => projects_path, :method => :post,
|
||||
:html=> { :id=>'project-form', :name=>'project', :class => 'inline-form'},
|
||||
:before => "$('#project_new_project_submit').block({message:null})",
|
||||
:complete => "$('#project_new_project_submit').unblock()") do -%>
|
||||
|
||||
<div id="status"><%= error_messages_for('project') %></div>
|
||||
|
||||
<label for="project_name"><%= Project.human_attribute_name(:name) %>:</label><br />
|
||||
<%= text_field 'project', 'name', "tabindex" => 1 %><br />
|
||||
|
||||
<label for="project_description"><%= Project.human_attribute_name(:description) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_area 'project', 'description', "cols" => 30, "rows" => 4, "tabindex" => 2 %><br />
|
||||
|
||||
<% unless @contexts.empty? -%>
|
||||
<label for="default_context_name"><%= Project.human_attribute_name(:default_context_name) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_field_tag("project[default_context_name]", @project.default_context.name, :tabindex => 3) %>
|
||||
<br />
|
||||
<% end -%>
|
||||
|
||||
<label for="default_tags"><%= Project.human_attribute_name(:default_tags) %> (<%= t('common.optional') %>):</label><br />
|
||||
<%= text_field_tag("project[default_tags]", @project.default_tags, :tabindex => 4) %>
|
||||
<br />
|
||||
|
||||
<br/>
|
||||
|
||||
<div class="submit_box">
|
||||
<div class="widgets">
|
||||
<button type="submit" class="positive" id="project_new_project_submit">
|
||||
<%= image_tag("accept.png", :alt => "") + t('projects.add_project') %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br/><br/>
|
||||
<input id="go_to_project" type="checkbox" tabindex="5" name="go_to_project"/><label for="go_to_project"><%= t('projects.to_new_project_page') %></label><br />
|
||||
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'new_project_form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.onload=function(){
|
||||
Nifty("div#project_new_project_container","normal");
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue