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


PHP Form::text_input方法代码示例

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


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

示例1: Form

global $row_stats;
// for hit functions
$Form = new Form(NULL, 'antispam_add', 'post', 'compact');
$Form->begin_form('fform', $display_mode == 'js' ? '' : T_('Add a banned keyword'));
$Form->add_crumb('antispam');
$Form->hidden_ctrl();
$Form->hidden('action', 'ban');
$button = array('submit', 'submit', T_('Check & ban...'), 'SaveButton');
if ($display_mode == 'js') {
    $Form->output = false;
    $button_html = $Form->button($button);
    $Form->output = true;
} else {
    $button_html = '';
}
$Form->text_input('keyword', $keyword, 50, T_('Keyword/phrase to ban'), '', array('maxlength' => 80, 'input_suffix' => $button_html));
// TODO: add note
/*
 * TODO: explicitly add a domain?
 * $add_Form->text( 'domain', $domain, 30, T_('Add a banned domain'), 'note..', 80 ); // TODO: add note
 */
if ($display_mode != 'js') {
    $Form->buttons(array($button));
}
$Form->end_form();
$Form = new Form(NULL, 'antispam_ban', 'post', 'compact');
$redirect_to = param('redirect_to', 'url', NULL);
if ($redirect_to == NULL) {
    $redirect_to = regenerate_url('action');
}
$Form->global_icon(T_('Cancel!'), 'close', $redirect_to, '', 3, 2, array('class' => 'action_icon', 'id' => 'close_button'));
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_antispam_ban.form.php

