Mercurial > defr > drupal > core
comparison includes/form.inc @ 13:8b6c45761e01 6.6
Drupal 6.6
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:32:33 +0100 |
parents | 589fb7c02327 |
children | 4347c45bb494 |
comparison
equal
deleted
inserted
replaced
12:4ca9f57cc4d4 | 13:8b6c45761e01 |
---|---|
1 <?php | 1 <?php |
2 // $Id: form.inc,v 1.265.2.12 2008/09/23 10:51:16 goba Exp $ | 2 // $Id: form.inc,v 1.265.2.13 2008/10/16 12:43:08 goba Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @defgroup forms Form builder functions | 5 * @defgroup forms Form builder functions |
6 * @{ | 6 * @{ |
7 * Functions that build an abstract representation of a HTML form. | 7 * Functions that build an abstract representation of a HTML form. |
2011 $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"'; | 2011 $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="'. $element['#maxlength'] .'"'; |
2012 $class = array('form-text'); | 2012 $class = array('form-text'); |
2013 $extra = ''; | 2013 $extra = ''; |
2014 $output = ''; | 2014 $output = ''; |
2015 | 2015 |
2016 if ($element['#autocomplete_path']) { | 2016 if ($element['#autocomplete_path'] && menu_valid_path(array('link_path' => $element['#autocomplete_path']))) { |
2017 drupal_add_js('misc/autocomplete.js'); | 2017 drupal_add_js('misc/autocomplete.js'); |
2018 $class[] = 'form-autocomplete'; | 2018 $class[] = 'form-autocomplete'; |
2019 $extra = '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) .'" disabled="disabled" />'; | 2019 $extra = '<input class="autocomplete" type="hidden" id="'. $element['#id'] .'-autocomplete" value="'. check_url(url($element['#autocomplete_path'], array('absolute' => TRUE))) .'" disabled="disabled" />'; |
2020 } | 2020 } |
2021 _form_set_class($element, $class); | 2021 _form_set_class($element, $class); |