function _jquery_calendar_form_requirements in jQuery World Calendars API 7
Internal helper: Adds an warning form element of requirements check fails.
Parameters
$form: Form array to inject the element into.
Return value
Boolean value.
2 calls to _jquery_calendar_form_requirements()
- jquery_calendar_form_demo in ./
jquery_calendar.admin.inc - Form callback for jQuery World Calendars demonstration.
- jquery_calendar_form_settings in ./
jquery_calendar.admin.inc - Form callback for jQuery World Calendars administration.
File
- ./
jquery_calendar.admin.inc, line 120 - Contains administration and demonstration form callbacks.
Code
function _jquery_calendar_form_requirements(&$form) {
$requirements = array_pop(_jquery_calendar_requirements_check());
if ($requirements['severity'] == REQUIREMENT_ERROR) {
// Inject the requirements description to a form field.
$form['jquery_calendar_error'] = array(
'#type' => 'item',
'#markup' => $requirements['description'] . ' ' . t('Checkout the <a href="!link">status reports</a>.', array(
'!link' => url('admin/reports/status'),
)),
);
// Indicate the failure.
return FALSE;
}
return TRUE;
}