Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
# Madlib

The madlib module uses the Drupal Form API to display text about Giraffes in a fun way.

It is currently working with the minimum desired functionality. On both JS enabled clients and JS disabled clients.

POSSIBLE ADDITIONS:

* Errors output to screen on each element during ajax callback
* Add AJAX to the submit button
* Recognition (intelligence) of JS enabled clients versus JS disabled clients (possible form value)

REFACTOR:

* Separate user input ajax from submit ajax
* Separate validation into two categories the entire form versus a single element
34 changes: 34 additions & 0 deletions madlib.admin.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php
/**
* @file
* Administration pages for the madlib module.
*/

/**
* Page callback for madlib administration settings.
*/
function madlib_admin_settings() {
$form = array();

$form['madlib_checkbox'] = array(
'#type' => 'checkbox',
'#title' => t('Debug mode'),
'#default_value' => variable_get('madlib_checkbox', 0),
'#description' => t('Turn on/off debug mode'),
);

return system_settings_form($form);
}

/**
* Madlib administration menu block page.
*/
function madlib_admin_menu_block_page() {
$build = array(
'header_text' => array(
'#type' => 'markup',
'#markup' => '<p>' . l(t('Madlib Settings'), 'admin/config/madlib/settings') . '</p>',
),
);
return $build;
}
2 changes: 1 addition & 1 deletion madlib.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ description = Madlib form
core = 7.x
package = Custom

configure = admin/madlib
configure = admin/config/madlib/settings
Loading