<?php $view_types = array(VIEW::TYPE_BODY => "Body", VIEW::TYPE_POPUP => "Popup", VIEW::TYPE_BLANK => "Blank", VIEW::TYPE_COMPONENT => "Component"); if ($is_mva_component) { $data[] = array("MVA Components", HTML_UTIL::get_checkboxes("mva_components", array("V" => "View", "A" => "Action"), $mva_components)); } $task_name_div = HTML_UTIL::get_div("", array("id" => "task_name")); $data[] = array("ACL Roles", HTML_UTIL::dropdown("security_roles", $security_roles, $selected_security_roles, array("class" => "w100p"), count($security_roles), true)); if ($show_view_type) { $data[] = array("Type", HTML_UTIL::dropdown("view_type", $view_types, $view_type, array("class" => "w100p"))); } $data[] = array("Controller", HTML_UTIL::input("controller", $controller, array("class" => "w100p"))); $data[] = array($task_name_div, HTML_UTIL::input("task", $task, array("class" => "w100p"))); $data[] = array("Location", HTML_UTIL::dropdown("location", CMODEL_GENERATOR::get_locations(), "", array("class" => "wa"))); $data[] = array("", HTML_UTIL::get_checkbox("override", "1", $override, [], "Override")); $data[] = array("", HTML_UTIL::get_button("cmd_generate", "Generate", array("class" => "btn-primary"))); $html_table = new HTML_TABLE_UTIL(); $html_table->set_data($data); $html_table->set_row_id_prefix("row-"); $html_table->set_column_attribute(0, "width", 120); $html_table->set_padding(2); $html_table->set_class(""); $html_table->render();
<h1>Model Creation</h1> <form id="form-model"> <?php $model_type_list = HTML_UTIL::get_checkboxes("model_types", array("c" => "Complex", "h" => "Handler"), $model_types, array()); $data[] = array("Model Type", $model_type_list); $data[] = array("Model", HTML_UTIL::get_input("model", $model, array("style" => "width:300px"))); $data[] = array("Extends Model", HTML_UTIL::get_input("extends", $extends, array("style" => "width:300px"))); $data[] = array("Location:", HTML_UTIL::dropdown("location", CMODEL_GENERATOR::get_locations(), "", array("class" => "wa"))); $data[] = array("", HTML_UTIL::get_checkbox("override", "1", $override, [], "Override")); $data[] = array("", HTML_UTIL::link("javascript:;", "Generate", array("class" => "btn btn-primary", "id" => "generate"))); $db_table = HTML_TABLE_UTIL::create()->set_data($data)->set_padding(3)->set_class(""); $tablename_dd_count = count($tablename_list); $tablename_dd = HTML_UTIL::dropdown("tablename", $tablename_list, $tablename, array("onKeyUp" => "update_class_name(this)", "onChange" => "update_class_name(this)", "size" => 30), $tablename_dd_count); HTML_TABLE_UTIL::create()->set_data(array(array("Table Name: ", $tablename_dd, $db_table->get_html())))->set_default_column_attribute("class", "vat")->set_padding(3)->set_class("")->render(); ?> </form> <script> function update_class_name(obj) { $("#model").val(get_singular($(obj).val())); update_links($(obj).val(),get_singular($(obj).val())); } $("input[name='model']").on("input",function() { update_links("",$(this).val()); }); $("#generate").click(function() { $.post("/generate/domodel",$("#form-model").serializeArray(),function(response) {
<h1>Complex Model</h1> <form id="form-cmodel"> <div class="fl w300 pr20"> <h3>C-Models</h3> <?php echo HTML_UTIL::dropdown("cmodel", $cmodels, $model, array("size" => 30), count($cmodels)); ?> </div> <div> <h3>Addons</h3> <?php $db_table = FORM_UTIL::create()->checkboxes("types", "Type", array("image" => "Image"))->custom(HTML_UTIL::h4("Image"), array("class" => "row-image"))->input("image[name]", "Name", "", array("placeholder" => "ie. avatar", "class" => "row-image w400"))->input("image[sizes]", "Sizes", "tiny:s25,small:s100,medium:s300,large:600,actual", array("placeholder" => "ie. tiny:s25,small:s100,medium:s300,large:600,actual", "class" => "row-image w400"))->input("image[path]", "Path", "", array("placeholder" => "ie. us/av", "class" => "row-image w400")); ?> <?php echo $db_table->button("generate", "Generate", array("type" => "button"))->render(); ?> </div> </form> <script> $(function() { $(".row-image").parents("tr").hide(); $("input[name='types[]']").click(function() { if($(this).is(":checked"))
<?php echo HTML_UTIL::dropdown("joiner", $joiner_list, $joiner, array(), 15); ?> </div> <div class="fl ml20"> <div id="joiner_fields"></div> </div> </div> <div class="model"> <h3>Reference Model</h3> <div class="fl"> <div class="lbl">Model</div> <?php echo HTML_UTIL::dropdown("reference_model", $model_list, $reference_model, array(), 15); ?> </div> <div class="fl ml20"> <div class="lbl">Model Field</div> <div id="reference_fields"></div> </div> </div> <div class="cb pt30"><?php echo HTML_UTIL::get_button("generate", "Generate", array("class" => "btn-primary")); ?> </div> <script>
<div class="pt10 cb"> <table> <tr> <td> Key Bit Size </td> <td> <?php echo HTML_UTIL::dropdown("key_size", array(2048 => 2048, 1024 => 1024)); ?> <a href="javascript:;" data-type="key" class="generate btn">Generate Key</a> <a href="javascript:;" data-type="key" class="download btn">Download Key</a> </td> </tr> </table> <div class=""> <?php echo HTML_UTIL::textarea("key", "", array("id" => "key", "class" => "w600 h500")); ?> </div>