mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 14:15:35 +08:00
adds missing labels [fixes SCI-2219]
This commit is contained in:
parent
baf69461f5
commit
9e1f285c9e
3 changed files with 24 additions and 14 deletions
|
@ -145,8 +145,10 @@
|
||||||
trimValue: true
|
trimValue: true
|
||||||
});
|
});
|
||||||
$('.bootstrap-tagsinput').show();
|
$('.bootstrap-tagsinput').show();
|
||||||
|
$('[data-role="tagsimput-label"]').show();
|
||||||
} else {
|
} else {
|
||||||
$('.bootstrap-tagsinput').hide();
|
$('.bootstrap-tagsinput').hide();
|
||||||
|
$('[data-role="tagsimput-label"]').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,32 +23,34 @@
|
||||||
data: { role: "manage-repository-column-form" } do |f| %>
|
data: { role: "manage-repository-column-form" } do |f| %>
|
||||||
<%= hidden_field_tag :list_items %>
|
<%= hidden_field_tag :list_items %>
|
||||||
<%= f.text_field :name %>
|
<%= f.text_field :name %>
|
||||||
<%= f.form_group :data_type, label: { text: 'Column type' } do %>
|
<%= f.form_group :data_type, label: { text: t('libraries.manange_modal_column.colum_type') } do %>
|
||||||
<br />
|
<br />
|
||||||
<%= f.radio_button :data_type,
|
<%= f.radio_button :data_type,
|
||||||
'RepositoryTextValue',
|
'RepositoryTextValue'.freeze,
|
||||||
label: 'Text',
|
label: t('libraries.manange_modal_column.labels.text'),
|
||||||
inline: true,
|
inline: true,
|
||||||
checked: checked?(@repository_column, 'RepositoryTextValue'),
|
checked: checked?(@repository_column, 'RepositoryTextValue'.freeze),
|
||||||
disabled: disabled?(@repository_column, 'RepositoryTextValue') %>
|
disabled: disabled?(@repository_column, 'RepositoryTextValue'.freeze) %>
|
||||||
<%= f.radio_button :data_type,
|
<%= f.radio_button :data_type,
|
||||||
'RepositoryFileValue',
|
'RepositoryFileValue'.freeze,
|
||||||
label: 'File',
|
label: t('libraries.manange_modal_column.labels.file'),
|
||||||
inline: true,
|
inline: true,
|
||||||
checked: checked?(@repository_column, 'RepositoryFileValue'),
|
checked: checked?(@repository_column, 'RepositoryFileValue'.freeze),
|
||||||
disabled: disabled?(@repository_column, 'RepositoryFileValue') %>
|
disabled: disabled?(@repository_column, 'RepositoryFileValue'.freeze) %>
|
||||||
<%= f.radio_button :data_type,
|
<%= f.radio_button :data_type,
|
||||||
'RepositoryListValue',
|
'RepositoryListValue'.freeze,
|
||||||
label: 'Dropdown',
|
label: t('libraries.manange_modal_column.labels.dropdown'),
|
||||||
inline: true,
|
inline: true,
|
||||||
checked: checked?(@repository_column, 'RepositoryListValue'),
|
checked: checked?(@repository_column, 'RepositoryListValue'.freeze),
|
||||||
disabled: disabled?(@repository_column, 'RepositoryListValue') %>
|
disabled: disabled?(@repository_column, 'RepositoryListValue'.freeze) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<input class="form-control"
|
<input class="form-control"
|
||||||
data-role="tagsinput"
|
data-role="tagsinput"
|
||||||
style="display: none"
|
style="display: none"
|
||||||
data-value="<%= @repository_column.repository_list_items.pluck(:data) %>"
|
data-value="<%= @repository_column.repository_list_items.pluck(:data) %>"
|
||||||
/>
|
/>
|
||||||
|
<br />
|
||||||
|
<span style="display: none" data-role="tagsimput-label"><%=t 'libraries.manange_modal_column.dropdown_item_descirption' %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -57,4 +59,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>repository_repository_column
|
</div>
|
||||||
|
|
|
@ -987,6 +987,12 @@ en:
|
||||||
|
|
||||||
libraries:
|
libraries:
|
||||||
manange_modal_column:
|
manange_modal_column:
|
||||||
|
colum_type: "Column type"
|
||||||
|
dropdown_item_descirption: "Dropdown items should be separated by comma."
|
||||||
|
labels:
|
||||||
|
text: "Text"
|
||||||
|
file: "File"
|
||||||
|
dropdown: "Dropdown"
|
||||||
new:
|
new:
|
||||||
title: "Add New Column"
|
title: "Add New Column"
|
||||||
edit:
|
edit:
|
||||||
|
|
Loading…
Add table
Reference in a new issue