<?php /*a:1:{s:65:"D:\phpstudy\WWW\12xz\app\admin\view/default\article\saveinfo.html";i:1785762731;}*/ ?>
<?php echo ModuleInclude('public/header'); ?>

<!-- right content start  -->
<div class="content-right">
	<div class="content">
        <!-- nav start -->
        <?php if(!isset($is_theme_data_admin) or $is_theme_data_admin == 0): ?>
            <?php echo ModuleInclude('public/admin_nav', [
                'title'     => MyLang('article.base_nav_title').(empty($data['id']) ? MyLang('created_title') : MyLang('edit_title')),
                'back_url'  => MyUrl('admin/article/index', $params)
            ]); ?>
        <?php endif; ?>
        <!-- nav end -->

        <!-- form start -->
        <form class="am-form form-validation am-form-full-screen am-form-popup-sticky" action="<?php echo MyUrl('admin/article/save'); ?>" method="POST" request-type="<?php if(!isset($is_theme_data_admin) or $is_theme_data_admin == 0): ?>ajax-url<?php else: ?>ajax-reload<?php endif; ?>" request-value="<?php if(!isset($is_theme_data_admin) or $is_theme_data_admin == 0): ?><?php echo MyUrl('admin/article/index', $params); else: ?>parent<?php endif; ?>">
            <div class="am-form-group">
                <label><?php echo MyLang('common_service.article.form_item_title'); ?><span class="am-form-group-label-tips-must">*</span></label>
                <div class="am-input-group am-input-group-sm am-flex am-gap-1-half am-flex-items-center">
                    <input type="text" name="title" placeholder="<?php echo MyLang('common_service.article.form_item_title_message'); ?>" minlength="2" maxlength="60" data-validation-message="<?php echo MyLang('common_service.article.form_item_title_message'); ?>" class="am-form-field am-radius" <?php if(!empty($data['title'])): ?> value="<?php echo htmlentities((string) $data['title']); ?>" <?php endif; if(!empty($data['title_color'])): ?> style="color:<?php echo htmlentities((string) $data['title_color']); ?>;" <?php endif; ?> required />
                    <div class="colorpicker-container colorpicker-simple">
                        <input type="hidden" name="title_color" value="<?php if(!empty($data['title_color'])): ?><?php echo htmlentities((string) $data['title_color']); ?><?php endif; ?>" />
                        <div class="colorpicker-submit" data-color="<?php if(!empty($data['title_color'])): ?><?php echo htmlentities((string) $data['title_color']); ?><?php endif; ?>" data-input-tag="input[name='title']" data-color-tag="input[name='title_color']"></div>
                        <img class="imitate-colorpicker-submit" src="<?php echo StaticAttachmentUrl('colorpicker.png'); ?>" width="24" height="24" />
                    </div>
                </div>
            </div>
            <div class="am-form-group">
                <label><?php echo MyLang('common_service.article.form_item_article_category'); ?><span class="am-form-group-label-tips-must">*</span></label>
                <select name="article_category_id" class="am-radius chosen-select" data-placeholder="<?php echo MyLang('optional_tips'); ?>" data-validation-message="<?php echo MyLang('common_service.article.form_item_article_category_message'); ?>" required>
                    <option value=""><?php echo MyLang('optional_tips'); ?></option>
                    <?php foreach($article_category_list as $v): ?>
                        <option value="<?php echo htmlentities((string) $v['id']); ?>" <?php if(isset($data['article_category_id']) and $data['article_category_id'] == $v['id']): ?>selected<?php endif; ?>><?php echo htmlentities((string) $v['name']); ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
            <div class="am-form-group">
                <label>文章语言<span class="am-form-group-label-tips-must">*</span></label>
                <select name="lang_name" class="am-radius chosen-select" data-placeholder="请选择..." data-validation-message="请选择语言分类" required>
                    <option value="">请选择...</option>
                    <option value="zh" <?php if(!empty($data['lang_name']) and $data['lang_name'] == 'zh'): ?>selected<?php endif; ?>>中文</option>
                    <option value="en" <?php if(!empty($data['lang_name']) and $data['lang_name'] == 'en'): ?>selected<?php endif; ?>>英文</option>
                    <option value="hi" <?php if(!empty($data['lang_name']) and $data['lang_name'] == 'hi'): ?>selected<?php endif; ?>>印地语</option>
                    <option value="spa" <?php if(!empty($data['lang_name']) and $data['lang_name'] == 'spa'): ?>selected<?php endif; ?>>西班牙语</option>
                </select>
            </div>
            <div class="am-form-group">
                <label><?php echo MyLang('common_service.article.form_item_jump_url_title'); ?><a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '<?php echo MyLang('common_service.article.form_item_jump_url_tips'); ?>', trigger: 'hover focus', theme: 'sm'}"></a></label>
                <input type="url" name="jump_url" placeholder="<?php echo MyLang('common_service.article.form_item_jump_url_title'); ?>" data-validation-message="<?php echo MyLang('common_service.article.form_item_jump_url_message'); ?>" class="am-radius" <?php if(!empty($data['jump_url'])): ?> value="<?php echo htmlentities((string) $data['jump_url']); ?>"<?php endif; ?> />
            </div>
            <div class="am-form-group am-form-file">
                <label class="am-block"><?php echo MyLang('common_service.article.form_item_cover'); ?><a href="javascript:;" class="am-icon-question-circle am-margin-left-xs" data-am-popover="{content: '<?php echo MyLang('common_service.article.form_item_cover_tips'); ?>', trigger: 'hover focus', theme: 'sm'}"></a></label>
                <div class="am-form-file-upload-container">
                    <ul class="plug-file-upload-view article-cover-view" data-form-name="cover" data-max-number="1" data-dialog-type="images" data-is-eye="1">
                        <li class="plug-file-upload-submit" data-view-tag="ul.article-cover-view">
                            <?php if(empty($data['cover'])): ?>
                                <i class="iconfont icon-add"></i>
                            <?php else: ?>
                                <input type="text" name="cover" value="<?php echo htmlentities((string) $data['cover']); ?>" />
                                <img src="<?php echo htmlentities((string) $data['cover']); ?>" />
                                <i class="iconfont icon-close"></i>
                                <i class="iconfont icon-eye"></i>
                            <?php endif; ?>
                        </li>
                    </ul>
                </div>
            </div>

            <?php echo ModuleInclude('lib/is_enable'); ?>

            <div class="am-form-group">
                <label class="am-block"><?php echo MyLang('common_service.article.form_item_is_home_recommended_title'); ?></label>
                <input name="is_home_recommended" value="1" type="checkbox" data-off-text="<?php echo MyLang('no_title'); ?>" data-on-text="<?php echo MyLang('yes_title'); ?>" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <?php if(isset($data['is_home_recommended']) and $data['is_home_recommended'] == 1): ?>checked="true"<?php endif; ?> />
            </div>

            <div class="am-form-group">
                <label><?php echo MyLang('common_service.article.form_item_describe'); ?></label>
                <textarea class="am-radius" name="describe" rows="4" maxlength="230" placeholder="<?php echo MyLang('common_service.article.form_item_describe_message'); ?>" data-validation-message="<?php echo MyLang('common_service.article.form_item_describe_message'); ?>"><?php if(!empty($data['describe'])): ?><?php echo htmlentities((string) $data['describe']); ?><?php endif; ?></textarea>
            </div>

            <div class="am-form-group">
                <label><?php echo MyLang('common_service.article.form_item_content_title'); ?><span class="am-form-group-label-tips-must">*</span></label>
                <textarea class="am-radius am-validate" name="content" rows="5" minlength="10" <?php if(!IsMobile()): ?>id="editor-tag" data-url="<?php echo MyUrl('admin/ueditor/index', ['path_type'=>'article']); ?>" placeholder="<?php echo MyLang('common_service.article.form_item_content_message'); ?>" <?php else: ?> placeholder="<?php echo MyLang('common_service.article.form_item_content_placeholder'); ?>" <?php endif; ?> data-validation-message="<?php echo MyLang('common_service.article.form_item_content_message'); ?>" required><?php if(!empty($data['content'])): ?><?php echo htmlentities((string) $data['content']); ?><?php endif; ?></textarea>
            </div>

            <!-- 插件扩展数据 start -->
            <?php if(isset($shopxo_is_develop) and $shopxo_is_develop == true): ?>
                <div class="plugins-tag">
                    <span>plugins_view_admin_article_save</span>
                </div>
            <?php endif; if(!empty($plugins_view_admin_article_save_data) and is_array($plugins_view_admin_article_save_data)): ?>
                <div class="card-grey am-margin-bottom-lg">
                    <label class="am-text-sm am-text-warning"><?php echo MyLang('plugins_view_region_config_tips'); ?></label>
                    <div>
                        <?php foreach($plugins_view_admin_article_save_data as $hook): if(is_string($hook) or is_int($hook)): ?>
                                <?php echo $hook; ?>
                            <?php endif; ?>
                        <?php endforeach; ?>
                    </div>
                </div>
            <?php endif; ?>
            <!-- 插件扩展数据 end -->

            <?php echo ModuleInclude('lib/seo', empty($data) ? [] : $data, ['is_share_images'=>1]); ?>

            <div class="am-form-popup-submit">
                <input type="hidden" name="id" <?php if(!empty($data)): ?> value="<?php echo htmlentities((string) $data['id']); ?>"<?php endif; ?> />
                <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'<?php echo MyLang('save_title'); ?>'}">
                    <i class="am-icon-save"></i>
                    <span><?php echo MyLang('save_title'); ?></span>
                </button>
            </div>
        </form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
<?php echo ModuleInclude('public/footer'); ?>