diff options
author | Andrey Andreev <narf@devilix.net> | 2013-08-07 12:38:16 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-08-07 12:38:16 +0200 |
commit | 537181090448b5ad10283dd933861b5b1de6a568 (patch) | |
tree | 2fbbe2815a356840ee840f5061fe62e96bf1feee /user_guide_src | |
parent | b799a0b3f09238fe46892b811025e7bf2ac81b19 (diff) | |
parent | 1c75780da904b2a56c30c693fc3e03d2145614c2 (diff) |
Merge pull request #2589 from vlakoff/feature/user-guide-cleanup
Fix a few more merge conflicts
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/changelog.rst | 2 | ||||
-rw-r--r-- | user_guide_src/source/helpers/form_helper.rst | 44 | ||||
-rw-r--r-- | user_guide_src/source/helpers/smiley_helper.rst | 4 |
3 files changed, 27 insertions, 23 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 44c6f16c5..f9beff36b 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -403,7 +403,7 @@ Release Date: Not Released - :doc:`Config Library <libraries/config>` changes include: - Changed ``site_url()`` method to accept an array as well. - - Removed internal method ``_assign_to_config()`` and moved its implementation in *CodeIgniter.php* instead. + - Removed internal method ``_assign_to_config()`` and moved its implementation to *CodeIgniter.php* instead. - :doc:`Security Library <libraries/security>` changes include: diff --git a/user_guide_src/source/helpers/form_helper.rst b/user_guide_src/source/helpers/form_helper.rst index 5bc5887aa..8ad8f7dcd 100644 --- a/user_guide_src/source/helpers/form_helper.rst +++ b/user_guide_src/source/helpers/form_helper.rst @@ -47,7 +47,7 @@ The following functions are available: The above example would create a form that points to your base URL plus the "email/send" URI segments, like this:: - <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" /> + <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send"> **Adding Attributes** @@ -57,9 +57,13 @@ The following functions are available: $attributes = array('class' => 'email', 'id' => 'myform'); echo form_open('email/send', $attributes); - The above example would create a form similar to this:: + Alternatively, you can specify the second parameter as a string:: + + echo form_open('email/send', 'class="email" id="myform"'); + + The above examples would create a form similar to this:: - <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" class="email" id="myform" /> + <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send" class="email" id="myform"> **Adding Hidden Input Fields** @@ -69,6 +73,8 @@ The following functions are available: $hidden = array('username' => 'Joe', 'member_id' => '234'); echo form_open('email/send', '', $hidden); + You can skip the second parameter by passing any falsy value to it. + The above example would create a form similar to this:: <form method="post" accept-charset="utf-8" action="http://example.com/index.php/email/send"> @@ -248,10 +254,10 @@ The following functions are available: Example:: $options = array( - 'small' => 'Small Shirt', - 'med' => 'Medium Shirt', - 'large' => 'Large Shirt', - 'xlarge' => 'Extra Large Shirt', + 'small' => 'Small Shirt', + 'med' => 'Medium Shirt', + 'large' => 'Large Shirt', + 'xlarge' => 'Extra Large Shirt', ); $shirts_on_sale = array('small', 'large'); @@ -389,16 +395,14 @@ The following functions are available: the box should be checked or not. Similar to the other form functions in this helper, you can also pass an - array of attributes to the function - - :: + array of attributes to the function:: $data = array( - 'name' => 'newsletter', - 'id' => 'newsletter', - 'value' => 'accept', - 'checked' => TRUE, - 'style' => 'margin:10px' + 'name' => 'newsletter', + 'id' => 'newsletter', + 'value' => 'accept', + 'checked' => TRUE, + 'style' => 'margin:10px' ); echo form_checkbox($data); @@ -495,11 +499,11 @@ The following functions are available: form to contain:: $data = array( - 'name' => 'button', - 'id' => 'button', - 'value' => 'true', - 'type' => 'reset', - 'content' => 'Reset' + 'name' => 'button', + 'id' => 'button', + 'value' => 'true', + 'type' => 'reset', + 'content' => 'Reset' ); echo form_button($data); diff --git a/user_guide_src/source/helpers/smiley_helper.rst b/user_guide_src/source/helpers/smiley_helper.rst index 7ac91c345..0601f0244 100644 --- a/user_guide_src/source/helpers/smiley_helper.rst +++ b/user_guide_src/source/helpers/smiley_helper.rst @@ -48,7 +48,7 @@ View as described. The Controller -------------- -In your `application/controllers/` folder, create a file called +In your **application/controllers/** directory, create a file called Smileys.php and place the code below in it. .. important:: Change the URL in the :func:`get_clickable_smileys()` @@ -75,7 +75,7 @@ the :doc:`Table Class <../libraries/table>`:: } -In your `application/views/` folder, create a file called `smiley_view.php` +In your **application/views/** folder, create a file called **smiley_view.php** and place this code in it:: <html> |