From 934806443240cb092edd1e216a282f88307c8fd9 Mon Sep 17 00:00:00 2001 From: Matthias Mees <mm@yellowled.de> Date: Wed, 6 Feb 2013 15:51:19 +0100 Subject: [PATCH] Finalizing what @onli prepped for proper radio element markup. Hooray. --- include/admin/tpl/configuration.inc.tpl | 2 +- include/admin/tpl/personal.inc.tpl | 2 +- include/functions_installer.inc.php | 12 ++++++++---- templates/2k11/admin/style.css | 4 ++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/include/admin/tpl/configuration.inc.tpl b/include/admin/tpl/configuration.inc.tpl index 69cdc2cf..f234c17c 100644 --- a/include/admin/tpl/configuration.inc.tpl +++ b/include/admin/tpl/configuration.inc.tpl @@ -21,5 +21,5 @@ <span class="msg_success"><span class="icon-ok-circle"></span> {$CONST.WRITTEN_N_SAVED}</span> {/if} {else} - {$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_bool"':'class="form_radio"'|replace:'class="form_list"':'class="form_select"'} + {$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'} {/if} diff --git a/include/admin/tpl/personal.inc.tpl b/include/admin/tpl/personal.inc.tpl index c31c7697..55a42ef6 100644 --- a/include/admin/tpl/personal.inc.tpl +++ b/include/admin/tpl/personal.inc.tpl @@ -14,7 +14,7 @@ {/if} <form action="?serendipity[adminModule]=personal&serendipity[adminAction]=save" method="post"> {$formToken} - {$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_bool"':'class="form_radio"'|replace:'class="form_list"':'class="form_select"'} + {$config|replace:'class="form_string"':'class="form_field"'|replace:'class="form_fullprotected"':'class="form_field"'|replace:'class="form_list"':'class="form_select"'} <div class="form_buttons"> <input name="SAVE" type="submit" value="{$CONST.SAVE}"> </div> diff --git a/include/functions_installer.inc.php b/include/functions_installer.inc.php index a322affa..8c27a8f4 100644 --- a/include/functions_installer.inc.php +++ b/include/functions_installer.inc.php @@ -400,12 +400,14 @@ function serendipity_guessInput($type, $name, $value='', $default='') { } echo '<div class="form_radio">'; echo '<input class="input_radio" id="radio_cfg_' . $name . '_yes" type="radio" name="' . $name . '" value="true" '; - echo (($value == true) ? 'checked="checked"' : ''). ' /><label for="radio_cfg_' . $name . '_yes"> ' . YES . '</label>'; + echo (($value == true) ? 'checked="checked"' : ''). ' /> + <label for="radio_cfg_' . $name . '_yes"> ' . YES . '</label>'; echo '</div>'; echo '<div class="form_radio">'; echo '<input class="input_radio" id="radio_cfg_' . $name . '_no" type="radio" name="' . $name . '" value="false" '; - echo (($value == true) ? '' : 'checked="checked"'). ' /><label for="radio_cfg_' . $name . '_no"> ' . NO . '</label>'; + echo (($value == true) ? '' : 'checked="checked"'). ' /> + <label for="radio_cfg_' . $name . '_no"> ' . NO . '</label>'; echo '</div>'; break; @@ -585,9 +587,11 @@ function serendipity_printConfigTemplate($config, $from = false, $noForm = false <span>'. $item['title'] .' <span>'. $item['description'] .' </span> </span> - </legend>'; + </legend> + <div class="clearfix">'; serendipity_guessInput($item['type'], $item['var'], $value, $item['default']); - echo '</fieldset>'; + echo '</div> + </fieldset>'; } else { echo '<div class="form_'. $item['type'] .'"> <label for="'. $item['var'] .'">'. $item['title'] .' <span>'. $item['description'] .'</span></label>'; diff --git a/templates/2k11/admin/style.css b/templates/2k11/admin/style.css index 13db6931..840fc1a4 100644 --- a/templates/2k11/admin/style.css +++ b/templates/2k11/admin/style.css @@ -429,6 +429,7 @@ form > a, .block_level, .form_multiselect label, label > span, +legend > span > span, #back_to_blog, #meta small, .msg_error, @@ -781,6 +782,7 @@ legend > span, figcaption { font-weight: bold; } label > span, +legend>span>span, input[type=checkbox] + label, input[type=radio] + label, .form_check label { font-weight: normal; } @@ -1351,13 +1353,11 @@ fieldset p, .configuration_group .form_select, .configuration_group .form_field, - .configuration_group .form_radio, #template_select .odd, .media_pane .odd { clear: left; } .configuration_group .form_select, .configuration_group .form_field, - .configuration_group .form_radio, #serendipityScaleImg, .media_file header { overflow: hidden; }