debian-mirror-gitlab/app/views/ci/variables/_variable_row.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
2.3 KiB
Text
Raw Normal View History

2018-03-17 18:26:18 +05:30
- form_field = local_assigns.fetch(:form_field, nil)
- variable = local_assigns.fetch(:variable, nil)
- id = variable&.id
2019-07-31 22:56:46 +05:30
- variable_type = variable&.variable_type
2018-03-17 18:26:18 +05:30
- key = variable&.key
- value = variable&.value
- id_input_name = "#{form_field}[variables_attributes][][id]"
- destroy_input_name = "#{form_field}[variables_attributes][][_destroy]"
2019-07-31 22:56:46 +05:30
- variable_type_input_name = "#{form_field}[variables_attributes][][variable_type]"
2018-03-17 18:26:18 +05:30
- key_input_name = "#{form_field}[variables_attributes][][key]"
2018-05-09 12:01:36 +05:30
- value_input_name = "#{form_field}[variables_attributes][][secret_value]"
2018-03-17 18:26:18 +05:30
%li.js-row.ci-variable-row{ data: { is_persisted: "#{!id.nil?}" } }
2019-07-31 22:56:46 +05:30
.ci-variable-row-body.border-bottom
2018-03-17 18:26:18 +05:30
%input.js-ci-variable-input-id{ type: "hidden", name: id_input_name, value: id }
%input.js-ci-variable-input-destroy{ type: "hidden", name: destroy_input_name }
2019-07-31 22:56:46 +05:30
%select.js-ci-variable-input-variable-type.ci-variable-body-item.form-control.select-control.custom-select.table-section.section-15{ name: variable_type_input_name }
= options_for_select(ci_variable_type_options, variable_type)
2021-04-29 21:17:54 +05:30
%input.js-ci-variable-input-key.ci-variable-body-item.qa-ci-variable-input-key.form-control.gl-form-input.table-section.section-15{ type: "text",
2018-03-17 18:26:18 +05:30
name: key_input_name,
value: key,
placeholder: s_('CiVariables|Input variable key') }
2019-07-31 22:56:46 +05:30
.ci-variable-body-item.gl-show-field-errors.table-section.section-15.border-top-0.p-0
2019-12-21 20:55:43 +05:30
.form-control.js-secret-value-placeholder.qa-ci-variable-input-value.overflow-hidden{ class: ('hide' unless id) }
2019-07-31 22:56:46 +05:30
= '*' * 17
2021-04-29 21:17:54 +05:30
%textarea.js-ci-variable-input-value.js-secret-value.qa-ci-variable-input-value.form-control.gl-form-input{ class: ('hide' if id),
2018-03-17 18:26:18 +05:30
rows: 1,
name: value_input_name,
placeholder: s_('CiVariables|Input variable value') }
= value
2019-07-31 22:56:46 +05:30
%p.masking-validation-error.gl-field-error.hide
= s_("CiVariables|Cannot use Masked Variable with current value")
2021-09-30 23:02:18 +05:30
= link_to sprite_icon('question-o'), help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer'
2021-04-29 21:17:54 +05:30
%button.gl-button.btn.btn-default.btn-icon.js-row-remove-button.ci-variable-row-remove-button.table-section{ type: 'button', 'aria-label': s_('CiVariables|Remove variable row') }
2020-10-24 23:57:45 +05:30
= sprite_icon('close')