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


PHP label_for函数代码示例

本文整理汇总了PHP中label_for函数的典型用法代码示例。如果您正苦于以下问题:PHP label_for函数的具体用法?PHP label_for怎么用?PHP label_for使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: render

 public function render()
 {
     $metaTitle = $this->metatag != null ? $this->metatag->getMetaTitle() : '';
     $metaKeywords = $this->metatag != null ? $this->metatag->getMetaKeywords() : '';
     $metaDescription = $this->metatag != null ? $this->metatag->getMetaDescription() : '';
     return sprintf($this->skeleton, label_for('meta_title', __('Title:')), input_tag('w3s_meta_title', $metaTitle, 'size=34'), label_for('meta_meta_keywords', __('Keywords:')), textarea_tag('w3s_meta_keywords', $metaKeywords, 'size=31x10'), label_for('meta_meta_description', __('Description:')), textarea_tag('w3s_meta_description', $metaDescription, 'size=31x10'), link_to_function(__('Store metatags'), 'currentTab.save()', 'class="link_button"'));
 }
开发者ID:jmp0207,项目名称:w3studiocms,代码行数:7,代码来源:w3sMetatagsManager.class.php

示例2: op_smt_diary_get_post_image_form

function op_smt_diary_get_post_image_form($diaryImages)
{
    $html = array();
    if (!sfConfig::get('app_diary_is_upload_images')) {
        return $html;
    }
    $html[] = '<table class="file_list">';
    $max = sfConfig::get('app_diary_max_image_file_num', 3);
    for ($i = 1; $i <= $max; $i++) {
        $tagName = 'diary_photo_' . $i;
        $html[] = '<tr>';
        $label = label_for(__('Photo') . $i, $tagName);
        $html[] = content_tag('td', $label, array('class' => 'file_label'));
        $html[] = '<td>';
        if (isset($diaryImages[$i])) {
            $diaryImage = op_api_diary_image($diaryImages[$i], '48x48');
            $html[] = content_tag('p', link_to($diaryImage['imagetag'], $diaryImage['filename'], array('rel' => 'lightbox[image]')));
            $html[] = content_tag('input', '', array('type' => 'checkbox', 'name' => $tagName . '_photo_delete', 'id' => $tagName . '_photo_delete'));
            $html[] = label_for('&nbsp;' . __('remove the current photo'), $tagName . '_photo_delete');
        }
        $attr = array('type' => 'file', 'name' => $tagName, 'id' => $tagName);
        $html[] = content_tag('input', '', $attr);
        $html[] = '</td></tr>';
    }
    $html[] = '</table>';
    return $html;
}
开发者ID:te-koyama,项目名称:openpne,代码行数:27,代码来源:opSmtDiaryHelper.php

示例3: _wpo_edit_cat_row

function _wpo_edit_cat_row($category, $level, &$data)
{
    $category = get_category($category);
    $name = $category->cat_name;
    echo '
	<li class="required pad' . $level . '">
    ' . checkbox_tag('campaign_categories[]', $category->cat_ID, in_array($category->cat_ID, $data['categories']), 'id=category_' . $category->cat_ID) . '
    ' . label_for('category_' . $category->cat_ID, $name) . '</li>';
}
开发者ID:DArcMattr,项目名称:wp-o-matic,代码行数:9,代码来源:edit.helper.php

示例4: sf_simple_cms_slot

