mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Initial planting quick form (skeleton).
This commit is contained in:
parent
407ac14870
commit
b8af7f1fe9
2 changed files with 62 additions and 0 deletions
19
modules/farm/farm_crop/farm_crop.farm_quick.inc
Normal file
19
modules/farm/farm_crop/farm_crop.farm_quick.inc
Normal 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',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
43
modules/farm/farm_crop/farm_crop.farm_quick.planting.inc
Normal file
43
modules/farm/farm_crop/farm_crop.farm_quick.planting.inc
Normal 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) {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue