Révision 76e2e7c3
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/rules/ui/ui.data.inc | ||
---|---|---|
300 | 300 |
} |
301 | 301 |
} |
302 | 302 |
|
303 |
/** |
|
304 |
* UI for IP addresses. |
|
305 |
*/ |
|
306 |
class RulesDataUIIPAddress extends RulesDataUIText { |
|
307 |
|
|
308 |
public static function inputForm($name, $info, $settings, RulesPlugin $element) { |
|
309 |
$form = parent::inputForm($name, $info, $settings, $element); |
|
310 |
if (empty($info['options list'])) { |
|
311 |
$form[$name]['#type'] = 'textfield'; |
|
312 |
$form[$name]['#description'] = t('If not provided, the IP address of the current user will be used.'); |
|
313 |
} |
|
314 |
$form[$name]['#element_validate'][] = 'rules_ui_element_ip_address_validate'; |
|
315 |
$form[$name]['#rows'] = 1; |
|
316 |
return $form; |
|
317 |
} |
|
318 |
} |
|
319 |
|
|
303 | 320 |
/** |
304 | 321 |
* UI for boolean data. |
305 | 322 |
*/ |
Formats disponibles : Unified diff
Weekly update of contrib modules