scinote-web/app/views/assets/wopi/_create_wopi_file_modal.html.erb

67 lines
3.2 KiB
Text
Raw Normal View History

2019-03-16 03:59:15 +08:00
<div class="modal"
id="new-office-file-modal"
role="dialog"
tabindex="-1"
2019-03-16 03:59:15 +08:00
aria-labelledby="new-office-file-modal-label">
<%= bootstrap_form_tag url: create_wopi_file_path(),
html: { novalidate: "novalidate" },
2019-03-16 03:59:15 +08:00
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">&times;</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, '' %>
<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">
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>