示例2: display

 /**
  * Display the widget!
  *
  * @param array MUST contain at least the basic display params
  */
 function display($params)
 {
     global $Blog, $Settings, $Session, $redirect_to, $dummy_fields;
     if (is_logged_in()) {
         // No display when user is already registered
         return false;
     }
     if ($Settings->get('newusers_canregister') != 'yes' || !$Settings->get('quick_registration')) {
         // Display error message when quick registration is disabled
         echo '<p class="error">' . T_('Quick registration is currently disabled on this system.') . '</p>';
         return false;
     }
     // Restore the typed in params from the redirected page:
     $widget_param_input_err_messages = $Session->get('param_input_err_messages_' . $this->ID);
     $widget_param_input_values = $Session->get('param_input_values_' . $this->ID);
     if (!empty($widget_param_input_err_messages)) {
         // Convert param errors to global $param_input_err_messages that is used to display an error text under input field
         global $param_input_err_messages;
         $param_input_err_messages = $widget_param_input_err_messages;
     }
     // Clear the temp session vars
     $Session->delete('param_input_err_messages_' . $this->ID);
     $Session->delete('param_input_values_' . $this->ID);
     $Session->dbsave();
     $this->init_display($params);
     if (isset($this->BlockCache)) {
         // Do NOT cache some of these links are using a redirect_to param, which makes it page dependent.
         // Note: also beware of the source param.
         // so this will be cached by the PageCache; there is no added benefit to cache it in the BlockCache
         // (which could have been shared between several pages):
         $this->BlockCache->abort_collect();
     }
     echo $this->disp_params['block_start'];
     $redirect_to = param('redirect_to', 'url', regenerate_url('', '', '', '&'));
     $this->disp_title();
     echo $this->disp_params['block_body_start'];
     if (!empty($this->disp_params['intro'])) {
         // Intro text
         echo '<p>' . $this->disp_params['intro'] . '</p>';
     }
     $Form = new Form(get_secure_htsrv_url() . 'register.php', 'register_form', 'post');
     $Form->begin_form();
     $Form->add_crumb('regform');
     $Form->hidden('action', 'quick_register');
     $Form->hidden('inskin', true);
     $Form->hidden('blog', $Blog->ID);
     $Form->hidden('widget', $this->ID);
     $Form->hidden('redirect_to', $redirect_to);
     // E-mail
     $email_value = isset($widget_param_input_values[$dummy_fields['email']]) ? $widget_param_input_values[$dummy_fields['email']] : '';
     $Form->text_input($dummy_fields['email'], $email_value, 50, T_('Your email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true));
     if ($this->disp_params['ask_firstname'] != 'no') {
         // First name
         $firstname_value = isset($widget_param_input_values['firstname']) ? $widget_param_input_values['firstname'] : '';
         $Form->text_input('firstname', $firstname_value, 18, T_('First name'), '', array('maxlength' => 50, 'class' => 'input_text', 'required' => $this->disp_params['ask_firstname'] == 'required'));
     }
     if ($this->disp_params['ask_lastname'] != 'no') {
         // Last name
         $lastname_value = isset($widget_param_input_values['lastname']) ? $widget_param_input_values['lastname'] : '';
         $Form->text_input('lastname', $lastname_value, 18, T_('Last name'), '', array('maxlength' => 50, 'class' => 'input_text', 'required' => $this->disp_params['ask_lastname'] == 'required'));
     }
     // Submit button
     $Form->begin_fieldset('', array('class' => 'fieldset field_register_btn'));
     $Form->button_input(array('value' => $this->disp_params['button'], 'class' => 'submit'));
     $Form->end_fieldset();
     $Form->end_form();
     echo $this->disp_params['block_body_end'];
     echo $this->disp_params['block_end'];
     if (!empty($widget_param_input_err_messages)) {
         // Clear param errors here because we already display them above
         // Don't display them twice on another widget form
         $param_input_err_messages = NULL;
     }
     return true;
 }
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:80,代码来源:_user_register.widget.php

示例3: display_activateinfo

/**
 * Display user activate info form content
 *
 * @param Object activateinfo Form
 */
function display_activateinfo($params)
{
    global $current_User, $Settings, $UserSettings, $Plugins;
    global $secure_htsrv_url, $rsc_path, $rsc_url, $dummy_fields;
    if (!is_logged_in()) {
        // if this happens, it means the code is not correct somewhere before this
        debug_die("You must log in to see this page.");
    }
    // init force request new email address param
    $force_request = param('force_request', 'boolean', false);
    // get last activation email timestamp from User Settings
    $last_activation_email_date = $UserSettings->get('last_activation_email', $current_User->ID);
    if ($force_request || empty($last_activation_email_date)) {
        // notification email was not sent yet, or user needs another one ( forced request )
        $params = array_merge(array('form_action' => $secure_htsrv_url . 'login.php', 'form_name' => 'form_validatemail', 'form_class' => 'fform', 'form_layout' => 'fieldset', 'inskin' => false), $params);
        $Form = new Form($params['form_action'], $params['form_name'], 'post', $params['form_layout']);
        $Form->begin_form($params['form_class']);
        $Form->add_crumb('validateform');
        $Form->hidden('action', 'req_validatemail');
        $Form->hidden('redirect_to', $params['redirect_to']);
        if ($params['inskin']) {
            $Form->hidden('inskin', $params['inskin']);
            $Form->hidden('blog', $params['blog']);
        }
        $Form->hidden('req_validatemail_submit', 1);
        // to know if the form has been submitted
        $Form->begin_fieldset();
        echo '<ol>';
        echo '<li>' . T_('Please confirm your email address below:') . '</li>';
        echo '</ol>';
        // set email text input content only if this is not a forced request. This way the user may have bigger chance to write a correct email address.
        $user_email = $force_request ? '' : $current_User->email;
        // fp> note: 45 is the max length for evopress skin.
        $Form->text_input($dummy_fields['email'], $user_email, 45, T_('Your email'), '', array('maxlength' => 255, 'class' => 'input_text', 'required' => true));
        $Form->end_fieldset();
        // Submit button:
        $submit_button = array(array('name' => 'submit', 'value' => T_('Send me a new activation email now!'), 'class' => 'submit'));
        $Form->buttons_input($submit_button);
        if (!$params['inskin']) {
            $Plugins->trigger_event('DisplayValidateAccountFormFieldset', array('Form' => &$Form));
        }
        $Form->end_form();
        return;
    }
    // get notification email from general Settings
    $notification_email = $Settings->get('notification_sender_email');
    // convert date to timestamp
    $last_activation_email_ts = mysql2timestamp($last_activation_email_date);
    // get difference between local time and server time
    $time_difference = $Settings->get('time_difference');
    // get last activation email local date and time
    $last_email_date = date(locale_datefmt(), $last_activation_email_ts + $time_difference);
    $last_email_time = date(locale_shorttimefmt(), $last_activation_email_ts + $time_difference);
    $user_email = $current_User->email;
    echo '<ol start="1" class="expanded">';
    $instruction = sprintf(T_('Open your email account for %s and find a message we sent you on %s at %s with the following title:'), $user_email, $last_email_date, $last_email_time);
    echo '<li>' . $instruction . '<br /><b>' . sprintf(T_('Activate your account: %s'), $current_User->login) . '</b>';
    $request_validation_url = 'href="' . regenerate_url('', 'force_request=1&validate_required=true&redirect_to=' . $params['redirect_to']) . '"';
    echo '<p>' . sprintf(T_('NOTE: If you don\'t find it, check your "Junk", "Spam" or "Unsolicited email" folders. If you really can\'t find it, <a %s>request a new activation email</a>.'), $request_validation_url) . '</p></li>';
    echo '<li>' . sprintf(T_('Add us (%s) to your contacts to make sure you receive future email notifications, especially when someone sends you a private message.'), '<b><span class="nowrap">' . $notification_email . '</span></b>') . '</li>';
    echo '<li><b class="red">' . T_('Click on the activation link in the email.') . '</b>';
    echo '<p>' . T_('If this does not work, please copy/paste that link into the address bar of your browser.') . '</p>';
    echo '<p>' . sprintf(T_('If you need assistance, please send an email to %s'), '<b><a href="mailto:"' . $notification_email . '"><span class="nowrap">' . $notification_email . '</span></a></b>') . '</p></li>';
    echo '</ol>';
    if ((strpos($user_email, '@hotmail.') || strpos($user_email, '@live.') || strpos($user_email, '@msn.')) && file_exists($rsc_path . 'img/login_help/hotmail-validation.png')) {
        // The user is on hotmail and we have a help screen to show him: (needs to be localized and include correct site name)
        echo '<div class="center" style="margin: 2em auto"><img src="' . $rsc_url . 'img/login_help/hotmail-validation.png" /></div>';
    }
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:74,代码来源:_template.funcs.php

示例4: array

if ($edited_Group->ID == 0) {
    $Form->begin_form('fform', T_('Creating new group'));
} else {
    $title = ($action == 'edit' ? T_('Editing group:') : T_('Viewing group:')) . ' ' . (isset($edited_grp_oldname) ? $edited_grp_oldname : $edited_Group->dget('name')) . ' (' . T_('ID') . ' ' . $edited_Group->ID . ')';
    $Form->begin_form('fform', $title);
}
$Form->add_crumb('group');
$Form->hidden_ctrl();
$Form->hidden('action', 'update');
$Form->hidden('grp_ID', $edited_Group->ID);
$perm_none_option = array('none', T_('No Access'));
$perm_view_option = array('view', T_('View details'));
$perm_edit_option = array('edit', T_('Edit/delete all'));
$Form->begin_fieldset(T_('General') . get_manual_link('group_properties_general'));
$Form->text('edited_grp_name', $edited_Group->name, 50, T_('Name'), '', 50, 'large');
$Form->text_input('edited_grp_level', $edited_Group->get('level'), 2, T_('Group level'), '[0 - 10]', array('required' => true));
display_pluggable_permissions($Form, 'core_general');
$Form->end_fieldset();
$Form->begin_fieldset(T_('Blogging permissions') . get_manual_link('group_properties_blogging'));
$Form->radio('edited_grp_perm_blogs', $edited_Group->get('perm_blogs'), array(array('user', T_('Depending on each blog\'s permissions')), array('viewall', T_('View all blogs')), array('editall', T_('Full Access') . get_admin_badge('coll', '#', '#', T_('Select to give Collection Admin permission')))), T_('Collections'), false);
$Form->radio('perm_xhtmlvalidation', $edited_Group->get('perm_xhtmlvalidation'), array(array('always', T_('Force valid XHTML + strong security'), T_('The security filters below will be strongly enforced.')), array('never', T_('Basic security checking'), T_('Security filters below will still be enforced but with potential lesser accuracy.'))), T_('XHTML validation'), true);
$Form->radio('perm_xhtmlvalidation_xmlrpc', $edited_Group->get('perm_xhtmlvalidation_xmlrpc'), array(array('always', T_('Force valid XHTML + strong security'), T_('The security filters below will be strongly enforced.')), array('never', T_('Basic security checking'), T_('Security filters below will still be enforced but with potential lesser accuracy.'))), T_('XHTML validation on XML-RPC calls'), true);
$Form->checklist(array(array('prevent_css_tweaks', 1, T_('Prevent CSS tweaks'), !$edited_Group->get('perm_xhtml_css_tweaks'), false, T_('WARNING: if allowed, users may deface the site, add hidden text, etc.')), array('prevent_iframes', 1, T_('Prevent iframes'), !$edited_Group->get('perm_xhtml_iframes'), false, T_('WARNING: if allowed, users may do XSS hacks, steal passwords from other users, etc.')), array('prevent_javascript', 1, T_('Prevent javascript'), !$edited_Group->get('perm_xhtml_javascript'), false, T_('WARNING: if allowed, users can easily do XSS hacks, steal passwords from other users, etc.')), array('prevent_objects', 1, T_('Prevent objects'), !$edited_Group->get('perm_xhtml_objects'), false, T_('WARNING: if allowed, users can spread viruses and malware through this blog.'))), 'xhtml_security', T_('Security filters'));
$Form->checkbox('apply_antispam', !$edited_Group->get('perm_bypass_antispam'), T_('Antispam filtering'), T_('Inputs from these users will be checked against the antispam blacklist.'));
// Display pluggable permissions:
display_pluggable_permissions($Form, 'blogging');
$Form->end_fieldset();
$Form->begin_fieldset(T_('Additional permissions') . get_manual_link('group_properties_additional_permissions'));
$Form->radio('edited_grp_perm_stats', $edited_Group->get('perm_stats'), array($perm_none_option, array('user', T_('View stats for specific blogs'), T_('Based on each blog\'s edit permissions')), array('view', T_('View stats for all blogs')), array('edit', T_('Full Access'), T_('Includes deleting/reassigning of stats'))), T_('Stats'), true);
// Display pluggable permissions:
display_pluggable_permissions($Form, 'additional');
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_group.form.php

示例5: Form

// These params need to be memorized and passed through regenerated urls: (this allows to come back to the right list order & page)
param('results_goals_page', 'integer', '', true);
param('results_goals_order', 'string', '', true);
$Form = new Form(NULL, 'goal_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this goal!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('goal')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', $creating ? T_('New goal') : T_('Goal'));
$Form->add_crumb('goal');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',goal_ID' : '')));
// (this allows to come back to the right list order & page)
$GoalCategoryCache =& get_GoalCategoryCache();
$GoalCategoryCache->load_all();
$Form->select_input_object('goal_gcat_ID', $edited_Goal->gcat_ID, $GoalCategoryCache, T_('Category'), array('required' => true));
$Form->text_input('goal_name', $edited_Goal->name, 40, T_('Name'), '', array('maxlength' => 50, 'required' => true));
$Form->text_input('goal_key', $edited_Goal->key, 32, T_('Key'), T_('Should be URL friendly'), array('required' => true));
$Form->text_input('goal_redir_url', $edited_Goal->redir_url, 60, T_('Normal Redirection URL'), '', array('maxlength' => 255, 'class' => 'large', 'required' => true));
$Form->text_input('goal_temp_redir_url', $edited_Goal->temp_redir_url, 60, T_('Temporary Redirection URL'), '', array('maxlength' => 255, 'class' => 'large'));
$Form->date_input('goal_temp_start_date', is_int($edited_Goal->temp_start_ts) ? date2mysql($edited_Goal->temp_start_ts) : $edited_Goal->temp_start_ts, T_('Temporary Start Date'));
$Form->time_input('goal_temp_start_time', is_int($edited_Goal->temp_start_ts) ? date2mysql($edited_Goal->temp_start_ts) : $edited_Goal->temp_start_ts, T_('Temporary Start Time'));
$Form->date_input('goal_temp_end_date', is_int($edited_Goal->temp_end_ts) ? date2mysql($edited_Goal->temp_end_ts) : $edited_Goal->temp_end_ts, T_('Temporary End Date'));
$Form->time_input('goal_temp_end_time', is_int($edited_Goal->temp_end_ts) ? date2mysql($edited_Goal->temp_end_ts) : $edited_Goal->temp_end_ts, T_('Temporary End Time'));
$Form->text_input('goal_default_value', $edited_Goal->default_value, 15, T_('Default value'), '');
$Form->textarea('goal_notes', $edited_Goal->get('notes'), 15, T_('Notes'), '', 50);
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
?>
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_goal.form.php

