1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- {if $class_count <20}
- <div class="eject_con">
- <div id="warning" class="alert alert-error"></div>
- <form id="category_form" method="post" target="_parent" action="{:url('Selleralbum/album_add_save')}">
- <dl>
- <dt><i class="required">*</i>{$Think.lang.album_class_add_name}{$Think.lang.ds_colon}</dt>
- <dd>
- <input class="w300 text" type="text" name="name" id="name" value="" />
- </dd>
- </dl>
- <dl>
- <dt><i class="required">*</i>{$Think.lang.album_class_add_des}{$Think.lang.ds_colon}</dt>
- <dd>
- <textarea class="w300 textarea" rows="3" name="description" id="description"></textarea>
- </dd>
- </dl>
- <dl>
- <dt><i class="required">*</i>{$Think.lang.album_class_add_sort}{$Think.lang.ds_colon}</dt>
- <dd>
- <input class="w50 text" type="text" name="sort" id="sort" value="" />
- </dd>
- </dl>
- <div class="bottom">
- <input type="submit" class="submit" value="{$Think.lang.album_class_add_submit}" />
- </div>
- </form>
- </div>
- {else/}
- <div class="warning-option"><i class="iconfont"> </i><span>{$Think.lang.album_class_add_max_20}</span></div>
- {/if}
- <script type="text/javascript">
- $(function() {
- $('#category_form').validate({
- errorLabelContainer: $('#warning'),
- invalidHandler: function(form, validator) {
- $('#warning').show();
- },
- submitHandler: function(form) {
- ds_ajaxpost('category_form')
- },
- rules: {
- name: {
- required: true,
- maxlength: 20,
- remote: {
- url: "{:url('Selleralbum/ajax_check_class_name',['column'=>'ok'])}",
- type: 'get',
- data: {
- ac_name: function() {
- return $('#name').val();
- }
- }
- }
- },
- description: {
- maxlength: 100
- },
- sort: {
- digits: true
- }
- },
- messages: {
- name: {
- required: '<i class="iconfont"></i>{$Think.lang.album_class_add_name_null}',
- maxlength: '<i class="iconfont"></i>{$Think.lang.album_class_add_name_max}',
- remote: '<i class="iconfont"></i>{$Think.lang.album_class_add_name_repeat}'
- },
- description: {
- maxlength: '<i class="iconfont"></i>{$Think.lang.album_class_add_des_max}'
- },
- sort: {
- digits: '<i class="iconfont"></i>{$Think.lang.album_class_add_sort_digits}'
- }
- }
- });
- });
- </script>
|