fix(identity): align application modal with reference
This commit is contained in:
@@ -14,7 +14,8 @@ $info = is_array($snapshot['info'] ?? null) ? $snapshot['info'] : [];
|
||||
$application = is_array($snapshot['application'] ?? null) ? $snapshot['application'] : [];
|
||||
$status = (string) ($snapshot['status'] ?? '');
|
||||
$can_apply = !empty($snapshot['can_apply']);
|
||||
$auth_icon = '<i class="fa fas fa-id-badge" aria-hidden="true"></i>';
|
||||
$auth_icon = function_exists('aksrt_icon_markup') ? aksrt_icon_markup('zibsvg-user-auth') : '<i class="fa fas fa-id-badge" aria-hidden="true"></i>';
|
||||
$close_icon = function_exists('aksrt_icon_markup') ? aksrt_icon_markup('zibsvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
$config = [
|
||||
'restBase' => untrailingslashit(rest_url('aksrt/v1/identity/applications')),
|
||||
'nonce' => wp_create_nonce('wp_rest'),
|
||||
@@ -53,20 +54,35 @@ $config = [
|
||||
|
||||
<?php if ($can_apply) : ?>
|
||||
<template data-auth-modal-template>
|
||||
<div class="uc-auth-modal__dialog" role="dialog" aria-modal="true" aria-labelledby="uc-auth-modal-title">
|
||||
<div class="aksrt-modal__header uc-auth-modal__header">
|
||||
<div><span><?php echo $auth_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span><strong id="uc-auth-modal-title"><?php esc_html_e('申请身份认证', 'aksrt'); ?></strong></div>
|
||||
<button type="button" class="aksrt-modal__close" data-aksrt-modal-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><i class="fa fas fa-times" aria-hidden="true"></i></button>
|
||||
<div class="uc-auth-modal">
|
||||
<div class="modal-colorful-header colorful-bg c-blue uc-auth-modal__header">
|
||||
<button type="button" class="close uc-auth-modal__close" data-aksrt-modal-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><?php echo $close_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></button>
|
||||
<div class="colorful-make"></div>
|
||||
<div class="text-center">
|
||||
<div class="em2x"><?php echo $auth_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
<div class="mt10 em12 padding-w10" id="uc-auth-modal-title"><?php esc_html_e('申请身份认证', 'aksrt'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aksrt-modal__body uc-auth-modal__body">
|
||||
<form class="aksrt-user-auth-form uc-auth-form" data-auth-create enctype="multipart/form-data">
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('认证身份', 'aksrt'); ?></span><input class="form-control" name="name" minlength="4" maxlength="16" required placeholder="<?php esc_attr_e('请输入身份名称', 'aksrt'); ?>"></label>
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('身份简介', 'aksrt'); ?></span><textarea class="form-control" name="description" rows="2" placeholder="<?php esc_attr_e('请输入申请的身份简介', 'aksrt'); ?>"></textarea></label>
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('申请说明', 'aksrt'); ?></span><textarea class="form-control" name="message" rows="2" placeholder="<?php esc_attr_e('请输入申请缘由及说明', 'aksrt'); ?>"></textarea></label>
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('证明材料(选填)', 'aksrt'); ?></span><input class="form-control" type="file" name="evidence[]" accept="image/gif,image/jpeg,image/png" multiple></label>
|
||||
<small class="muted-2-color"><?php esc_html_e('最多上传 3 张图片,单张不超过 2MB。材料仅本人和认证审核管理员可查看。', 'aksrt'); ?></small>
|
||||
<button type="submit" class="btn-primary uc-auth-submit"><?php esc_html_e('确认提交', 'aksrt'); ?></button>
|
||||
<div class="uc-auth-form__message" data-auth-message role="status"></div>
|
||||
<div class="uc-auth-modal__body">
|
||||
<form class="auth-apply-from form-upload uc-auth-form" data-auth-create enctype="multipart/form-data" novalidate>
|
||||
<div class="uc-auth-form__scroll mini-scrollbar scroll-y max-vh5" style="padding: 0 3px;">
|
||||
<?php if (!empty($settings['desc'])) : ?><div class="muted-color mb20"><?php echo nl2br(esc_html((string) $settings['desc'])); ?></div><?php endif; ?>
|
||||
<label class="uc-auth-field mb20"><span class="uc-auth-field__label"><?php esc_html_e('认证身份', 'aksrt'); ?></span><input class="form-control" name="name" minlength="4" maxlength="16" required placeholder="<?php esc_attr_e('请输入身份名称', 'aksrt'); ?>"></label>
|
||||
<label class="uc-auth-field mb20"><span class="uc-auth-field__label"><?php esc_html_e('身份简介', 'aksrt'); ?></span><textarea class="form-control" name="description" rows="2" placeholder="<?php esc_attr_e('请输入申请的身份简介', 'aksrt'); ?>"></textarea></label>
|
||||
<label class="uc-auth-field mb20"><span class="uc-auth-field__label"><?php esc_html_e('申请说明', 'aksrt'); ?></span><textarea class="form-control" name="message" rows="2" placeholder="<?php esc_attr_e('请输入申请缘由及说明', 'aksrt'); ?>"></textarea></label>
|
||||
<div class="form-upload mb10 uc-auth-upload">
|
||||
<div class="em09 muted-2-color mb6"><?php esc_html_e('证明材料', 'aksrt'); ?></div>
|
||||
<div class="preview" data-auth-preview>
|
||||
<button type="button" class="add" data-auth-file-picker aria-label="<?php esc_attr_e('选择证明材料图片', 'aksrt'); ?>"></button>
|
||||
</div>
|
||||
<input class="hide" type="file" data-auth-evidence accept="image/gif,image/jpeg,image/png" multiple>
|
||||
<div class="muted-2-color em09 mt6"><?php esc_html_e('最多上传 3 张图片,单张不超过 2MB。材料仅本人和认证审核管理员可查看。', 'aksrt'); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="but-average modal-buts uc-auth-modal__footer">
|
||||
<button type="button" class="but" data-aksrt-modal-close><?php esc_html_e('取消', 'aksrt'); ?></button>
|
||||
<button type="submit" class="but c-blue"><i class="fa fa-check mr6" aria-hidden="true"></i><?php esc_html_e('确认提交', 'aksrt'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user