[pLog-svn] r5080 - plugins/branches/lifetype-1.2/authimage/templates

Jon Daley plogworld at jon.limedaley.com
Tue Mar 13 10:41:40 EDT 2007


 	This one surprised me.  I thought it was working before - maybe I 
upgraded Firefox since the last time I checked this?

To reproduce: make a setting (such as the encryption key) set in the 
global settings, and not overridable by the user.

Then go to the control center configuration, see that the option is 
not-editable, and then hit update.

I get a "encryption key is blank" error.

One interesting thing, and maybe it doesn't matter, that even if a setting 
is set to user-can't-override, the value is still changeable if you force 
the browser to ignore the disable/readonly part.  The GUI still displays 
the global settings after it has been saved, but the setting was saved to 
the local blog settings anyway.  I am not sure if this matters.


On Tue, 13 Mar 2007, jondaley at devel.lifetype.net wrote:
> Author: jondaley
> Date: 2007-03-13 10:29:59 -0400 (Tue, 13 Mar 2007)
> New Revision: 5080
>
> Modified:
>   plugins/branches/lifetype-1.2/authimage/templates/authimage.template
> Log:
> setting override settings to disabled makes (some browsers at least) not send the value, where a read-only value will get sent.
>
> Modified: plugins/branches/lifetype-1.2/authimage/templates/authimage.template
> ===================================================================
> --- plugins/branches/lifetype-1.2/authimage/templates/authimage.template	2007-03-13 10:32:05 UTC (rev 5079)
> +++ plugins/branches/lifetype-1.2/authimage/templates/authimage.template	2007-03-13 14:29:59 UTC (rev 5080)
> @@ -9,7 +9,7 @@
>   <div class="field">
>    <label for="pluginEnabled">{$locale->tr("label_enable")}</label>
>    <div class="formHelp">
> -     <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled}checked="checked"{/if} value="1" {user_cannot_override key=plugin_authimage_enabled}disabled="disabled"{/user_cannot_override} />{$locale->tr("authimage_plugin_enabled")}
> +     <input class="checkbox" type="checkbox" name="pluginEnabled" id="pluginEnabled" {if $pluginEnabled}checked="checked"{/if} value="1" {user_cannot_override key=plugin_authimage_enabled}readonly{/user_cannot_override} />{$locale->tr("authimage_plugin_enabled")}
>    </div>
>   </div>
>
> @@ -17,21 +17,21 @@
>    <label for="length">{$locale->tr("label_length")}</label>
>    <span class="required">*</span>
>    <div class="formHelp">{$locale->tr("authimage_length")}</div>
> -   <input class="text" type="text" name="length" id="length" value="{$length}" {user_cannot_override key=plugin_authimage_length}disabled="disabled"{/user_cannot_override} />
> +   <input class="text" type="text" name="length" id="length" value="{$length}" {user_cannot_override key=plugin_authimage_length}readonly{/user_cannot_override} />
>   </div>
>
>   <div class="field">
>    <label for="key">{$locale->tr("label_key")}</label>
>    <span class="required">*</span>
>    <div class="formHelp">{$locale->tr("authimage_key")}</div>
> -   <input class="text" type="text" name="key" id="key" value="{$key}" {user_cannot_override key=plugin_authimage_key}disabled="disabled"{/user_cannot_override} />
> +   <input class="text" type="text" name="key" id="key" value="{$key}" {user_cannot_override key=plugin_authimage_key}readonly{/user_cannot_override} />
>   </div>
>
>   <div class="field">
>    <label for="expiredTime">{$locale->tr("label_expiredtime")}</label>
>    <span class="required">*</span>
>    <div class="formHelp">{$locale->tr("authimage_expiredtime")}</div>
> -   <input class="text" type="text" name="expiredTime" id="expiredTime" value="{$expiredTime}" {user_cannot_override key=plugin_authimage_expiredtime}disabled="disabled"{/user_cannot_override} />
> +   <input class="text" type="text" name="expiredTime" id="expiredTime" value="{$expiredTime}" {user_cannot_override key=plugin_authimage_expiredtime}readonly{/user_cannot_override} />
>   </div>
>
>   <div class="field">
> @@ -49,7 +49,7 @@
>      {foreach from=$backgrounds item=background}
>      <tr>
>       <td>
> -       <input class="radio" type="radio" name="default" id="default" value="{$background}" {if $default==$background} checked="checked" {/if} {user_cannot_override key=plugin_authimage_default}disabled="disabled"{/user_cannot_override} />
> +       <input class="radio" type="radio" name="default" id="default" value="{$background}" {if $default==$background} checked="checked" {/if} {user_cannot_override key=plugin_authimage_default}readonly{/user_cannot_override} />
>       </td>
>       <td>
>        {$background}
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Whether I live long enough or not, I don't know.
But it's worth a try.
-- Carl Daley (my grandpa)


More information about the pLog-svn mailing list