Нет описания
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

pack_edit.htm 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 pb10" style="min-width: auto;box-shadow:none;">
  7. <form class="form-horizontal" id="post_form" action="{:url('Language/pack_edit')}" method="post">
  8. <div class="ncap-form-default pb10">
  9. <dl class="row">
  10. <dt class="tit">
  11. <label for="name"><em>*</em>变量名</label>
  12. </dt>
  13. <dd class="opt" style="width: auto;">
  14. {eq name='$row.is_syn' value='1'}
  15. {$row.name}
  16. <input type="hidden" name="name" value="{$row.name}" />
  17. <span class="err"></span>
  18. <p class="notic">官方同步语言包,禁止修改</p>
  19. {else /}
  20. <input type="text" name="name" value="{$row.name}" id="name" class="input-txt" onkeyup="this.value=this.value.replace(/[^a-zA-Z0-9_-]/g,'');" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/\[^a-zA-Z0-9_-]/g,''));">
  21. <span class="err"></span>
  22. <p class="notic">保持唯一性,不可重复</p>
  23. <p class="">仅支持字母、数字、下划线、连接符,不区分大小写</p>
  24. {/eq}
  25. </dd>
  26. </dl>
  27. <dl class="row"><dt class="tit"><label><b>语言名称</b></label></dt><dd class="opt" style="width: auto;"><label><b>变量值</b></label></dd></dl>
  28. {volist name='$languageRow' id='vo'}
  29. <dl class="row">
  30. <dt class="tit">
  31. <label for="value">{$vo.title}</label>
  32. </dt>
  33. <dd class="opt" style="width: auto;">
  34. <input type="text" name="value[{$vo.mark}]" value="{$values[$vo['mark']]['value']}" class="input-txt">
  35. <span class="err"></span>
  36. <p class="notic"></p>
  37. </dd>
  38. </dl>
  39. {/volist}
  40. <div class="bot mt30">
  41. <input type="hidden" id="old_name" value="{$row.name}">
  42. <input type="hidden" name="id" value="{$row.id}">
  43. <input type="hidden" name="official" value="{$official|default='0'}">
  44. <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
  45. </div>
  46. </div>
  47. </form>
  48. </div>
  49. <script type="text/javascript">
  50. var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  51. // 判断输入框是否为空
  52. function checkForm(){
  53. layer_loading('正在处理');
  54. $.ajax({
  55. type : 'post',
  56. url : "{:url('Language/pack_edit', ['_ajax'=>1])}",
  57. data : $('#post_form').serialize(),
  58. dataType : 'json',
  59. success : function(res){
  60. layer.closeAll();
  61. if(res.code == 1){
  62. var _parent = parent;
  63. _parent.layer.close(parentObj);
  64. _parent.layer.msg(res.msg, {shade: layer_shade, time: 1000}, function(){
  65. _parent.window.location.reload();
  66. });
  67. }else{
  68. showErrorMsg(res.msg);
  69. }
  70. },
  71. error: function(e){
  72. layer.closeAll();
  73. showErrorAlert(e.responseText);
  74. }
  75. });
  76. }
  77. </script>
  78. {include file="public/footer" /}