Commit 8fa1d249 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Kamil Trzciński

Remove two-column layout from create and edit feature flag forms

parent 2ba2656d
...@@ -4,22 +4,26 @@ ...@@ -4,22 +4,26 @@
- @feature_flag.errors.full_messages.each do |msg| - @feature_flag.errors.full_messages.each do |msg|
%p= msg %p= msg
- unless @feature_flag.persisted? %fieldset
.form-group.row .row
= f.label :name, class: 'col-form-label col-sm-2' do .form-group.col-md-4
Name = f.label :name, class: 'label-light', for: 'feature_flag_name' do
.col-sm-10 = s_('FeatureFlags|Name')
= f.text_field :name, required: true, autocomplete: 'off', class: 'form-control', disabled: @feature_flag.persisted? = f.text_field :name, class: "form-control", id: "feature_flag_name"
.row
.form-group.row .form-group.col-md-4
= f.label :active, class: 'col-form-label col-sm-2' do = f.label :description, class: 'label-light', for: 'feature_flag_description' do
Active = s_('FeatureFlags|Description')
.col-sm-10 = f.text_area :description, class: "form-control", id: "feature_flag_description", rows: 4
= f.check_box :active .row
.form-group.col-md-1
.form-group.row = f.label :active, class: 'label-light', for: 'feature_flag_status' do
= f.label :description, class: 'col-form-label col-sm-2' do = s_('FeatureFlags|Status')
Description = f.check_box :active, class: "form-control", id: "feature_flag_status", rows: 4
.col-sm-10 .form-actions
= f.text_area :description, rows: 5, class: 'form-control' - if @feature_flag.persisted?
%span.help-inline Write a description of your feature flag = f.submit 'Save changes', class: "btn btn-save"
- else
= f.submit 'Create feature flag', class: "btn btn-save"
.float-right
= link_to _('Cancel'), project_feature_flags_path(@project), class: 'btn btn-cancel'
- add_to_breadcrumbs "Feature Flags", project_feature_flags_path(@project) - add_to_breadcrumbs "Feature Flags", project_feature_flags_path(@project)
- breadcrumb_title @feature_flag.name - breadcrumb_title @feature_flag.name
- page_title @feature_flag.name - page_title s_('FeatureFlags|Edit Feature Flag')
%h3.page-title %h3.page-title
= @feature_flag.name = s_('FeatureFlags|Edit %{feature_flag_name}') % { feature_flag_name: @feature_flag.name }
%hr.clearfix %hr.clearfix
%div %div
= form_for [@project, @feature_flag], url: project_feature_flag_path(@project, @feature_flag), html: { class: 'fieldset-form' } do |f| = form_for [@project, @feature_flag], url: project_feature_flag_path(@project, @feature_flag), html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f } = render 'form', { f: f }
.form-actions
= f.submit 'Save Changes', class: "btn btn-save"
- add_to_breadcrumbs "Feature Flags", project_feature_flags_path(@project) - add_to_breadcrumbs "Feature Flags", project_feature_flags_path(@project)
- page_title 'New Feature Flags' - breadcrumb_title s_('FeatureFlags|New')
- page_title s_('FeatureFlags|New Feature Flag')
%h3.page-title %h3.page-title
New Feature Flags = s_('FeatureFlags|New Feature Flag')
%hr.clearfix %hr.clearfix
%div %div
= form_for [@project, @feature_flag], url: project_feature_flags_path(@project), html: { class: 'fieldset-form' } do |f| = form_for [@project, @feature_flag], url: project_feature_flags_path(@project), html: { class: 'fieldset-form' } do |f|
= render 'form', { f: f } = render 'form', { f: f }
.form-actions
= f.submit 'Create New Feature Flag', class: "btn btn-save"
.float-right
= link_to _('Cancel'), project_feature_flags_path(@project), class: 'btn btn-cancel'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment