3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Change 'tab' to 'label' in quick form definitions.

This commit is contained in:
Michael Stenta 2018-03-21 09:44:45 -04:00
parent 87e39a711a
commit cfb9171a77
3 changed files with 5 additions and 5 deletions

View file

@ -10,7 +10,7 @@
function farm_livestock_farm_quick_forms() {
return array(
'birth' => array(
'tab' => t('Birth'),
'label' => t('Birth'),
'permission' => 'create farm_birth log entities',
'form' => 'farm_livestock_birth_form',
'file' => 'farm_livestock.farm_quick.inc',

View file

@ -29,7 +29,7 @@ function hook_farm_quick_forms() {
'myform' => array(
// This will be displayed as the title of the tab under "Quick forms".
'tab' => t('My form'),
'label' => t('My form'),
// This permission will be required to access the form.
'permission' => 'create farm_harvest log entities',

View file

@ -42,8 +42,8 @@ function farm_quick_forms() {
*/
function farm_quick_forms_sort($a, $b) {
// Sort alphabetically by the 'tab' property.
return strcasecmp($a['tab'], $b['tab']);
// Sort alphabetically by the 'label' property.
return strcasecmp($a['label'], $b['label']);
}
/**
@ -69,7 +69,7 @@ function farm_quick_menu() {
// Build a menu item definition.
$menu_item = array(
'title' => $form['tab'],
'title' => $form['label'],
'page callback' => 'drupal_get_form',
'page arguments' => array($form['form']),
'access arguments' => array($form['permission']),