Lang_editparam.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <form name="myform" id="myform" action="{:U($module_name.'/updateparam?file='.$file)}" method="post">
  2. <table cellpadding=0 cellspacing=0 id="param" class="table_form" width="100%">
  3. <tr>
  4. <td width="120">{:L(param_name)}</td>
  5. <td >{:L(param_value)}</td>
  6. </tr>
  7. <volist name="list" id="vo" key="k">
  8. <tr>
  9. <td width="120">{$key}</td>
  10. <td><input type="text" id="{$key}" name="{$key}" value="{$vo|htmlspecialchars}" class="input-text" /></td>
  11. </tr>
  12. </volist>
  13. </table>
  14. <div id="bootline"></div>
  15. <div id="btnbox" class="btn">
  16. <INPUT TYPE="submit" value="{:L('dosubmit')}" class="button buttonBtn" ><input type="button" value="{:L(Lang_add_param)}" class="button" onclick="addparam();" />
  17. <input TYPE="reset" value="{:L('cancel')}" class="button">
  18. </div>
  19. </form>
  20. </div>
  21. <script>
  22. function addparam(){
  23. var dialog = art.dialog({
  24. title: '{:L(Lang_add_param)}',
  25. content:'<p>{:L(param_name)}:<input id="key" style="width:15em; padding:4px" /></p><p>{:L(param_value)}:<input id="value" style="width:15em; padding:4px" /></p>',
  26. fixed: true,
  27. ok: function () {
  28. var key = document.getElementById('key');
  29. var value = document.getElementById('value');
  30. var topWin = art.dialog.top;
  31. if (key.value !== '' && value.value !== '' ) {
  32. topWin.$('#param').append('<tr> <td width="120">'+key.value+'</td> <td><input type="text" name="'+key.value+'" value="'+value.value+'" class="input-text" /></td></tr>');
  33. art.dialog({
  34. time: 1,
  35. content: '{:L(add_ok)}'
  36. });
  37. } else {
  38. art.dialog({
  39. time: 1,
  40. content: '{:L(value_empty)}'
  41. });
  42. return false;
  43. };
  44. },
  45. cancel: true
  46. });
  47. }
  48. </script>
  49. </body></html>