2020-12-29 05:49:52 +08:00
|
|
|
<div class="modal" id="new-project-modal" tabindex="-1" role="dialog" aria-labelledby="new-project-modal-label">
|
2023-07-03 17:11:51 +08:00
|
|
|
<%= form_with model: @project, remote: true do |f| %>
|
2020-12-29 05:49:52 +08:00
|
|
|
<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">×</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">
|
2023-07-03 17:11:51 +08:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 sci-input-container">
|
2020-12-29 05:49:52 +08:00
|
|
|
<%= f.hidden_field :project_folder_id %>
|
2023-07-03 17:11:51 +08:00
|
|
|
<label><%= t('projects.index.modal_new_project.name') %></label>
|
|
|
|
<%= f.text_field :name, placeholder: t('projects.index.modal_new_project.name_placeholder'), class: 'sci-input-field' %>
|
2020-10-26 20:42:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-27 19:22:19 +08:00
|
|
|
<div class="row">
|
2023-07-03 17:11:51 +08:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 mt-4">
|
|
|
|
<div class="flex items-center gap-4 text-xs">
|
|
|
|
<div class="sci-checkbox-container">
|
|
|
|
<%= f.check_box :visibility,
|
|
|
|
{ class: 'sci-checkbox' ,data: { action: 'toggle-visibility', target: 'role_select_wrapper' } },
|
|
|
|
:visible,
|
|
|
|
:hidden %>
|
|
|
|
<span class="sci-checkbox-label"></span>
|
|
|
|
</div>
|
|
|
|
<span><%= t('projects.index.modal_new_project.visibility_html') %></span>
|
2021-06-27 19:22:19 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row hidden" id="role_select_wrapper">
|
2023-07-03 17:11:51 +08:00
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 sci-input-container mt-4">
|
2021-11-10 16:52:37 +08:00
|
|
|
<%= f.select :default_public_user_role_id,
|
2023-03-08 19:10:36 +08:00
|
|
|
options_for_select(user_roles_collection(@project), UserRole.find_by(name: I18n.t('user_roles.predefined.viewer')).id),
|
2023-07-03 17:11:51 +08:00
|
|
|
{},
|
2021-06-27 19:22:19 +08:00
|
|
|
class: 'form-control selectpicker'%>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-29 05:49:52 +08:00
|
|
|
</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" %>
|
2020-10-26 20:42:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-29 05:49:52 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|