Initial planting quick form (skeleton).

This commit is contained in:
Michael Stenta 2018-11-25 15:29:43 -05:00
parent 407ac14870
commit b8af7f1fe9
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
/**
* @file
* Farm crop quick forms.
*/
/**
* Implements hook_farm_quick_forms().
*/
function farm_crop_farm_quick_forms() {
return array(
'planting' => array(
'label' => t('Planting'),
'permission' => 'create planting farm assets',
'form' => 'farm_crop_planting_quick_form',
'file' => 'farm_crop.farm_quick.planting.inc',
),
);
}

View File

@ -0,0 +1,43 @@
<?php
/**
* @file
* Farm planting quick form.
*/
/**
* Planting quick form.
*/
function farm_crop_planting_quick_form($form, &$form_state) {
// Wrapper fieldset.
$form['planting'] = array(
'#type' => 'fieldset',
'#title' => t('Record a planting'),
'#description' => t('Use this form to record a planting, along with optional logs associated with it.'),
'#tree' => TRUE,
);
// Submit button.
$form['planting']['submit'] = array(
'#type' => 'submit',
'#value' => t('Create planting'),
);
// Return the form.
return $form;
}
/**
* Planting quick form validate.
*/
function farm_crop_planting_quick_form_validate($form, &$form_state) {
}
/**
* Planting quick form submit.
*/
function farm_crop_planting_quick_form_submit($form, &$form_state) {
}