当前位置: 首页>>代码示例>>PHP>>正文


PHP Forge::set_attr方法代码示例

本文整理汇总了PHP中Forge::set_attr方法的典型用法代码示例。如果您正苦于以下问题:PHP Forge::set_attr方法的具体用法?PHP Forge::set_attr怎么用?PHP Forge::set_attr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Forge的用法示例。


在下文中一共展示了Forge::set_attr方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _form

 private static function _form()
 {
     $form = new Forge("reauthenticate/auth", "", "post", array("id" => "g-reauthenticate-form"));
     $form->set_attr('class', "g-narrow");
     $group = $form->group("reauthenticate")->label(t("Re-authenticate"));
     $group->password("password")->label(t("Password"))->id("g-password")->class(null)->callback("auth::validate_too_many_failed_auth_attempts")->callback("user::valid_password")->error_messages("invalid", t("Incorrect password"))->error_messages("too_many_failed_auth_attempts", t("Too many incorrect passwords.  Try again later"));
     $group->submit("")->value(t("Submit"));
     return $form;
 }
开发者ID:andyst,项目名称:gallery3,代码行数:9,代码来源:reauthenticate.php

示例2: Forge

 static function get_login_form($url)
 {
     $form = new Forge($url, "", "post", array("id" => "g-login-form"));
     $form->set_attr('class', "g-narrow");
     $group = $form->group("login")->label(t("Login"));
     $group->input("name")->label(t("Username"))->id("g-username")->class(null);
     $group->password("password")->label(t("Password"))->id("g-password")->class(null);
     $group->inputs["name"]->error_messages("invalid_login", t("Invalid name or password"));
     $group->submit("")->value(t("Login"));
     return $form;
 }
开发者ID:CardinS2U,项目名称:gallery3,代码行数:11,代码来源:user.php

示例3: Forge

 static function get_login_form($url)
 {
     $form = new Forge($url, "", "post", array("id" => "g-login-form"));
     $form->set_attr("class", "g-narrow");
     $group = $form->group("login")->label(t("Login"));
     $group->input("name")->label(t("Username"))->id("g-username")->class(null)->callback("auth::validate_too_many_failed_logins")->error_messages("too_many_failed_logins", t("Too many failed login attempts.  Try again later"));
     $group->password("password")->label(t("Password"))->id("g-password")->class(null);
     $group->inputs["name"]->error_messages("invalid_login", t("Invalid name or password"));
     $group->submit("")->value(t("Login"));
     return $form;
 }
开发者ID:andyst,项目名称:gallery3,代码行数:11,代码来源:auth.php

示例4: _get_edit_form

 private function _get_edit_form($user)
 {
     $form = new Forge("users/update/{$user->id}", "", "post", array("id" => "g-edit-user-form"));
     $form->set_attr("class", "g-narrow");
     $group = $form->group("edit_user")->label(t("Edit User: %name", array("name" => $user->name)));
     $group->input("full_name")->label(t("Full Name"))->id("g-fullname")->value($user->full_name);
     self::_add_locale_dropdown($group, $user);
     $group->password("password")->label(t("Password"))->id("g-password");
     $group->password("password2")->label(t("Confirm Password"))->id("g-password2")->matches($group->password);
     $group->input("email")->label(t("Email"))->id("g-email")->value($user->email);
     $group->input("url")->label(t("URL"))->id("g-url")->value($user->url);
     $form->add_rules_from($user);
     module::event("user_edit_form", $user, $form);
     $group->submit("")->value(t("Save"));
     return $form;
 }
开发者ID:CardinS2U,项目名称:gallery3,代码行数:16,代码来源:users.php

示例5: Forge

 static function get_add_form_admin()
 {
     $form = new Forge("admin/users/add_group", "", "post", array("id" => "g-add-group-form"));
     $form->set_attr('class', "g-narrow");
     $form_group = $form->group("add_group")->label(t("Add Group"));
     $form_group->input("name")->label(t("Name"))->id("g-name");
     $form_group->inputs["name"]->error_messages("in_use", t("There is already a group with that name"));
     $form_group->submit("")->value(t("Add Group"));
     $group = ORM::factory("group");
     $form->add_rules_from($group);
     return $form;
 }
开发者ID:brocki,项目名称:gallery3,代码行数:12,代码来源:group.php


注:本文中的Forge::set_attr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。