2019-03-16 03:59:15 +08:00
|
|
|
<div class="modal"
|
|
|
|
id="new-office-file-modal"
|
|
|
|
role="dialog"
|
2022-06-07 21:14:00 +08:00
|
|
|
tabindex="-1"
|
2019-03-16 03:59:15 +08:00
|
|
|
aria-labelledby="new-office-file-modal-label">
|
2023-07-03 17:11:51 +08:00
|
|
|
<%= form_with url: create_wopi_file_path(),
|
|
|
|
html: { novalidate: "novalidate" },
|
2023-08-09 21:47:33 +08:00
|
|
|
method: :post, data: { remote: true } do |f| %>
|
2019-03-16 03:59:15 +08:00
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
2019-03-20 03:41:16 +08:00
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
2023-08-17 19:55:17 +08:00
|
|
|
<i class="sn-icon sn-icon-close"></i>
|
2019-03-20 03:41:16 +08:00
|
|
|
</button>
|
|
|
|
|
2019-03-16 03:59:15 +08:00
|
|
|
<h4 class="modal-title" id="new-office-file-modal-label">
|
|
|
|
<%= t('assets.create_wopi_file.modal_title') %>
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<%# Will be filled by the create_file button %>
|
|
|
|
<%= hidden_field_tag :element_id, '' %>
|
|
|
|
<%= hidden_field_tag :element_type, '' %>
|
|
|
|
|
2022-05-24 17:13:47 +08:00
|
|
|
<div class="form-group">
|
|
|
|
<label class="control-label" for="new-wopi-file-name"><%= t('assets.create_wopi_file.text_field_label') %></label>
|
|
|
|
<input autofocus="autofocus" required="required" placeholder="<%= t('assets.create_wopi_file.text_field_placeholder') %>" id="new-wopi-file-name" class="form-control" name="file_name" type="text">
|
|
|
|
<div class="input-error-message"><%= t('general.text.not_blank') %></div>
|
|
|
|
</div>
|
|
|
|
<label><%= t('assets.create_wopi_file.type_select_label') %></label>
|
2019-03-18 02:23:17 +08:00
|
|
|
<div class="btn-group btn-group-toggle btn-group-justified"
|
|
|
|
data-toggle="buttons">
|
2023-06-19 21:45:22 +08:00
|
|
|
<label class="btn btn-secondary active" id="word-btn">
|
2019-03-20 04:52:26 +08:00
|
|
|
<%= image_tag 'office/ms-word-active.svg', class: 'act' %>
|
|
|
|
<%= image_tag 'office/ms-word-inactive.svg', class: 'inactive' %>
|
2019-03-20 03:41:16 +08:00
|
|
|
<input type="radio" name="file_type" value='docx' checked>
|
|
|
|
<span><%= t('assets.create_wopi_file.ms_word').html_safe %></span>
|
2019-03-18 02:23:17 +08:00
|
|
|
</label>
|
2023-06-19 21:45:22 +08:00
|
|
|
<label class="btn btn-secondary" id="excel-btn">
|
2019-03-20 04:52:26 +08:00
|
|
|
<%= image_tag 'office/ms-excel-active.svg', class: 'act' %>
|
|
|
|
<%= image_tag 'office/ms-excel-inactive.svg', class: 'inactive' %>
|
2019-03-20 03:41:16 +08:00
|
|
|
<input type="radio" name="file_type" value='xlsx'>
|
|
|
|
<span><%= t('assets.create_wopi_file.ms_excel').html_safe %></span>
|
2019-03-18 02:23:17 +08:00
|
|
|
</label>
|
2023-06-19 21:45:22 +08:00
|
|
|
<label class="btn btn-secondary" id='powerpoint-btn'>
|
2019-03-20 04:52:26 +08:00
|
|
|
<%= image_tag 'office/ms-pwrpt-active.svg', class: 'act' %>
|
|
|
|
<%= image_tag 'office/ms-pwrpt-inactive.svg', class: 'inactive' %>
|
2019-03-20 03:41:16 +08:00
|
|
|
<input type="radio" name="file_type" value='pptx'>
|
|
|
|
<span><%= t('assets.create_wopi_file.ms_powerpoint').html_safe %></span>
|
2019-03-18 02:23:17 +08:00
|
|
|
</label>
|
|
|
|
</div>
|
2019-03-16 03:59:15 +08:00
|
|
|
|
2019-03-18 02:23:17 +08:00
|
|
|
<div class='form-group' id='other-wopi-errors'>
|
|
|
|
</div>
|
2019-03-16 03:59:15 +08:00
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2019-03-20 03:41:16 +08:00
|
|
|
<div class='col-md-4'></div>
|
|
|
|
<div class='col-md-4' id='submit-btn-cont'>
|
|
|
|
<%= f.submit t('assets.create_wopi_file.create_document_button'),
|
2020-01-31 21:11:37 +08:00
|
|
|
class: 'btn btn-primary' %>
|
2019-03-20 03:41:16 +08:00
|
|
|
</div>
|
2019-03-16 03:59:15 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|