Admin settings updated with add new setting feature

This commit is contained in:
2011-08-28 13:03:31 +01:00
parent 25449d4d3d
commit aec18cb810
7 changed files with 97 additions and 11 deletions

View File

@@ -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>

View 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}

View File

@@ -21,6 +21,10 @@
"close-dialog"
],
"cancel": "close-dialog"
},
"params": {
"name": "settings_add_name",
"type": "settings_add_type"
}
}
}

View File

@@ -0,0 +1,6 @@
<tr>
<td>{$name}</td>
<td>
{include file="fragments/admin-setting-value.tpl"}
</td>
</tr>

View File

@@ -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>