obNiceFormsPlugin - 1.0.1
You are currently browsing
the website for symfony 1
Plugin by OB.
Niceforms by Lucian Slatineanu is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
It adds a new helper file : niceFormsHelper with a special form_tag function :
$ symfony plugin-install http://plugins.symfony-project.com/obNiceFormsPlugin
all: nice_forms: theme: "default" # default theme
$ symfony cc
<head> ... <base href="http://www.your-base-ref.com/web/" /> ... </head>
<?php use_helper('niceForms'); ?>
# Use the usual options as form_tag <?php echo nice_form_tag('module/action', array('id' => 'my_form', 'name' => 'my_form')) ?>
For this you need to create new theme folders under the plugin web/ directory. Duplicate each default theme directory and rename them in "myTheme" - obNiceFormsPlugin/web/css/myTheme/niceforms.css - obNiceFormsPlugin/web/js/myTheme/niceforms.js - obNiceFormsPlugin/web/images/myTheme/ Then - change path to images in niceforms.css - change var imagesPath in niceforms.js - create your own images package with the help of the default.psd template
That's all [OB]