function sf_simple_cms_slot($page, $slot, $default_text = null, $default_type = 'Text')
{
    $context = sfContext::getInstance();
    $request = $context->getRequest();
    $culture = $request->getAttribute('culture');
    $slot_object = $page->getSlot($slot, constant(sfConfig::get('app_sfSimpleCMS_escaping_strategy', 'ESC_RAW')));
    if (!$slot_object) {
        $slot_object = new sfSimpleCMSSlot();
        $slot_object->setType($default_type);
        $slot_object->setCulture($culture);
    }
    $slot_value = $slot_object->getValue();
    $slot_type_name = $slot_object->getType();
    $slot_type_class = 'sfSimpleCMSSlot' . $slot_type_name;
    $slot_type = new $slot_type_class();
    if ($request->getParameter('edit') == 'true' && !$request->getParameter('preview')) {
        echo '<div class="editable_slot" title="' . __('Double-click to edit') . '" id="slot_' . $slot . '" onDblClick="Element.show(\'edit_' . $slot . '\');Element.hide(\'slot_' . $slot . '\');">';
        if ($slot_value) {
            // Get slot value from the slot type object
            echo $slot_type->getSlotValue($slot_object);
        } else {
            // default text
            echo $default_text ? $default_text : sfConfig::get('app_sfSimpleCMS_default_text', __('[add text here]'));
        }
        echo '</div>';
        echo form_remote_tag(array('url' => 'sfSimpleCMS/updateSlot', 'script' => 'true', 'update' => 'slot_' . $slot, 'success' => 'Element.show(\'slot_' . $slot . '\');
                        Element.hide(\'edit_' . $slot . '\');
                       ' . visual_effect('highlight', 'slot_' . $slot)), array('class' => 'edit_slot', 'id' => 'edit_' . $slot, 'style' => 'display:none'));
        echo input_hidden_tag('slug', $page->getSlug(), 'id=edit_path' . $slot);
        echo input_hidden_tag('slot', $slot);
        if (sfConfig::get('app_sfSimpleCMS_use_l10n', false)) {
            echo input_hidden_tag('sf_culture', $slot_object->getCulture());
        }
        // Get slot editor from the slot type object
        echo $slot_type->getSlotEditor($slot_object);
        echo label_for('slot_type', __('Type: '));
        echo select_tag('slot_type', options_for_select(sfConfig::get('app_sfSimpleCMS_slot_types', array('Text' => __('Simple Text'), 'RichText' => __('Rich text'), 'Php' => __('PHP code'), 'Image' => __('Image'), 'Modular' => __('List of partials/components'))), $slot_type_name));
        if ($rich = sfConfig::get('app_sfSimpleCMS_rich_editing', false)) {
            // activate rich text if global rich_editing is true and is the current slot is RichText
            $rich = $slot_type_name == 'RichText';
        }
        echo submit_tag('update', array('onclick' => $rich ? 'tinymceDeactivate()' . ';submitForm(\'edit_' . $slot . '\'); return false' : '', 'class' => 'submit_tag'));
        echo button_to_function('cancel', 'Element.hide(\'edit_' . $slot . '\');Element.show(\'slot_' . $slot . '\');', 'class=submit_tag');
        echo '</form>';
    } else {
        echo $slot_type->getSlotValue($slot_object);
    }
}
开发者ID:net7,项目名称:Talia-CMS,代码行数:48,代码来源:sfSimpleCMSHelper.php

示例5: render

 /**
  * Renders the editor
  * 
  * @return string
  *
  */
 public function render()
 {
     $idLanguage = 0;
     $isMain = 0;
     $languageName = '';
     if ($this->language != null) {
         $idLanguage = $this->language->getId();
         $isMain = $this->language->getMainLanguage();
         $languageName = $this->language->getLanguage();
     }
     $setEnabled = $idLanguage == 0 || $idLanguage != 0 && $isMain == 0 ? '' : 'DISABLED';
     $function = $idLanguage == 0 ? link_to_function(__('Add Language'), 'W3sLanguage.add()', 'class="link_button"') : link_to_function(__('Edit Language'), 'W3sLanguage.edit()', 'class="link_button"');
     $additionalInfo = $idLanguage == 0 ? '<div id="w3s_message"><p class="error_message">' . __('PAY ATTENTION: This operation will also insert all contents for the new language. These contents will be copied from the main language of your website.') . '</p></div>' : '';
     $checked = $isMain == 1 ? 'CHECKED' : '';
     return sprintf($this->editorSkeleton, label_for('language_name', __('Language name:')), input_tag('w3s_language_name', $languageName), label_for('main_language', __('Main language:')), sprintf('<input name="w3s_main_language" id="w3s_main_language" %s type="checkbox" %s />', $setEnabled, $checked), $function, $additionalInfo);
 }
开发者ID:jmp0207,项目名称:w3studiocms,代码行数:22,代码来源:w3sLanguagesEditor.class.php

示例6: use_helper

// auto-generated by sfPropelCrud
// date: 2008/04/04 15:24:10
use_helper('I18N', 'Javascript', 'Form', 'Object');
?>

<div id="member-search" style="padding-bottom: 10px;">
  <div class="blue-shadow"><div class="blue-title blue-content">Search for a member</div></div>
  <div class="blue-shadow">
    <div class="blue-content">
      <?php 
echo form_remote_tag(array('update' => 'pager-holder', 'url' => 'user/ajaxUserPager', 'loading' => "Element.show('form-search-indicator')", 'complete' => "Element.hide('form-search-indicator');" . visual_effect('highlight', 'pager-holder')));
?>
        <fieldset id='ajax_filter_fieldset' style="border: medium none;">
            <span>
              <?php 
echo label_for('user_name', 'Name'), input_auto_complete_tag('user_name', '', 'user/autoMessageComplete?field=name', 'autocomplete=false', 'use_style=true');
?>
            </span>
            <?php 
/*
            <span>
            <label for="campus">campus: <?php echo select_tag('user_campus', objects_for_select(CampusPeer::doSelect(new Criteria()), 'getId', 'getName', '', array('include_blank'=>true)), array('class'=>'xxx')) ?></label>
            <label for="department">department: <?php echo select_tag('user_department', objects_for_select(DepartmentPeer::doSelect(new Criteria()), 'getId', 'getName', '', array('include_blank'=>true)), array('class'=>'xxx')) ?></label>
            </span>
*/
?>
            <span id="update_button">
              <?php 
echo submit_tag('Search', array());
?>
            </span>
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:_list_filter.php

示例7: form_tag

<div class="sf_admin_filters">
<!--
<?php 
echo form_tag('tablas/list', array('method' => 'get'));
?>

  <fieldset>
    <h2><?php 
echo __('filters');
?>
</h2>
     <div class="form-row">
    <?php 
echo label_for('filters[id_empresa]', __('empresa'), '');
?>
    <div class="content">
    <?php 
$id_empresa = isset($filters['id_empresa']) ? $filters['id_empresa'] : null;
$c = EmpresaPeer::getCriterioAlcance();
$empresas = EmpresaPeer::doSelect($c);
$value = select_empresas('filters[id_empresa]', objects_for_select($empresas, 'getIdEmpresa', '__toString', $id_empresa, array('include_blank' => true)), array('control_name' => 'filters[id_empresa]', 'include_blank' => true));
echo $value ? $value : "&nbsp;";
?>
    </div>
    </div>
   
    
    
  </fieldset>

  <ul class="sf_admin_actions">
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:31,代码来源:_filters.php

示例8: textarea_tag

echo textarea_tag('body', '', 'id=topic_body');
?>
  
  <?php 
if (!isset($topic) && $sf_user->hasCredential('moderator')) {
    ?>
    <div class="option">
      <?php 
    echo checkbox_tag('is_sticked', '1');
    ?>
      <?php 
    echo label_for('is_sticked', __('Sticked topic', null, 'sfSimpleForum'));
    ?>
    </div>
    <div class="option">
      <?php 
    echo checkbox_tag('is_locked', '1');
    ?>
      <?php 
    echo label_for('is_locked', __('Locked topic', null, 'sfSimpleForum'));
    ?>
    </div>
  <?php 
}
?>
  
  <?php 
echo submit_tag(__('Post', null, 'sfSimpleForum'), 'id=topic_submit');
?>
  
</form>
开发者ID:kriswallsmith,项目名称:sfSimpleForumPlugin,代码行数:31,代码来源:_add_post_form.php

示例9: fieldset_tag

?>
    <div class="form-row">
    <?php 
echo fieldset_tag('Manage your private data');
?>
    <ul>
      <li><?php 
echo label_for('edit_topo_name', __('topoName_desc'), array('class' => 'fieldname', 'id' => '_topo_name')) . ' ' . input_tag('edit_topo_name', $user_private_data->get('topo_name'), array('class' => 'medium_input'));
?>
</li>
      <li><?php 
echo label_for('edit_nickname', __('nickName_desc'), array('class' => 'fieldname', 'id' => '_nick_name')) . ' ' . input_tag('edit_nickname', $user_private_data->get('username'), array('class' => 'medium_input'));
?>
</li>
      <li><?php 
echo label_for('login_name', __('LoginName_desc'), array('class' => 'fieldname', 'id' => '_login_name')) . '<strong>' . $user_private_data->getLoginName() . '</strong>';
?>
</li>
    </ul>
    <?php 
echo end_fieldset_tag();
echo fieldset_tag('Manage your profile page');
echo object_group_tag($user_private_data, 'is_profile_public', array('callback' => 'object_checkbox_tag'));
echo end_fieldset_tag();
?>
    
    <ul class="action_buttons">
      <li><?php 
echo c2c_submit_tag(__('Save'), array('picto' => 'action_create'));
?>
</li>
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:31,代码来源:editPrivateDataSuccess.php

示例10: cryptographp_picture

    </div>
    <?php 
}
?>
    <?php 
if (!$sf_params->get('id')) {
    ?>
    <div class="row right_col">
        <?php 
    echo cryptographp_picture();
    echo cryptographp_reload();
    ?>
    </div>
    <div class="row">
        <?php 
    echo label_for('captcha', __('Type the code shown') . required());
    ?>
        <?php 
    echo input_tag('captcha', $sf_params->get('captcha'));
    ?>
        <?php 
    echo form_error('captcha');
    ?>
    </div>
    <?php 
}
?>
    <div class="row right_col">
        <?php 
echo submit_tag(__('Save'));
?>
开发者ID:hoydaa,项目名称:snippets.hoydaa.org,代码行数:31,代码来源:editSuccess.php

示例11: __

<fieldset id="sf_fieldset_preferencias" class="">
<h2><?php 
echo __('Preferencias');
?>
</h2>

<div class="form-row">
  <?php 
echo label_for('usuario[id_idioma]', __($labels['usuario{id_idioma}']), 'class="required" ');
?>
  <div class="content">

  <?php 
$value = $usuario->getIdioma();
echo $value ? $value : '&nbsp;';
?>
    </div>
</div>



</fieldset>



开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:22,代码来源:_show_form_preferencias.php

示例12: render

 /**
  * Renders the images editor
  * 
  * @return string
  *
  */
 public function render()
 {
     return sprintf($this->editorSkeleton, label_for('page_name', __('Page name:')), input_tag('w3s_page_name', ''), label_for('group_name', __('Group name:')), select_tag('w3s_groups_select', objects_for_select(W3sGroupPeer::getActiveGroups(), 'getId', 'getGroupName')), link_to_function(__('Add Page'), 'W3sPage.add()', 'class="link_button"'));
 }
开发者ID:jmp0207,项目名称:w3studiocms,代码行数:10,代码来源:w3sPageEditor.class.php

示例13: __

?>
  </div>
</div>

</fieldset>


<fieldset id="sf_fieldset_usuario_grupos" class="">
<h2><?php 
echo __('Lista de destinatarios');
?>
</h2>

<div class="form-row">
  <?php 
echo label_for('mensaje[destinatarios]', __($labels['mensaje{destinatarios}']) . ":", '');
?>
  <div class="content<?php 
if ($sf_request->hasError('mensaje{destinatarios}')) {
    ?>
 form-error<?php 
}
?>
">
  <?php 
if ($sf_request->hasError('mensaje{destinatarios}')) {
    ?>
    <?php 
    echo form_error('mensaje{destinatarios}', array('class' => 'form-error-msg'));
    ?>
  <?php 
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:31,代码来源:_edit_form.php

示例14: form_tag

</div>
<?php 
}
?>
 
<?php 
echo form_tag('informes/mostrar', 'method=get id=sf_admin_edit_form name=sf_admin_edit_form multipart=true');
?>
<legend>Debe completar los siguiente datos</legend>

<fieldset id="sf_fieldset_none" class="">
<?php 
foreach ($variables as $idx => $variable) {
    ?>
<div class="form-row"><?php 
    echo label_for($idx, __($idx . ':'));
    if (!is_array($variable)) {
        echo input_tag($variable);
    } else {
        echo select_tag($idx, options_for_select($variable));
    }
    ?>
</div><?php 
}
?>
    
</fieldset>



<?php 
开发者ID:mediasadc,项目名称:alba,代码行数:31,代码来源:variablesSuccess.php

示例15: form_tag

    echo form_tag('features/saveNew');
    ?>
      
      <?php 
    echo label_for('type', __('What do you want us to know about?'), array('style' => 'display:block;')), select_tag('type', options_for_select(array(sfConfig::get('app_feature_type_bug') => __('A Bug Report'), sfConfig::get('app_feature_type_feature') => __('A Feature Request'))));
    ?>

  <?php 
    echo label_for('type', __('What category is this in?'), array('style' => 'display:block;')), select_tag('category', options_for_select(array(sfConfig::get('app_feature_category_other') => __('Other'), sfConfig::get('app_feature_category_design') => __('Design'), sfConfig::get('app_feature_category_projects') => __('Projects'), sfConfig::get('app_feature_category_inbox') => __('Inbox'))));
    ?>
     
      <?php 
    echo label_for('title', __('What do you call your feature?'), array('style' => 'display:block;')), object_input_tag($new_feature, 'getTitle', array('size' => '30x3', 'style' => 'border:1px solid black;'));
    ?>
        <?php 
    echo label_for('description', __('Describe your feature in depth'), array('style' => 'display:block;')), object_textarea_tag($new_feature, 'getDescription', array('size' => '30x3'));
    ?>
      <?php 
    echo submit_tag('save', array('class' => 'btn'));
    ?>
      </form>
    </div>
  </div>
</div>
<?php 
}
foreach ($features as $feature) {
    ?>
<div class="suggested-feature" id="feature_<?php 
    echo $feature->getUuid();
    ?>
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:listSuccess.php


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