Admin settings updated with add new setting feature
This commit is contained in:
@@ -10,12 +10,8 @@
|
||||
{assign var='value' value=$config->get($name)}
|
||||
{assign var='type' value=$config->type($name)}
|
||||
{assign var='id' value=str_replace('.', '-',$name)}
|
||||
<tr>
|
||||
<td>{$name}</td>
|
||||
<td>
|
||||
{include file="fragments/admin-setting-value.tpl"}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{include file="fragments/admin-setting-row.tpl"}
|
||||
{/foreach}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
|
||||
11
webui/source/templates/ajax/admin/add-setting.tpl
Normal file
11
webui/source/templates/ajax/admin/add-setting.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{if $success}
|
||||
"actions": {
|
||||
"add_setting_row": {
|
||||
{include file="fragments/admin-setting-row.tpl" assign=content}
|
||||
"content": {$content|json_encode}
|
||||
}
|
||||
},
|
||||
{/if}
|
||||
|
||||
"success": {$success|json_encode}
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
"close-dialog"
|
||||
],
|
||||
"cancel": "close-dialog"
|
||||
},
|
||||
"params": {
|
||||
"name": "settings_add_name",
|
||||
"type": "settings_add_type"
|
||||
}
|
||||
}
|
||||
}
|
||||
6
webui/source/templates/fragments/admin-setting-row.tpl
Normal file
6
webui/source/templates/fragments/admin-setting-row.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
<tr>
|
||||
<td>{$name}</td>
|
||||
<td>
|
||||
{include file="fragments/admin-setting-value.tpl"}
|
||||
</td>
|
||||
</tr>
|
||||
@@ -9,11 +9,11 @@
|
||||
<input type="text" id="settings_add_name" value="" />
|
||||
</td>
|
||||
<td>
|
||||
<select id="settings_add_tpe">
|
||||
<select id="settings_add_type">
|
||||
<option value="int">Integer</option>
|
||||
<option value="bool">Boolean</option>
|
||||
<option value="string">String</option>
|
||||
<option value="string_list">String List</option>
|
||||
<option value="string-list">String List</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user