- action ||= :create - if @dirmon_entry.errors.present? .alert.alert-alert Invalid Dirmon entry! - @dirmon_entry.errors.messages.each_pair do |field, message| .message = "#{field}: #{message}" = form_for @dirmon_entry, url: {action: action} do |f| .name.form-group = f.label :name = f.text_field :name, class: 'form-control' .path.form-group = f.label :pattern = f.text_field :pattern, class: 'form-control' .job.form-group = f.label :job_class_name = f.text_field :job_class_name, class: 'form-control', disabled: action != :create .job.form-group = f.label :perform_method = f.text_field :perform_method, class: 'form-control', disabled: action != :create .path.form-group = f.label :archive_directory = f.text_field :archive_directory, class: 'form-control' .row .col-md-12 = render partial: 'properties', locals: { f: f } .buttons = f.submit action, class: 'btn btn-primary' = link_to 'cancel', :back, class: 'btn btn-default' - if action == :create = button_tag 'properties', type: 'button', class: 'btn btn-default', id: 'properties', data: { url: rocket_job_mission_control.new_dirmon_entry_path }