| @@ -66,15 +66,11 @@ | ||
| 66 | 66 | $return = array(); |
| 67 | 67 | |
| 68 | 68 | foreach( $menu as $k => $item ){ |
| 69 | 69 | // form |
| 70 | - if( count($item) >= 3 ){ | |
| 71 | - $href = $item[0]; | |
| 72 | - $formContent = $item[1]; | |
| 73 | - $btnLabel = $item[2]; | |
| 70 | + if( count($item) == 3 ){ | |
| 71 | + list( $href, $formContent, $btnLabel ) = $item; | |
| 74 | 72 | |
| 75 | - $confirm = ( isset($item[3]) && $item[3] ) ? true : false; | |
| 76 | - | |
| 77 | 73 | if( ! $hidden ){ |
| 78 | 74 | $btn = $this->makeInputSubmit($btnLabel) |
| 79 | 75 | ->tag('nice-link') |
| 80 | 76 | // ->tag('secondary') |
| @@ -79,13 +75,8 @@ | ||
| 79 | 75 | ->tag('nice-link') |
| 80 | 76 | // ->tag('secondary') |
| 81 | 77 | // ->tag('align', 'left') |
| 82 | 78 | ; |
| 83 | - | |
| 84 | - if( $confirm ){ | |
| 85 | - $btn->addAttr( 'onclick', ' return confirm(\'' . $btnLabel . '?\')' ); | |
| 86 | - } | |
| 87 | - | |
| 88 | 79 | $formContent = $formContent ? $this->makeListInline( array($formContent, $btn) ) : $btn; |
| 89 | 80 | } |
| 90 | 81 | |
| 91 | 82 | $item = $this->makeForm( $href, $formContent ); |
| @@ -99,15 +90,8 @@ | ||
| 99 | 90 | // continue; |
| 100 | 91 | // } |
| 101 | 92 | list( $href, $btnLabel ) = $item; |
| 102 | 93 | |
| 103 | - // display just label | |
| 104 | - // if (false === $href) { | |
| 105 | - // $item = $btnLabel; | |
| 106 | - // $return[$k] = $item; | |
| 107 | - // continue; | |
| 108 | - // } | |
| 109 | - | |
| 110 | 94 | if( is_array($href) ){ |
| 111 | 95 | $finalHref = str_replace( '--ID--', $href[1], $href[0] ); |
| 112 | 96 | } |
| 113 | 97 | else { |
| @@ -371,14 +355,8 @@ | ||
| 371 | 355 | |
| 372 | 356 | public function makeInputText( $name, $label = NULL, $value = NULL ) |
| 373 | 357 | { |
| 374 | 358 | $return = new HC3_Ui_Element_Input_Text( $this, $name, $label, $value ); |
| 375 | - return $return; | |
| 376 | - } | |
| 377 | - | |
| 378 | - public function makeInputNumber( $name, $label = NULL, $value = NULL ) | |
| 379 | - { | |
| 380 | - $return = new HC3_Ui_Element_Input_Number( $this, $name, $label, $value ); | |
| 381 | 359 | return $return; |
| 382 | 360 | } |
| 383 | 361 | |
| 384 | 362 | public function makeInputPassword( $name, $label = NULL ) |