进行了一些小修复
This commit is contained in:
1 parent
7c0c21e984
commit
ee4e599f2d
13 files changed
+496
-75
No files matched your search
@@ -54,10 +54,18 @@ if (file_exists($css)) {
|
||||
}
|
||||
$js = get_template_directory() . '/assets/js/front-submit.js';
|
||||
if (file_exists($js)) {
|
||||
$pay_download_js = get_template_directory() . '/assets/js/front-submit-pay-download.js';
|
||||
wp_enqueue_script(
|
||||
'aksrt-front-submit-pay-download',
|
||||
get_template_directory_uri() . '/assets/js/front-submit-pay-download.js',
|
||||
[],
|
||||
(string) filemtime($pay_download_js),
|
||||
true
|
||||
);
|
||||
wp_enqueue_script(
|
||||
'aksrt-front-submit',
|
||||
get_template_directory_uri() . '/assets/js/front-submit.js',
|
||||
['aksrt-runtime'],
|
||||
['aksrt-runtime', 'aksrt-front-submit-pay-download'],
|
||||
(string) filemtime($js),
|
||||
true
|
||||
);
|
||||
@@ -180,6 +188,24 @@ if (file_exists($js)) {
|
||||
'loginVisible' => __('登录可见', 'aksrt'),
|
||||
'vipVisible' => __('VIP 可见', 'aksrt'),
|
||||
'payVisible' => __('付费可见', 'aksrt'),
|
||||
'addResource' => __('添加资源', 'aksrt'),
|
||||
'editResource' => __('编辑资源', 'aksrt'),
|
||||
'downloadUrl' => __('下载地址', 'aksrt'),
|
||||
'enterDownloadUrl' => __('请输入资源下载地址', 'aksrt'),
|
||||
'pasteLinkHint' => __('支持直接粘贴网盘分享链接,并自动识别提取码', 'aksrt'),
|
||||
'resourceNote' => __('资源备注', 'aksrt'),
|
||||
'enterResourceNote' => __('请输入资源备注', 'aksrt'),
|
||||
'resourceNoteHint' => __('例如提取码、解压密码等', 'aksrt'),
|
||||
'clickCopy' => __('点击复制', 'aksrt'),
|
||||
'copyName' => __('复制名称', 'aksrt'),
|
||||
'copyContent' => __('复制内容', 'aksrt'),
|
||||
'copyHint' => __('填写后,用户可点击资源备注复制内容', 'aksrt'),
|
||||
'customButton' => __('自定义按钮', 'aksrt'),
|
||||
'customButtonPlaceholder' => __('自定义下载按钮名称', 'aksrt'),
|
||||
'selectButtonStyle' => __('选择按钮样式', 'aksrt'),
|
||||
'extractCode' => __('提取码', 'aksrt'),
|
||||
'extractCodeColon' => __('提取码:', 'aksrt'),
|
||||
'confirm' => __('确认', 'aksrt'),
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -62,22 +62,21 @@ if (!function_exists('aksrt_submit_pay_line')) {
|
||||
<div class="mt10 pay-dawnload-edit" data-pay-downloads>
|
||||
<div class="flex ac jsb padding-h10">
|
||||
<b><?php esc_html_e('付费下载', 'aksrt'); ?></b>
|
||||
<div>
|
||||
<button type="button" class="pay-dawnload-add but hollow p2-10 px12 c-blue" data-pay-download-add><i class="fa fas fa-plus mr3"></i><?php esc_html_e('添加资源', 'aksrt'); ?></button>
|
||||
<?php if (!empty($ctx['can_upload_file'])) : ?><button type="button" class="but hollow p2-10 px12" data-pay-download-upload><i class="fa fas fa-upload mr3"></i><?php esc_html_e('上传附件', 'aksrt'); ?></button><?php endif; ?>
|
||||
</div>
|
||||
<button type="button" class="pay-dawnload-add but hollow p2-10 px12 c-blue" data-pay-download-add><i class="fa fas fa-plus mr3"></i><?php esc_html_e('添加资源', 'aksrt'); ?></button>
|
||||
</div>
|
||||
<div class="mt10 px12 lists-box" data-pay-download-list>
|
||||
<?php foreach ($downloads as $index => $row) : ?>
|
||||
<div class="flex ac jsb lists-item" data-pay-download-item>
|
||||
<input class="form-control flex1" type="url" data-pay-download-url name="aksrt_pay[downloads][<?php echo (int) $index; ?>][url]" value="<?php echo esc_attr((string) ($row['url'] ?? '')); ?>" placeholder="<?php esc_attr_e('资源链接', 'aksrt'); ?>">
|
||||
<input class="form-control" type="text" data-pay-download-label name="aksrt_pay[downloads][<?php echo (int) $index; ?>][label]" value="<?php echo esc_attr((string) ($row['label'] ?? '')); ?>" placeholder="<?php esc_attr_e('名称', 'aksrt'); ?>">
|
||||
<input class="form-control" type="text" name="aksrt_pay[downloads][<?php echo (int) $index; ?>][extract_code]" value="<?php echo esc_attr((string) ($row['extract_code'] ?? '')); ?>" placeholder="<?php esc_attr_e('提取码/备注', 'aksrt'); ?>">
|
||||
<button type="button" class="but cir c-red" data-pay-download-remove><i class="fa fas fa-trash"></i></button>
|
||||
<button type="button" class="flex1 name-link pay-dawnload-add-edit" data-pay-download-edit><?php echo esc_html((string) ($row['url'] ?? '')); ?></button>
|
||||
<button type="button" class="pay-dawnload-add-delete em12 ml10 hollow but cir c-red" data-pay-download-remove aria-label="<?php esc_attr_e('删除资源', 'aksrt'); ?>"><i class="fa far fa-trash-alt" aria-hidden="true"></i></button>
|
||||
<div class="hidden-input">
|
||||
<?php foreach (['url', 'extract_code', 'copy_key', 'copy_val', 'label', 'class'] as $field) : ?>
|
||||
<input type="hidden" name="aksrt_pay[downloads][<?php echo (int) $index; ?>][<?php echo esc_attr($field); ?>]" data-pay-download-field="<?php echo esc_attr($field); ?>" value="<?php echo esc_attr((string) ($row[$field] ?? '')); ?>">
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<template data-pay-download-tpl><div class="flex ac jsb lists-item" data-pay-download-item><input class="form-control flex1" type="url" data-name="url" data-pay-download-url placeholder="<?php esc_attr_e('资源链接', 'aksrt'); ?>"><input class="form-control" type="text" data-name="label" data-pay-download-label placeholder="<?php esc_attr_e('名称', 'aksrt'); ?>"><input class="form-control" type="text" data-name="extract_code" placeholder="<?php esc_attr_e('提取码/备注', 'aksrt'); ?>"><button type="button" class="but cir c-red" data-pay-download-remove><i class="fa fas fa-trash"></i></button></div></template>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Reference in new issue
Block a user