Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pack_batch_add.htm 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;">
  3. <div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;min-width:auto;"></div>
  4. <div id="append_parent"></div>
  5. <div id="ajaxwaitid"></div>
  6. <div class="page" style="min-width: auto;box-shadow:none;">
  7. <form class="form-horizontal" id="post_form" action="{:url('Language/pack_batch_add')}" method="post">
  8. <div class="ncap-form-default">
  9. <dl class="row">
  10. <dt class="tit">
  11. <label for="attr_name"><em>*</em>批量新增变量</label>
  12. </dt>
  13. <dd class="opt" style="width: auto;">
  14. <textarea rows="5" cols="60" id="content" name="content" style="width:380px;height:300px;" placeholder="按照以下格式填写:第一种语言值=第二种语言值=第三种语言值
  15. {$languageStr}
  16. 网站首页=Home
  17. 你的位置=Your position"></textarea>
  18. <span class="err"></span>
  19. <p class="">一行代表一个多语言值,系统会自动生成变量名</p>
  20. </dd>
  21. </dl>
  22. <div class="bot">
  23. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  24. </div>
  25. </div>
  26. </form>
  27. </div>
  28. <script type="text/javascript">
  29. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  30. // 判断输入框是否为空
  31. function checkForm(){
  32. if($.trim($('#content').val()) == ''){
  33. showErrorMsg('批量替换语言不能为空!');
  34. $('#content').focus();
  35. return false;
  36. }
  37. layer_loading('正在处理');
  38. $.ajax({
  39. type : 'post',
  40. url : "{:url('Language/pack_batch_add', ['_ajax'=>1])}",
  41. data : $('#post_form').serialize(),
  42. dataType : 'json',
  43. success : function(res){
  44. layer.closeAll();
  45. if(res.code == 1){
  46. var _parent = parent;
  47. _parent.layer.close(parentObj);
  48. _parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  49. _parent.window.location.reload();
  50. });
  51. }else{
  52. showErrorMsg(res.msg);
  53. }
  54. },
  55. error: function(e){
  56. layer.closeAll();
  57. showErrorAlert(e.responseText);
  58. }
  59. });
  60. }
  61. </script>
  62. {include file="public/footer" /}