first upload all files

This commit is contained in:
NW
2023-06-11 13:14:03 +01:00
parent f14dbc52b5
commit c08b36d1b6
1705 changed files with 106852 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<script type="text/html" id="option-select-template">
<div class="option-select <% if (optionId === undefined) { %> m-b-15 <% } %>">
<div class="table-responsive">
<table class="options table table-bordered table-striped">
<thead>
<tr>
<th></th>
<th>{{ trans('option::attributes.label') }}</th>
<th>{{ trans('option::attributes.price') }}</th>
<th>{{ trans('option::attributes.price_type') }}</th>
<th></th>
</tr>
</thead>
<tbody
<% if (optionId === undefined) { %>
id="select-values"
<% } else { %>
id="option-<%- optionId %>-select-values"
<% } %>
>
{{-- Custom option dropdown rows will be added here dynamically using JS --}}
</tbody>
</table>
</div>
<button
type="button"
class="btn btn-default"
<% if (optionId === undefined) { %>
id="add-new-row"
<% } else { %>
id="option-<%- optionId %>-add-new-row"
<% } %>
>
{{ trans('option::options.form.add_new_row') }}
</button>
</div>
</script>

View File

@@ -0,0 +1,83 @@
<script type="text/html" id="option-select-values-template">
<tr class="option-row">
<td class="text-center">
<span class="drag-icon">
<i class="fa">&#xf142;</i>
<i class="fa">&#xf142;</i>
</span>
</td>
<td>
<input
type="hidden"
<% if (optionId === undefined) { %>
name="values[<%- valueId %>][id]"
id="values-<%- valueId %>-id"
<% } else { %>
name="options[<%- optionId %>][values][<%- valueId %>][id]"
id="option-<%- optionId %>-values-<%- valueId %>-id"
<% } %>
value="<%- value.id %>"
>
<input
type="text"
<% if (optionId === undefined) { %>
name="values[<%- valueId %>][label]"
id="values-<%- valueId %>-label"
<% } else { %>
name="options[<%- optionId %>][values][<%- valueId %>][label]"
id="option-<%- optionId %>-values-<%- valueId %>-label"
<% } %>
class="form-control"
value="<%- value.label %>"
>
</td>
<td>
<input
type="number"
<% if (optionId === undefined) { %>
name="values[<%- valueId %>][price]"
id="values-<%- valueId %>-price"
<% } else { %>
name="options[<%- optionId %>][values][<%- valueId %>][price]"
id="option-<%- optionId %>-values-<%- valueId %>-price"
<% } %>
class="form-control"
value="<%- _.isObject(value.price) ? value.price.amount : value.price %>"
step="0.01"
min="0"
>
</td>
<td>
<select
<% if (optionId === undefined) { %>
name="values[<%- valueId %>][price_type]"
id="values-<%- valueId %>-price_type"
<% } else { %>
name="options[<%- optionId %>][values][<%- valueId %>][price_type]"
id="option-<%- optionId %>-values-<%- valueId %>-price_type"
<% } %>
class="form-control custom-select-black"
>
<option value="fixed"
<%= value.price_type === 'fixed' ? 'selected' : '' %>
>
{{ trans('option::options.form.price_types.fixed') }}
</option>
<option value="percent"
<%= value.price_type === 'percent' ? 'selected' : '' %>
>
{{ trans('option::options.form.price_types.percent') }}
</option>
</select>
</td>
<td class="text-center">
<button type="button" class="btn btn-default delete-row" data-toggle="tooltip" title="{{ trans('option::options.form.delete_row') }}">
<i class="fa fa-trash"></i>
</button>
</td>
</td>
</script>

View File

@@ -0,0 +1,54 @@
<script type="text/html" id="option-text-template">
<div class="table-responsive option-text">
<table class="table table-bordered">
<thead>
<tr>
<th>{{ trans('option::attributes.price') }}</th>
<th>{{ trans('option::attributes.price_type') }}</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input
type="number"
<% if (optionId === undefined) { %>
name="values[0][price]"
id="values-0-price"
<% } else { %>
name="options[<%- optionId %>][values][0][price]"
id="option-<%- optionId %>-values-0-price"
<% } %>
class="form-control"
value="<%- _.isObject(value.price) ? value.price.amount : value.price %>"
>
</td>
<td>
<select
<% if (optionId === undefined) { %>
name="values[0][price_type]"
id="values-0-price-type"
<% } else { %>
name="options[<%- optionId %>][values][0][price_type]"
id="option-<%- optionId %>-values-0-price-type"
<% } %>
class="form-control custom-select-black"
>
<option value="fixed"
<%= value.price_type === 'fixed' ? 'selected' : '' %>
>
{{ trans('option::options.form.price_types.fixed') }}
</option>
<option value="percent"
<%= value.price_type === 'percent' ? 'selected' : '' %>
>
{{ trans('option::options.form.price_types.percent') }}
</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
</script>