2020-12-14 22:54:18 +08:00
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
|
|
<h4 class="modal-title" id="edit-project-modal-label">
|
|
|
|
<%= t('projects.index.modal_edit_project.modal_title', project: @project.name) %>
|
|
|
|
</h4>
|
|
|
|
</div>
|
2023-07-03 17:11:51 +08:00
|
|
|
<%= form_with model: @project, url: project_path(@project ,format: :json), method: :put, remote: true do |f| %>
|
2020-12-14 22:54:18 +08:00
|
|
|
<div class="modal-body">
|
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 sci-input-container">
|
|
|
|
<label><%= t("projects.index.modal_new_project.name") %></label>
|
|
|
|
<%= f.text_field :name, autofocus: true, placeholder: t("projects.index.modal_new_project.name_placeholder"), class: 'sci-input-field' %>
|
2021-06-27 19:22:19 +08:00
|
|
|
</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' },
|
|
|
|
checked: f.object.visible? },
|
|
|
|
:visible,
|
|
|
|
:hidden %>
|
2020-12-14 22:54:18 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-06-27 19:22:19 +08:00
|
|
|
</div>
|
|
|
|
<div class="row <%= f.object.hidden? ? 'hidden' : '' %>" id="role_select_wrapper">
|
|
|
|
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
|
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), selected: f.object.default_public_user_role_id),
|
2021-06-27 19:22:19 +08:00
|
|
|
{ label: t('user_assignment.select_default_user_role') },
|
|
|
|
class: 'form-control selectpicker'%>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-12-14 22:54:18 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
|
|
|
|
<button class="btn btn-primary" type="submit"><%=t "projects.index.modal_edit_project.submit" %></button>
|
|
|
|
</div>
|
|
|
|
<% end %>
|