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 @@
- @feature_flag.errors.full_messages.each do |msg|
%p= msg
- unless @feature_flag.persisted?
.form-group.row
= f.label :name, class: 'col-form-label col-sm-2' do
Name
.col-sm-10
= f.text_field :name, required: true, autocomplete: 'off', class: 'form-control', disabled: @feature_flag.persisted?
.form-group.row
= f.label :active, class: 'col-form-label col-sm-2' do
Active
.col-sm-10
= f.check_box :active
.form-group.row
= f.label :description, class: 'col-form-label col-sm-2' do
Description
.col-sm-10
= f.text_area :description, rows: 5, class: 'form-control'
%span.help-inline Write a description of your feature flag
%fieldset
.row
.form-group.col-md-4
= f.label :name, class: 'label-light', for: 'feature_flag_name' do
= s_('FeatureFlags|Name')
= f.text_field :name, class: "form-control", id: "feature_flag_name"
.row
.form-group.col-md-4
= f.label :description, class: 'label-light', for: 'feature_flag_description' do
= s_('FeatureFlags|Description')
= f.text_area :description, class: "form-control", id: "feature_flag_description", rows: 4
.row
.form-group.col-md-1
= f.label :active, class: 'label-light', for: 'feature_flag_status' do
= s_('FeatureFlags|Status')
= f.check_box :active, class: "form-control", id: "feature_flag_status", rows: 4
.form-actions
- if @feature_flag.persisted?
= 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)
- breadcrumb_title @feature_flag.name
- page_title @feature_flag.name
- page_title s_('FeatureFlags|Edit Feature Flag')
%h3.page-title
= @feature_flag.name
= s_('FeatureFlags|Edit %{feature_flag_name}') % { feature_flag_name: @feature_flag.name }
%hr.clearfix
%div
= form_for [@project, @feature_flag], url: project_feature_flag_path(@project, @feature_flag), html: { class: 'fieldset-form' } do |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)
- page_title 'New Feature Flags'
- breadcrumb_title s_('FeatureFlags|New')
- page_title s_('FeatureFlags|New Feature Flag')
%h3.page-title
New Feature Flags
= s_('FeatureFlags|New Feature Flag')
%hr.clearfix
%div
= form_for [@project, @feature_flag], url: project_feature_flags_path(@project), html: { class: 'fieldset-form' } do |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