Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function chucknorris_permission() {
- return array(
- 'access chucknorris module' => array(
- 'title' => t('Access Chuck Norris Module'),
- 'description' => t('Access to proba list items.'),
- ),
- );
- }
- function chucknorris_menu() {
- $items['chucknorris'] = array(
- 'title' => 'Warning! Chuck Norris will kick Your Ass!',
- 'page callback' => 'drupal_get_form',
- 'access arguments' => array('access content'),
- 'page arguments' => array('chucknorris_urlap'),
- );
- return $items;
- }
- function chucknorris_urlap($form, &$forms_state) {
- $form['norris'] = array(
- '#type' => 'select',
- '#title' => t('How many kicks do you want?'),
- '#default_value' => t('0'),
- '#options' => array(
- '0' => '0',
- '1' => '1',
- '2' => '2',
- '3' => '3',
- '4' => '4'
- ),
- '#attached' => array(
- 'js' => array(
- drupal_get_path('module', 'chucknorris') . '/chucknorris.js',
- ),
- ),
- '#description' => t('Please select the number of chucknorris rounded kicks!'),
- );
- $form['chx_1'] = array(
- '#type' => 'checkbox',
- '#title' => t("The first"),
- '#required' => FALSE,
- );
- $form['chx_2'] = array(
- '#type' => 'checkbox',
- '#title' => t("The second"),
- '#required' => FALSE,
- );
- $form['chx_3'] = array(
- '#type' => 'checkbox',
- '#title' => t("The third"),
- '#required' => FALSE,
- );
- $form['chx_4'] = array(
- '#type' => 'checkbox',
- '#title' => t("The fourth"),
- '#required' => FALSE,
- );
- return $form;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement