Switch personal/configuration/create/edit users to smartified config.
This commit is contained in:
@@ -703,14 +703,6 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
|
|||||||
|
|
||||||
$data['OUT_STACK_REST'] = $out_stack;
|
$data['OUT_STACK_REST'] = $out_stack;
|
||||||
|
|
||||||
// is left here without any use for archiv issues only - we now use external js file outsourced to templates/default/admin/admin_scripts.js
|
|
||||||
// see passed vars in serendipity_plugin_config.fnc.tpl - can get erased, as not being used any more if keeping Smartification.
|
|
||||||
ob_start();
|
|
||||||
serendipity_printConfigJS();
|
|
||||||
$config_js = ob_get_contents();
|
|
||||||
$data['serendipity_printConfigJS'] = $config_js;
|
|
||||||
ob_end_clean();
|
|
||||||
|
|
||||||
// this is new - allowing easier access to script handling like toogle
|
// this is new - allowing easier access to script handling like toogle
|
||||||
$data['allow_admin_scripts'] = true;
|
$data['allow_admin_scripts'] = true;
|
||||||
|
|
||||||
|
@@ -5,52 +5,40 @@
|
|||||||
{$formToken}
|
{$formToken}
|
||||||
{/if}
|
{/if}
|
||||||
{if $config|@sizeof > 1 AND $allowToggle}
|
{if $config|@sizeof > 1 AND $allowToggle}
|
||||||
<a class="button_link" href="#" onClick="showConfigAll({$config|@sizeof})">{$CONST.TOGGLE_ALL}</a>
|
<a id="show_config_all" class="button_link" href="#serendipity_config_options">{$CONST.TOGGLE_ALL}</a>
|
||||||
{/if}
|
{/if}
|
||||||
{foreach $config as $category}
|
<div id="serendipity_config_options">
|
||||||
<div class="configuration_group">
|
{foreach $config as $category}
|
||||||
|
<div class="configuration_group">
|
||||||
{if $config|@sizeof > 1}
|
{if $config|@sizeof > 1}
|
||||||
<h3>
|
<h3>{if $allowToggle}<a id="optionel{$category@iteration}" class="show_config_option" href="#el{$category@index}" title="{$CONST.TOGGLE_OPTION}"><span class="icon-minus-circle"></span> {$category.title}</a>{else}{$category.title}{/if}</h3>
|
||||||
{if $allowToggle}
|
|
||||||
<a href="#" onClick="showConfig('el{$category@index}'); return false">
|
|
||||||
{$category.title}
|
|
||||||
</a>
|
|
||||||
{else}
|
|
||||||
{$category.title}
|
|
||||||
{/if}
|
|
||||||
</h3>
|
|
||||||
{/if}
|
{/if}
|
||||||
<fieldset id="el{$category@index}" class="clearfix">
|
<fieldset id="el{$category@index}" class="config_optiongroup{if $config_groupkeys@last} config_optiongroup_last{/if} additional_info">
|
||||||
<legend><span>{$category.description}</span></legend>
|
<legend><span>{$category.description}</span></legend>
|
||||||
{foreach $category.items as $item}
|
{foreach $category.items as $item}
|
||||||
{if $item.guessedInput}
|
{if $item.guessedInput}
|
||||||
{if $item.type == 'bool'}
|
{if $item.type == 'bool'}
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>
|
<legend><span>{$item.title} <span>{$item.description}</span></span></legend>
|
||||||
<span>{$item.title}
|
<div class="clearfix">
|
||||||
<span>{$item.description}</span>
|
{$item.guessedInput}
|
||||||
</span>
|
</div>
|
||||||
</legend>
|
</fieldset>
|
||||||
<div class="clearfix">
|
{else}
|
||||||
{$item.guessedInput}
|
<div class="form_{if $item.type == 'list'}select{elseif $item.type == 'multilist'}multiselect{elseif $item.type == 'textarea'}area{else}field{/if}">
|
||||||
</div>
|
<label for="{$item.var}">{$item.title}<span>{$item.description}</span></label>
|
||||||
</fieldset>
|
{$item.guessedInput}
|
||||||
{else}
|
</div>
|
||||||
<div class="form_{$item.type}">
|
|
||||||
<label for="{$item.var}">{$item.title}<span>{$item.description}</span></label>
|
|
||||||
{$item.guessedInput}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/if}
|
||||||
</fieldset>
|
{/foreach}
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
{/foreach}
|
||||||
</div>
|
</div>
|
||||||
{/foreach}
|
|
||||||
|
|
||||||
{if NOT $noForm}
|
{if NOT $noForm}
|
||||||
<div class="form_buttons">
|
<div class="form_buttons">
|
||||||
<input type="submit" value="{$CONST.CHECK_N_SAVE}">
|
<input type="submit" value="{$CONST.CHECK_N_SAVE}">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
@@ -20,5 +20,5 @@
|
|||||||
{else}
|
{else}
|
||||||
<h2>{$CONST.CONFIGURATION}</h2>
|
<h2>{$CONST.CONFIGURATION}</h2>
|
||||||
|
|
||||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_multilist"':'class="form_multiselect"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
{$config}
|
||||||
{/if}
|
{/if}
|
||||||
|
@@ -1,50 +1,33 @@
|
|||||||
{if $type == 'bool'}
|
{if $type == 'bool'}
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input class="input_radio" id="radio_cfg_{$name}_yes" type="radio" name="{$name}" value="true"
|
<input id="radio_cfg_{$name}_yes" type="radio" name="{$name}" value="true"{if $value == true} checked="checked" {/if}>
|
||||||
{if $value == true} checked="checked" {/if}
|
|
||||||
/>
|
|
||||||
<label for="radio_cfg_{$name}_yes">{$CONST.YES}</label>
|
<label for="radio_cfg_{$name}_yes">{$CONST.YES}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form_radio">
|
<div class="form_radio">
|
||||||
<input class="input_radio" id="radio_cfg_{$name}_no" type="radio" name="{$name}" value="false"
|
<input id="radio_cfg_{$name}_no" type="radio" name="{$name}" value="false"{if NOT $value == true} checked="checked" {/if}>
|
||||||
{if NOT $value == true} checked="checked" {/if}
|
|
||||||
/>
|
|
||||||
<label for="radio_cfg_{$name}_no">{$CONST.NO}</label>
|
<label for="radio_cfg_{$name}_no">{$CONST.NO}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{elseif $type == 'fullprotected'}
|
{elseif $type == 'fullprotected'}
|
||||||
<input autocomplete="off" class="input_textbox" type="password" size="30" name="{$name}" value="{$value|escape:"html"}" />
|
<input id="{$name}" type="password" name="{$name}" value="{$value|escape:"html"}" autocomplete="off">
|
||||||
|
|
||||||
{elseif $type == 'protected'}
|
{elseif $type == 'protected'}
|
||||||
<input class="input_textbox" type="password" size="30" name="{$name}" value="{$value|escape:"html"}" />
|
<input id="{$name}" type="password" name="{$name}" value="{$value|escape:"html"}">
|
||||||
|
|
||||||
{elseif $type == 'multilist'}
|
{elseif $type == 'multilist'}
|
||||||
<select name="{$name}[]" multiple="multiple" size="5">';
|
<select id="{$name}" name="{$name}[]" multiple="multiple" size="5">';
|
||||||
|
|
||||||
{foreach $default as $k => $v}
|
{foreach $default as $k => $v}
|
||||||
<option value="{$v.confkey}" {if $selected.$name.$k.selected} selected="selected" {/if} >
|
<option value="{$v.confkey}"{if $selected.$name.$k.selected} selected="selected"{/if}>{$v.confvalue}</option>
|
||||||
{$v.confvalue}
|
|
||||||
</option>
|
|
||||||
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{elseif $type == 'list'}
|
{elseif $type == 'list'}
|
||||||
<select name="{$name}">
|
<select id="{$name}" name="{$name}">
|
||||||
{foreach $default as $k => $v}
|
{foreach $default as $k => $v}
|
||||||
<option value="{$k}" {if $selected.$name.$k.selected} selected="selected" {/if} >
|
<option value="{$k}"{if $selected.$name.$k.selected} selected="selected"{/if}>{$v}</option>
|
||||||
{$v}
|
{/foreach}
|
||||||
</option>
|
|
||||||
{/foreach}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
{elseif $type == 'file'}
|
{elseif $type == 'file'}
|
||||||
<input class="input_file" type="file" size="30" name="{$name}" />
|
<input id="{$name}" type="file" name="{$name}">
|
||||||
|
|
||||||
{elseif $type == 'textarea'}
|
{elseif $type == 'textarea'}
|
||||||
<textarea rows="5" cols="40" name="{$name}">{$value|escape:"html"}</textarea>
|
<textarea id="{$name}" rows="5" name="{$name}">{$value|escape:"html"}</textarea>
|
||||||
|
|
||||||
{else}
|
{else}
|
||||||
<input class="input_textbox" type="text" size="30" name="{$name}" value="{$value|escape:"html"}" />
|
<input id="{$name}" type="text" name="{$name}" value="{$value|escape:"html"}">
|
||||||
{/if}
|
{/if}
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post">
|
<form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post">
|
||||||
{$formToken}
|
{$formToken}
|
||||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_multilist"':'class="form_multiselect"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
{$config}
|
||||||
<div class="form_buttons">
|
<div class="form_buttons">
|
||||||
<input name="SAVE" type="submit" value="{$CONST.SAVE}">
|
<input name="SAVE" type="submit" value="{$CONST.SAVE}">
|
||||||
</div>
|
</div>
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
{$formToken}
|
{$formToken}
|
||||||
{if $adminAction == 'edit'}{if $create_permission}<input name="serendipity[user]" type="hidden" value="{$from.authorid}">{/if}{/if}
|
{if $adminAction == 'edit'}{if $create_permission}<input name="serendipity[user]" type="hidden" value="{$from.authorid}">{/if}{/if}
|
||||||
<h2>{if $adminAction == 'edit'}{if $no_create_permission}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{else}{if $create_permission}{$CONST.EDIT}{else}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{/if}{/if}{else}{$CONST.CREATE}{/if}</h2>
|
<h2>{if $adminAction == 'edit'}{if $no_create_permission}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{else}{if $create_permission}{$CONST.EDIT}{else}{$CONST.CREATE_NOT_AUTHORIZED}: {$CONST.EDIT}{/if}{/if}{else}{$CONST.CREATE}{/if}</h2>
|
||||||
{$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'|replace:'class="form_multilist"':'class="form_multiselect"'|replace:'class="form_int"':'class="form_field"'|replace:'class="form_textarea"':'class="form_area"'}
|
{$config}
|
||||||
<div class="form_buttons">
|
<div class="form_buttons">
|
||||||
{if $adminAction == 'edit'}
|
{if $adminAction == 'edit'}
|
||||||
<input name="SAVE_EDIT" type="submit" value="{$CONST.SAVE}">
|
<input name="SAVE_EDIT" type="submit" value="{$CONST.SAVE}">
|
||||||
|
Reference in New Issue
Block a user