my_profile and admin/ordergroups.
This commit is contained in:
parent
a787b3cf24
commit
c173cf4a6a
14 changed files with 92 additions and 225 deletions
31
app/views/shared/_group_form_fields.html.haml
Normal file
31
app/views/shared/_group_form_fields.html.haml
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
= f.input :name
|
||||
= f.input :description
|
||||
|
||||
= yield
|
||||
|
||||
- if f.object.is_a?(Workgroup)
|
||||
%h3 Wöchentliche Jobs definieren?
|
||||
= f.input :weekly_task
|
||||
#weekly_task_fields
|
||||
= f.input :weekday
|
||||
= f.input :task_name
|
||||
= f.input :task_required_users
|
||||
= f.input :task_duration, :as => :select, :collection => (1..3)
|
||||
= f.input :task_description
|
||||
|
||||
- content_for :head do
|
||||
:javascript
|
||||
function toggleWeeklyTaskFields() {
|
||||
if ($('#workgroup_weekly_task').attr('checked') == 'checked') {
|
||||
$('#weekly_task_fields div.input').show();
|
||||
} else {
|
||||
$('#weekly_task_fields div.input').hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
toggleWeeklyTaskFields();
|
||||
$('#workgroup_weekly_task').click(function() {
|
||||
toggleWeeklyTaskFields();
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue