public function close($button_title = 'Save', $extrabuttons = null) { if (!empty($button_title)) { $button = new \Html\button(); $button->type("submit")->text($button_title)->setClass('tiny button savebutton'); $cancel_button = new \Html\button(); $cancel_button->setClass('tiny button cancelbutton'); $cancel_button->type("button")->text("Cancel")->js("if(\$('#cmfive-modal').is(':visible')){ \$('#cmfive-modal').foundation('reveal', 'close'); } else { window.history.back(); }"); return "<div class='row small-12 columns'>{$button->__toString()}{$cancel_button->__toString()}{$extrabuttons}</div></form>"; } else { return "</form>"; } }
public static function b($href, $title, $confirm = null, $id = null, $newtab = false, $class = null, $type = null) { $button = new \Html\button(); $button->href($href)->text($title)->confirm($confirm)->id($id)->setClass($class)->newtab($newtab)->type($type); return $button->__toString(); }