removed some unclean html stuff

updated plugin specfication
This commit is contained in:
lars 2007-01-27 02:19:41 +00:00
parent 48b1ecb926
commit be8131d529
4 changed files with 16 additions and 16 deletions

View file

@ -44,17 +44,16 @@
value="<?cs var:Data.Plugins.network.gw.oc4 ?>" />
</td></tr>
</table>
<?cs call:show_help(Lang.Plugins.network.Help.DHCP) ?>
<p>
<?cs call:show_help(Lang.Plugins.network.Help.DHCP) ?>
<input type="checkbox" name="dhcp" value="1" id="dhcp" /><label for="dhcp"><?cs var:html_escape(Lang.Plugins.network.Text.DHCP) ?></label>
</p><p>
</p>
<p>
<input type="hidden" name="store" value="set_network" />
<button type="submit"><?cs var:html_escape(Lang.Plugins.network.Button.Network) ?></button>
</p>
</form>
</fieldset>
</fieldset>

View file

@ -11,11 +11,10 @@ Python code interface:
- method "do_action":
- this function will get called whenever this plugins is involved in a request
- all arguments should be optional (e.g. for displaying a form without previous input values)
- the argument "store" should be used to process a form submission (just a recommendation)
- if the processing failed for some reason (invalid input, ...), it should manually set
"Data.Warning" or "Data.Success") to a value of your choice (preferably
you may want to use messages of the namespace of your plugin
(e.g. "Data.Plugins.PLUGINNAME.WarningMessage.InvalidInput"))
(e.g. "Plugins.PLUGINNAME.InvalidInput"))
- the return value should be the name of the template that should be displayed after processing
(a template file in the plugin directory takes precedence over global template files)
- the return value may also be a dictionary with the following elements:
@ -65,14 +64,15 @@ Language file structure:
- the following top level settings _must_ be defined:
Name (a short description)
Link (the visible text for links to this plugin)
- all warnings, hints and success messages should be stored below WarningMessage.???
(resp. AdviceMessage or SuccessMessage)
- only system plugins: "Title" is necessary, too
- all warnings, hints and success messages as well as environment warnings should
be stored below WarningMessage/AdviceMessage/SuccessMessage/EnvironmentWarning
Clearsilver template:
- for a nice title & icon insert: '<?cs call:show_plugin_title()
?>' at the top of the template
- define the displayed title with 'Title' in the language file
- volume plugins do not have a title
- system plugins should contain '<?cs call:show_plugin_title() ?>' at the
top of the template
- the title should be followd by '<?cs call:handle_messages() ?>'
this will display important messages
- usually you should supply some helpful information afterwards (only displayed

View file

@ -10,7 +10,7 @@
<?cs call:show_help(Lang.Plugins.volume_mount.Help.Open) ?>
<?cs call:print_form_header("mount", "volume_mount") ?><p>
<?cs call:print_form_header("mount", "volume_mount") ?>
<table>
<tr>
<td>
@ -33,6 +33,6 @@
</td>
</tr>
</table>
</p></form>
</form>
</fieldset>

View file

@ -226,7 +226,8 @@ def:handle_messages() ?><?cs
def:show_plugin_title() ?>
<div class="plugin_system_title">
<img src="icons/<?cs var:html_escape(Data.ActivePlugin) ?>" />
<img alt="icon: <?cs var:html_escape(Data.ActivePlugin) ?>" src="icons/<?cs
var:html_escape(Data.ActivePlugin) ?>" />
<h1><?cs var:Lang.Plugins[Data.ActivePlugin].Title ?></h1>
</div><?cs
/def ?>