84 lines
No EOL
2.5 KiB
Text
84 lines
No EOL
2.5 KiB
Text
- form_for [:admin, @workgroup] do |@form|
|
|
= @form.error_messages
|
|
|
|
%div{:style => "float:left;width:55%;"}
|
|
%p
|
|
= @form.label :name
|
|
%br/
|
|
= @form.text_field :name, :size => 20
|
|
%p
|
|
= @form.label :description
|
|
%br/
|
|
= @form.text_field :description, :size => 40
|
|
|
|
%div{:style => "float:right;width:40%"}
|
|
%h3 Gruppe hat Zugriff auf
|
|
%table
|
|
%tr
|
|
%td
|
|
= @form.label :role_admin, "Administration"
|
|
%td= @form.check_box :role_admin
|
|
%tr
|
|
%td
|
|
= @form.label :role_finance, "Finanzen"
|
|
%td= @form.check_box :role_finance
|
|
%tr
|
|
%td
|
|
= @form.label :role_suppliers, "Lieferantenverwaltung"
|
|
%td= @form.check_box :role_suppliers
|
|
%tr
|
|
%td
|
|
= @form.label :role_article_meta, "Artikelverwaltung"
|
|
%td= @form.check_box :role_article_meta
|
|
%tr
|
|
%td
|
|
= @form.label :role_orders, "Bestellungsverwaltung"
|
|
%td= @form.check_box :role_orders
|
|
|
|
%div{:style => "clear:both"}
|
|
%h3
|
|
Wöchentliche Jobs definieren?
|
|
= @form.check_box :weekly_task, {:onclick => "toggleWeeklyTask();"}
|
|
%table
|
|
%tr
|
|
%td
|
|
= @form.label :weekday, "Wochentag:"
|
|
%td
|
|
= @form.select :weekday, Workgroup.weekdays
|
|
%tr
|
|
%td
|
|
= @form.label :task_name, "Dienstname:"
|
|
%td= @form.text_field :task_name, :size => 20
|
|
%tr
|
|
%td
|
|
= @form.label :task_required_users, "Benötigte Verantwortliche:"
|
|
%td= @form.text_field :task_required_users, :size => 3
|
|
%tr
|
|
%td
|
|
= @form.label :task_description, "Beschreibung:"
|
|
%td= @form.text_area :task_description
|
|
|
|
%br{ :style => "clear:both" }
|
|
= submit_tag "Speichern"
|
|
|
|
|
= link_to "Abbrechen", admin_workgroups_path
|
|
|
|
%script{ 'type' => "text/javascript"}
|
|
:plain
|
|
//<![CDATA[
|
|
// preset data
|
|
function toggleWeeklyTask(){
|
|
if ($("workgroup_weekly_task").checked == true) {
|
|
$('workgroup_weekday').disabled = false;
|
|
$('workgroup_task_name').disabled = false;
|
|
$('workgroup_task_required_users').disabled = false;
|
|
$('workgroup_task_description').disabled = false;
|
|
} else {
|
|
$('workgroup_weekday').disabled = true;
|
|
$('workgroup_task_name').disabled = true;
|
|
$('workgroup_task_required_users').disabled = true;
|
|
$('workgroup_task_description').disabled = true;
|
|
}
|
|
}
|
|
toggleWeeklyTask();
|
|
//]]> |