webmcp
diff framework/env/ui_deprecated/submit.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/ui_deprecated/submit.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +-- 1.5 +-- Creates a submit buttom for a form 1.6 +-- 1.7 +-- label (string) The label of the box 1.8 +-- 1.9 +-- Example: 1.10 +-- 1.11 +-- ui_deprecated.submit({ 1.12 +-- label = 'Save' 1.13 +-- }) 1.14 +-- 1.15 + 1.16 +function ui_deprecated.submit(args) 1.17 + local args = args or {} 1.18 + args.label = args.label or 'Submit' 1.19 + slot.put( 1.20 + '<div class="ui_field ui_submit">', 1.21 + '<div class="label"> </div>', 1.22 + '<div class="value">', 1.23 + '<input type="submit" value="', encode.html(args.label), '" />', 1.24 + '</div>', 1.25 + '</div>' 1.26 + ) 1.27 +end