12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <form name="myform" id="myform" action="{:U($module_name.'/updateparam?file='.$file)}" method="post">
- <table cellpadding=0 cellspacing=0 id="param" class="table_form" width="100%">
- <tr>
- <td width="120">{:L(param_name)}</td>
- <td >{:L(param_value)}</td>
- </tr>
- <volist name="list" id="vo" key="k">
- <tr>
- <td width="120">{$key}</td>
- <td><input type="text" id="{$key}" name="{$key}" value="{$vo|htmlspecialchars}" class="input-text" /></td>
- </tr>
- </volist>
- </table>
- <div id="bootline"></div>
- <div id="btnbox" class="btn">
- <INPUT TYPE="submit" value="{:L('dosubmit')}" class="button buttonBtn" ><input type="button" value="{:L(Lang_add_param)}" class="button" onclick="addparam();" />
- <input TYPE="reset" value="{:L('cancel')}" class="button">
- </div>
- </form>
- </div>
- <script>
- function addparam(){
- var dialog = art.dialog({
- title: '{:L(Lang_add_param)}',
- 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>',
- fixed: true,
- ok: function () {
- var key = document.getElementById('key');
- var value = document.getElementById('value');
- var topWin = art.dialog.top;
- if (key.value !== '' && value.value !== '' ) {
- 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>');
- art.dialog({
- time: 1,
- content: '{:L(add_ok)}'
- });
- } else {
- art.dialog({
- time: 1,
- content: '{:L(value_empty)}'
- });
- return false;
- };
- },
- cancel: true
- });
- }
- </script>
- </body></html>
|