diff --git a/app/assets/stylesheets/formtastic-changes.css.scss b/app/assets/stylesheets/formtastic-changes.css.scss index 5007540..498eb2a 100644 --- a/app/assets/stylesheets/formtastic-changes.css.scss +++ b/app/assets/stylesheets/formtastic-changes.css.scss @@ -5,13 +5,7 @@ form.formtastic textarea { width:90%; height:20em; } -form.formtastic .stringish label { -font-weight: bold; -} -form.formtastic .choice-group label { -font-weight: bold; -} -form.formtastic fieldset div.control-group{} + div.form-group { border-width: 1px; @@ -19,3 +13,8 @@ border-style: dashed; padding: 10px; border-radius: 10px; } +div.verwalten-block { +border-width: 1px; +border-style: solid; +padding: 5px; +} \ No newline at end of file diff --git a/app/controllers/modulgruppen_controller.rb b/app/controllers/modulgruppen_controller.rb index c69f8fe..d84de6f 100755 --- a/app/controllers/modulgruppen_controller.rb +++ b/app/controllers/modulgruppen_controller.rb @@ -51,15 +51,10 @@ class ModulgruppenController < ApplicationController def create @modulgruppe = Modulgruppe.new(params[:modulgruppe]) - if !params[:studium_id].nil? - @studium=Studium.find_by_id(params[:studium_id]) - else - @studium=Studium.find_by_id(params[:modulgruppe][:studium_id]) - end respond_to do |format| if @modulgruppe.save - format.html { redirect_to @studium, notice: 'Modulgruppe was successfully created.' } + format.html { redirect_to @modulgruppe.studium, notice: 'Modulgruppe was successfully created.' } else format.html { render action: "new" } diff --git a/app/views/modulgruppen/_form.html.erb b/app/views/modulgruppen/_form.html.erb index 8191af5..22cc925 100755 --- a/app/views/modulgruppen/_form.html.erb +++ b/app/views/modulgruppen/_form.html.erb @@ -1,13 +1,25 @@ <%= semantic_form_for @modulgruppe do |f| %> <%= f.inputs do %> - <%= f.input :studium_id, :as =>:select, :collection => Studium.all %> - <%= f.input :typ ,:as => :radio, :collection=>["Pflicht","Vertiefungspflicht","Wahl"]%> - <%= f.input :phase,:as => :radio,:collection=>1..3 %> - <%= f.input :name %> - <%= f.input :desc,:input_html=>{:rows=> 3 }%> - <% end %> +