![Bharat Mediratta](/assets/img/avatar_default.png)
Here's a summary of the changes I made: 1) html::specialchars --> html::chars 2) ORM::orderby() -> ORM::order_by() 3) ORM::where() now takes 3 parameters including a comparator. So ORM::where("a", $b) is now ORM::where("a", "=", $b) and the middle value can be any comparator. 4) ORM::$loaded --> ORM::loaded() 5) Database::instance() --> db::build() (and there are some other subtle differences, like now you always call execute() at the end of the chain) 6) form::close() and form::close_fieldset() are now gone. Use </form> and </fieldset> respectively. 7) Controller::$input is gone. Use Input::instance() instead. I've done very rudimentary testing so far.
49 lines
2.1 KiB
PHP
49 lines
2.1 KiB
PHP
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
|
|
|
<?= form::open($action, array("method" => "post"), $hidden) ?>
|
|
<fieldset>
|
|
<ul>
|
|
<li <? if (!empty($errors["name"])): ?> class="g-error"<? endif ?>>
|
|
<?= form::label("name", t("Name")) ?>
|
|
<?= form::input("name", $form["name"]) ?>
|
|
<? if (!empty($errors["name"]) && $errors["name"] == "required"): ?>
|
|
<p class="g-error"><?= t("Module name is required") ?></p>
|
|
<? endif ?>
|
|
<? if (!empty($errors["name"]) && $errors["name"] == "module_exists"): ?>
|
|
<p class="g-error"><?= t("Module is already implemented") ?></p>
|
|
<? endif ?>
|
|
</li>
|
|
<li <? if (!empty($errors["display_name"])): ?> class="g-error"<? endif ?>>
|
|
<?= form::label("display_name", t("Display name")) ?>
|
|
<?= form::input("display_name", $form["display_name"]) ?>
|
|
<? if (!empty($errors["display_name"]) && $errors["display_name"] == "required"): ?>
|
|
<p class="g-error"><?= t("Module display_name is required")?></p>
|
|
<? endif ?>
|
|
</li>
|
|
<li <? if (!empty($errors["description"])): ?> class="g-error"<? endif ?>>
|
|
<?= form::label("description", t("Description")) ?>
|
|
<?= form::input("description", $form["description"]) ?>
|
|
<? if (!empty($errors["description"]) && $errors["description"] == "required"): ?>
|
|
<p class="g-error"><?= t("Module description is required")?></p>
|
|
<? endif ?>
|
|
</li>
|
|
<li>
|
|
<ul>
|
|
<li>
|
|
<?= form::label("theme[]", t("Theme callbacks")) ?>
|
|
<?= form::dropdown(array("name" => "theme[]", "multiple" => true, "size" => 6), $theme, $form["theme[]"]) ?>
|
|
</li>
|
|
<li>
|
|
<?= form::label("event[]", t("Gallery event handlers")) ?>
|
|
<?= form::dropdown(array("name" => "event[]", "multiple" => true, "size" => 6), $event, $form["event[]"]) ?>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<?= form::submit(array("id" => "g-generate-module", "name" => "generate", "class" => "submit", "style" => "clear:both!important"), t("Generate")) ?>
|
|
</li>
|
|
</ul>
|
|
</fieldset>
|
|
</form>
|
|
|