示例6: get_samedomain_htsrv_url

 */
global $edited_Subregion;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'subregion_checkchanges', 'post', 'compact');
$Form->global_icon(T_('Delete this sub-region!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('subregion')));
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action'));
$Form->begin_form('fform', ($creating ? T_('New sub-region') : T_('Sub-region')) . get_manual_link('subregions-editing'));
$Form->add_crumb('subregion');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',subrg_ID' : '')));
// (this allows to come back to the right list order & page)
$CountryCache =& get_CountryCache();
$Form->select_country('subrg_ctry_ID', $edited_Subregion->ctry_ID, $CountryCache, T_('Country'), array('allow_none' => true, 'required' => true));
$Form->select_input_options('subrg_rgn_ID', get_regions_option_list($edited_Subregion->ctry_ID, $edited_Subregion->rgn_ID, array('none_option_text' => T_('Unknown'))), T_('Region'), '', array('required' => true));
$Form->text_input('subrg_code', $edited_Subregion->code, 6, T_('Code'), '', array('maxlength' => 6, 'required' => true));
$Form->text_input('subrg_name', $edited_Subregion->name, 40, T_('Name'), '', array('maxlength' => 40, 'required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
?>
<script type="text/javascript">
jQuery( '#subrg_ctry_ID' ).change( function ()
{	// Load option list with regions for seleted country
	jQuery.ajax( {
	type: 'POST',
	url: '<?php 
echo get_samedomain_htsrv_url();
?>
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_subregion.form.php

示例7: die

 * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
 *
 * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
 *
 * @package admin
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois PLANQUE.
 *
 * @version $Id: _wpxml_file.view.php 505 2011-12-09 20:54:21Z fplanque $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
global $dispatcher;
$Form = new Form(NULL, '', 'post', NULL, 'multipart/form-data');
$Form->begin_form('fform', T_('WordPress XML Importer'));
$Form->add_crumb('wpxml');
$Form->hidden_ctrl();
$Form->hidden('action', 'import');
$Form->begin_fieldset(T_('Select XML file'));
$Form->text_input('wp_file', '', 20, T_('WordPress XML File'), '', array('type' => 'file', 'required' => true));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Select a blog for import'));
$BlogCache =& get_BlogCache();
$BlogCache->none_option_text = '&nbsp;';
$Form->select_input_object('wp_blog_ID', param('wp_blog_ID', 'integer', 0), $BlogCache, T_('Blog for import'), array('note' => T_('This blog will be used for import.') . ' <a href="' . $dispatcher . '?ctrl=collections&action=new">' . T_('Create new blog') . ' &raquo;</a>', 'allow_none' => true, 'required' => true));
$Form->radio_input('import_type', param('import_type', 'string', 'replace'), array(array('value' => 'replace', 'label' => T_('Replace existing contents'), 'note' => T_('WARNING: this option will permanently remove existing Posts, comments, categories and tags from the selected blog.')), array('value' => 'append', 'label' => T_('Append to existing contents'))), '', array('lines' => true));
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Continue !'), 'SaveButton'), array('reset', '', T_('Reset'), 'ResetButton')));
$Form->end_form();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_wpxml_file.form.php

示例8: CaptchaPayload

 /**
  * When a comment form gets displayed, we inject our captcha and an input field to
  * enter the answer.
  *
  * The question ID is saved into the user's Session and in the DB table "ip_question".
  *
  * @param array Associative array of parameters
  *   - 'Form': the form where payload should get added (by reference, OPTIONALLY!)
  *   - 'form_use_fieldset':
  *   - 'key': A key that is associated to the caller of the event (string, OPTIONALLY!)
  * @param string Form type ( comment|register|message )
  * @return boolean|NULL true, if displayed; false, if error; NULL if it does not apply
  */
 function CaptchaPayload(&$params, $form_type)
 {
     global $DB, $Session;
     if (!$this->does_apply($params, $form_type)) {
         return;
     }
     $question = $this->CaptchaQuestion();
     if (empty($question)) {
         // No the defined questions
         return;
     }
     $this->debug_log('Question ID is: (' . $this->question_ID . ')');
     if (!isset($params['Form'])) {
         // there's no Form where we add to, but we create our own form:
         $Form = new Form(regenerate_url());
         $Form->begin_form();
     } else {
         $Form =& $params['Form'];
         if (!isset($params['form_use_fieldset']) || $params['form_use_fieldset']) {
             $Form->begin_fieldset();
         }
     }
     $Form->info($this->T_('Captcha question'), $question->cptq_question);
     $Form->text_input('captcha_qstn_' . $this->ID . '_answer', param('captcha_qstn_' . $this->ID . '_answer', 'string', ''), 10, $this->T_('Captcha answer'), $this->T_('Please answer on question above.'));
     if (!isset($params['Form'])) {
         // there's no Form where we add to, but our own form:
         $Form->end_form(array(array('submit', 'submit', $this->T_('Validate me'), 'ActionButton')));
     } else {
         if (!isset($params['form_use_fieldset']) || $params['form_use_fieldset']) {
             $Form->end_fieldset();
         }
     }
     return true;
 }
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:47,代码来源:_captcha_qstn.plugin.php

示例9: Form

global $instance_name;
$Form = new Form(NULL, 'settings_checkchanges');
$Form->begin_form('fform', '', array('onsubmit' => 'var es=this.elements; for( var i=0; i < es.length; i++ ) { es[i].disabled=false; };'));
$Form->add_crumb('collectionsettings');
$Form->hidden('ctrl', 'collections');
$Form->hidden('tab', get_param('tab'));
$Form->hidden('action', 'update_settings_site');
// --------------------------------------------
if ($current_User->check_perm('users', 'edit')) {
    $Form->begin_fieldset(T_('Locking down b2evolution for maintenance, upgrade or server switching...') . get_manual_link('system-lock'));
    $Form->checkbox_input('system_lock', $Settings->get('system_lock'), T_('Lock system'), array('note' => T_('check this to prevent login (except for admins) and sending comments/messages. This prevents the DB from receiving updates (other than logging)') . '<br />' . T_('Note: for a more complete lock down, rename the file /conf/_maintenance.html to /conf/maintenance.html (complete lock) or /conf/imaintenance.html (gives access to /install)')));
    $Form->end_fieldset();
}
// --------------------------------------------
$Form->begin_fieldset(T_('Global Site Settings') . get_manual_link('global-site-settings'));
$Form->text_input('site_code', $Settings->get('site_code'), 10, T_('Site code'), '$instance_name = ' . $instance_name, array('maxlength' => 20));
$Form->color_input('site_color', $Settings->get('site_color'), T_('Site color'), T_('E-g: #ff0000 for red'));
$Form->text_input('notification_short_name', $Settings->get('notification_short_name'), 50, T_('Short site name'), T_('Shared with email settings'), array('maxlength' => 127, 'required' => true));
$Form->text_input('notification_long_name', $Settings->get('notification_long_name'), 50, T_('Long site name'), T_('Shared with email settings'), array('maxlength' => 255));
$Form->text_input('notification_logo', $Settings->get('notification_logo'), 50, T_('Small site logo (URL)'), T_('Shared with email settings'), array('maxlength' => 5000));
$Form->text_input('notification_logo_large', $Settings->get('notification_logo_large'), 50, T_('Large site logo (URL)'), '', array('maxlength' => 5000));
$Form->text_input('site_footer_text', $Settings->get('site_footer_text'), 50, T_('Site footer text'), '', array('maxlength' => 5000));
$Form->checkbox_input('site_skins_enabled', $Settings->get('site_skins_enabled'), T_('Enable site skins'), array('note' => T_('Enables a sitewide header and footer')));
$Form->text_input('site_terms', $Settings->get('site_terms'), 7, T_('Terms & Conditions'), T_('Enter ID of the page containing the terms & conditions.'), array('maxlength' => 11));
$Form->end_fieldset();
// --------------------------------------------
$Form->begin_fieldset(T_('Default collections') . get_manual_link('default-collections'));
$BlogCache =& get_BlogCache();
$create_new_blog_link = ' <a href="' . $admin_url . '?ctrl=collections&action=new">' . T_('Create new collection') . ' &raquo;</a>';
$Form->select_input_object('default_blog_ID', $Settings->get('default_blog_ID'), $BlogCache, get_icon('coll_default') . ' ' . T_('Default collection to display'), array('note' => T_('This collection will be displayed on index.php.') . $create_new_blog_link, 'allow_none' => true, 'loop_object_method' => 'get_maxlen_name'));
$Form->select_input_object('info_blog_ID', $Settings->get('info_blog_ID'), $BlogCache, get_icon('coll_info') . ' ' . T_('Collection for info pages'), array('note' => T_('The pages in this collection will be added to the site menu.') . $create_new_blog_link, 'allow_none' => true, 'loop_object_method' => 'get_maxlen_name'));
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_coll_settings_site.form.php

示例10: die

 * under any OSI approved OSS license (http://www.opensource.org/licenses/).
 * }}
 *
 * @package maintenance
 *
 * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
 * @author fplanque: Francois Planque.
 *
 * @version $Id: _upgrade_svn.form.php 2193 2012-10-19 11:01:47Z yura $
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var action
 */
global $action;
switch ($action) {
    case 'start':
        global $updates, $UserSettings;
        $Form = new Form(NULL, 'upgrade_form', 'post', 'compact');
        $Form->hiddens_by_key(get_memorized('action'));
        $Form->begin_form('fform', T_('Upgrade from SVN') . get_manual_link('upgrade-from-svn'));
        $Form->text_input('svn_url', $UserSettings->get('svn_upgrade_url'), 80, T_('URL of repository'), T_('e.g. https://server.com/svn/repository/'), array('maxlength' => 300, 'required' => true));
        $Form->text_input('svn_folder', $UserSettings->get('svn_upgrade_folder'), 80, T_('SVN folder'), T_('e.g. trunk/blogs/'), array('maxlength' => 300));
        $Form->text_input('svn_user', $UserSettings->get('svn_upgrade_user'), 32, T_('Login'), '', array('maxlength' => 300));
        $Form->password_input('svn_password', get_param('svn_password'), 32, T_('Password'), '', array('maxlength' => 300));
        $Form->text_input('svn_revision', $UserSettings->get('svn_upgrade_revision'), 7, T_('Revision'), T_('Leave blank to get the latest revision'));
        $Form->end_form(array(array('submit', 'actionArray[upgrade_svn]', T_('Export revision from SVN...'), 'SaveButton')));
        break;
}
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_upgrade_svn.form.php

示例11: die

 *
 * @copyright (c)2003-2015 by Francois Planque - {@link http://fplanque.com/}
 *
 * @package admin
 */
if (!defined('EVO_MAIN_INIT')) {
    die('Please, do not access this page directly.');
}
/**
 * @var GoalCategory
 */
global $edited_GoalCategory;
// Determine if we are creating or updating...
global $action;
$creating = in_array($action, array('cat_new', 'cat_copy', 'cat_create', 'cat_create_new', 'cat_create_copy'));
$Form = new Form(NULL, 'goalcat_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this goal category!'), 'delete', regenerate_url('action', 'action=cat_delete&amp;' . url_crumb('goalcat')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,gcat_ID'));
$Form->begin_form('fform', $creating ? T_('New goal category') : T_('Goal category'));
$Form->add_crumb('goalcat');
$Form->hiddens_by_key(get_memorized('action' . ($creating ? ',gcat_ID' : '')));
// (this allows to come back to the right list order & page)
$Form->text_input('gcat_name', $edited_GoalCategory->name, 40, T_('Name'), '', array('maxlength' => 50, 'required' => true));
$Form->color_input('gcat_color', $edited_GoalCategory->color, T_('Color'), T_('E-g: #ff0000 for red'), array('required' => true));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[cat_create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[cat_create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[cat_create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[cat_update]', T_('Save Changes!'), 'SaveButton')));
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_stats_goalcats.form.php

示例12: sprintf

        $form_title_item_ID = sprintf(T_('Duplicating Item %s'), '<a href="' . $admin_url . '?ctrl=items&amp;blog=' . $Blog->ID . '&amp;p=' . $original_item_ID . '" class="post_type_link">#' . $original_item_ID . '</a>');
    } else {
        // Set form title for creating new item:
        $form_title_item_ID = T_('New Item');
    }
}
$Form->begin_fieldset($form_title_item_ID . get_manual_link('post-contents-panel') . '<span class="pull-right">' . sprintf(T_('Type: %s'), $item_type_link) . '</span>', array('id' => 'itemform_content'));
$Form->switch_layout('none');
echo '<table cellspacing="0" class="compose_layout" align="center"><tr>';
$display_title_field = $edited_Item->get_type_setting('use_title') != 'never';
if ($display_title_field) {
    // Display title
    $field_required = $edited_Item->get_type_setting('use_title') == 'required' ? $required_star : '';
    echo '<td width="1%" class="label">' . $field_required . '<strong>' . T_('Title') . ':</strong></td>';
    echo '<td width="97%" class="input">';
    $Form->text_input('post_title', $item_title, 20, '', '', array('maxlength' => 255, 'style' => 'width: 100%;'));
    echo '</td>';
} else {
    // Hide title
    $Form->hidden('post_title', $item_title);
}
// -- Language chooser BEGIN --
$locale_options = locale_options($edited_Item->get('locale'), false, true);
if (is_array($locale_options)) {
    // We've only one enabled locale.
    // Tblue> The locale name is not really needed here, but maybe we
    //        want to display the name of the only locale?
    $Form->hidden('post_locale', $locale_options[0]);
    //pre_dump( $locale_options );
} else {
    // More than one locale => select field.
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_item_expert.form.php

示例13: Form

}
$current_User->check_perm('options', 'edit', true);
global $Settings;
$BlogCache =& get_BlogCache();
$Form = new Form(NULL, 'msg_settings');
$Form->begin_form('fform', '');
$Form->add_crumb('msgsettings');
$Form->hidden('ctrl', 'msgsettings');
$Form->hidden('action', 'update');
$Form->begin_fieldset(T_('General settings'));
// set link to options
$messages_link_to = $Settings->get('messages_link_to');
$admin_selected = $messages_link_to == 'admin' ? 'selected="selected"' : '';
$link_to_options = '<option value="admin" ' . $admin_selected . '>admin</option>';
$link_to_options .= $BlogCache->get_option_list($messages_link_to);
$Form->select_input_options('messages_link_to', $link_to_options, T_('Messaging emails link to'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Welcome message after account activation'));
$Form->checkbox_input('welcomepm_enabled', $Settings->get('welcomepm_enabled'), T_('Send Welcome PM'), array('note' => T_('Check to automatically send a welcome message to users when they activate their account.')));
$UserCache =& get_UserCache();
$User = $UserCache->get_by_login($Settings->get('welcomepm_from'));
if (!$User) {
    // Use login of the current user if user login is incorrect
    $User = $current_User;
}
$Form->username('welcomepm_from', $User, T_('From'), T_('User login.'));
$Form->text_input('welcomepm_title', $Settings->get('welcomepm_title'), 58, T_('Title'), '', array('maxlength' => 5000));
$Form->textarea_input('welcomepm_message', $Settings->get('welcomepm_message'), 15, T_('Message'), array('cols' => 45));
$Form->end_fieldset();
$Form->buttons(array(array('submit', 'submit', T_('Save !'), 'SaveButton')));
$Form->end_form();
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:_msg_settings.form.php

示例14: array

        echo '<div class="red center">' . T_('This is just a test run. Nothing will be posted to the database nor will your inbox be altered') . '</div>';
    }
    // Display scrollable div
    echo '<div style="padding: 6px; margin:5px; border: 1px solid #CCC; overflow:scroll; height: 350px">' . $eblog_test_output . '</div>';
}
$Form->end_fieldset();
$Form->begin_fieldset(T_('General settings') . get_manual_link('post-by-email-general-settings'));
if (extension_loaded('imap')) {
    $imap_extenssion_status = T_('(INSTALLED)');
} else {
    $imap_extenssion_status = '<b class="red">' . T_('(NOT INSTALLED)') . '</b>';
}
$Form->checkbox_input('eblog_enabled', $Settings->get('eblog_enabled'), T_('Enable Post by email'), array('note' => sprintf(T_('Note: This feature needs the php_imap extension %s.'), $imap_extenssion_status)));
$eblog_test_mode_value = isset($eblog_saved_test_mode_value) ? $eblog_saved_test_mode_value : $Settings->get('eblog_test_mode');
$Form->checkbox_input('eblog_test_mode', $eblog_test_mode_value, T_('Test Mode'), array('note' => T_('Check to run Post by Email in test mode. Nothing will be posted to the database nor will your inbox be altered.')));
$Form->text_input('eblog_server_host', $Settings->get('eblog_server_host'), 25, T_('Mail Server'), T_('Hostname or IP address of your incoming mail server.'), array('maxlength' => 255));
$Form->radio('eblog_method', $Settings->get('eblog_method'), array(array('pop3', T_('POP3')), array('imap', T_('IMAP'))), T_('Retrieval method'));
$Form->radio('eblog_encrypt', $Settings->get('eblog_encrypt'), array(array('none', T_('None')), array('ssl', T_('SSL')), array('tls', T_('TLS'))), T_('Encryption method'));
$eblog_novalidatecert_params = array('lines' => true);
if ($Settings->get('eblog_encrypt') == 'none') {
    $eblog_novalidatecert_params['disabled'] = 'disabled';
}
$Form->radio_input('eblog_novalidatecert', $Settings->get('eblog_novalidatecert'), array(array('value' => 0, 'label' => T_('Do not validate the certificate from the TLS/SSL server. Check this if you are using a self-signed certificate.')), array('value' => 1, 'label' => T_('Validate that the certificate from the TLS/SSL server can be trusted. Use this if you have a correctly signed certificate.'))), T_('Certificate validation'), $eblog_novalidatecert_params);
$Form->text_input('eblog_server_port', $Settings->get('eblog_server_port'), 5, T_('Port Number'), T_('Port number of your incoming mail server (Defaults: POP3: 110, IMAP: 143, SSL/TLS: 993).'), array('maxlength' => 6));
$Form->text_input('eblog_username', $Settings->get('eblog_username'), 25, T_('Account Name'), T_('User name for authenticating on your mail server. Usually it\'s your email address or a part before the @ sign.'), array('maxlength' => 255));
$Form->password_input('eblog_password', $Settings->get('eblog_password'), 25, T_('Password'), array('maxlength' => 255, 'note' => T_('Password for authenticating on your mail server.')));
$Form->checkbox('eblog_delete_emails', $Settings->get('eblog_delete_emails'), T_('Delete processed emails'), T_('Check this if you want processed messages to be deleted form server after successful processing.'));
$Form->end_fieldset();
$Form->begin_fieldset(T_('Posting settings') . get_manual_link('post-by-email-posting-settings'));
// TODO: provide a list of categories to choose from
$Form->text_input('eblog_default_category', $Settings->get('eblog_default_category'), 5, T_('Default Category ID'), sprintf(T_('This is a default category for your posts.') . '<br />' . T_('You can use the following code in message body to define categories: %s. In this example 2 will be main category and 5, 47 extra categories.'), '<b>&lt;category&gt;2, 5, 47&lt;/category&gt;</b>'), array('maxlength' => 6));
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_eblog.form.php

示例15: die

    die('Please, do not access this page directly.');
}
/**
 * @var Organization
 */
global $edited_Organization;
// Determine if we are creating or updating...
global $action;
$creating = is_create_action($action);
$Form = new Form(NULL, 'organization_checkchanges', 'post', 'compact');
if (!$creating) {
    $Form->global_icon(T_('Delete this organization!'), 'delete', regenerate_url('action', 'action=delete&amp;' . url_crumb('organization')));
}
$Form->global_icon(T_('Cancel editing!'), 'close', regenerate_url('action,org_ID'));
$Form->begin_form('fform', ($creating ? T_('New organization') : T_('Organization')) . get_manual_link('organization-form'));
$Form->add_crumb('organization');
$Form->hiddens_by_key(get_memorized('action'));
// (this allows to come back to the right list order & page)
$Form->text_input('org_name', $edited_Organization->name, 32, T_('Name'), '', array('maxlength' => 255, 'required' => true));
$Form->text_input('org_url', $edited_Organization->url, 32, T_('Url'), '', array('maxlength' => 2000));
if ($creating) {
    $Form->end_form(array(array('submit', 'actionArray[create]', T_('Record'), 'SaveButton'), array('submit', 'actionArray[create_new]', T_('Record, then Create New'), 'SaveButton'), array('submit', 'actionArray[create_copy]', T_('Record, then Create Similar'), 'SaveButton')));
} else {
    $Form->end_form(array(array('submit', 'actionArray[update]', T_('Save Changes!'), 'SaveButton')));
}
if ($edited_Organization->ID > 0) {
    // Display users of this organization
    users_results_block(array('org_ID' => $edited_Organization->ID, 'filterset_name' => 'orgusr_' . $edited_Organization->ID, 'results_param_prefix' => 'orgusr_', 'results_title' => T_('Users of this organization') . get_manual_link('users_and_groups'), 'results_order' => '/uorg_accepted/D', 'page_url' => get_dispctrl_url('organizations', 'action=edit&amp;org_ID=' . $edited_Organization->ID), 'display_orgstatus' => true, 'display_ID' => false, 'display_btn_adduser' => false, 'display_btn_addgroup' => false, 'display_blogs' => false, 'display_source' => false, 'display_regdate' => false, 'display_regcountry' => false, 'display_update' => false, 'display_lastvisit' => false, 'display_contact' => false, 'display_reported' => false, 'display_group' => false, 'display_level' => false, 'display_status' => false, 'display_actions' => false, 'display_newsletter' => false));
}
// AJAX changing of an accept status of organizations for each user
echo_user_organization_js();
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:_organization.form.php


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