scinote-web/app/views/projects/index/modals/_new_project.html.erb
artoscinote 0eacb91bed
Renamed 'group_user_role', fixed public project migration [SCI-6234] (#3642)
* Renamed 'group_user_role', fixed public project migration [SCI-6234]

* Moved public project update inside loop [SCI-6234]
2021-11-10 09:52:37 +01:00

41 lines
2.1 KiB
Text

<div class="modal" id="new-project-modal" tabindex="-1" role="dialog" aria-labelledby="new-project-modal-label">
<%= bootstrap_form_for @project, remote: true do |f| %>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="<%= t('general.close') %>"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="new-project-modal-label"><%= t('projects.index.modal_new_project.modal_title') %></h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<%= f.hidden_field :project_folder_id %>
<%= f.text_field :name, label: t('projects.index.modal_new_project.name'), placeholder: t('projects.index.modal_new_project.name_placeholder') %>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<div class="checkbox">
<%= f.check_box :visibility,
{ label: t('projects.index.modal_new_project.visibility_html'), data: { action: 'toggle-visibility', target: 'role_select_wrapper' } },
:visible,
:hidden %>
</div>
</div>
</div>
<div class="row hidden" id="role_select_wrapper">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<%= f.select :default_public_user_role_id,
options_for_select(user_roles_collection, UserRole.find_by(name: I18n.t('user_roles.predefined.viewer')).id),
class: 'form-control selectpicker'%>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%= t('general.cancel') %></button>
<%= f.button t('projects.index.modal_new_project.create'), class: "btn btn-primary" %>
</div>
</div>
</div>
<% end %>
</div>