2019-03-16 03:59:15 +08:00
|
|
|
<div class="modal"
|
|
|
|
id="new-office-file-modal"
|
|
|
|
role="dialog"
|
|
|
|
aria-labelledby="new-office-file-modal-label">
|
|
|
|
<%= bootstrap_form_tag url: create_wopi_file_path(),
|
|
|
|
method: :post, remote: true do |f| %>
|
|
|
|
<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">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</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, '' %>
|
|
|
|
|
2019-03-18 02:23:17 +08:00
|
|
|
<%= f.text_field :file_name,
|
2019-03-16 03:59:15 +08:00
|
|
|
label: t('assets.create_wopi_file.text_field_label'),
|
|
|
|
autofocus: true,
|
|
|
|
placeholder: t('assets.create_wopi_file.text_field_placeholder'),
|
|
|
|
id: 'new-wopi-file-name'%>
|
|
|
|
|
2019-03-18 02:23:17 +08:00
|
|
|
<div class="btn-group btn-group-toggle btn-group-justified"
|
|
|
|
data-toggle="buttons">
|
2019-03-20 03:41:16 +08:00
|
|
|
<label class="btn btn-default 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>
|
2019-03-20 03:41:16 +08:00
|
|
|
<label class="btn btn-default" 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>
|
2019-03-20 03:41:16 +08:00
|
|
|
<label class="btn btn-default" 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>
|