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


PHP radiobutton_tag函数代码示例

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


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

示例1: radiobuttons_history_tag

function radiobuttons_history_tag($row_nb, $version)
{
    switch ($row_nb) {
        case 1:
            $old_checked = false;
            $new_checked = true;
            break;
        case 2:
            $old_checked = true;
            $new_checked = false;
            break;
        default:
            $old_checked = $new_checked = false;
    }
    echo radiobutton_tag('old', $version, $old_checked) . ' ' . radiobutton_tag('new', $version, $new_checked);
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:16,代码来源:HistoryHelper.php

示例2: radiobutton_tag

?>
</label><br/>
			<?php 
echo radiobutton_tag('status', StudentLeave::STATUS_PROPOSED, $student_leave->getStatus() == StudentLeave::STATUS_PROPOSED);
?>
Diajukan
			<?php 
echo radiobutton_tag('status', StudentLeave::STATUS_APPROVED, $student_leave->getStatus() == StudentLeave::STATUS_APPROVED);
?>
Disetujui
			<?php 
echo radiobutton_tag('status', StudentLeave::STATUS_ACTIVE, $student_leave->getStatus() == StudentLeave::STATUS_ACTIVE);
?>
Aktif
			<?php 
echo radiobutton_tag('status', StudentLeave::STATUS_DONE, $student_leave->getStatus() == StudentLeave::STATUS_DONE);
?>
Selesai
			<?php 
echo radiobutton_tag('status', StudentLeave::STATUS_CANCELED, $student_leave->getStatus() == StudentLeave::STATUS_CANCELED);
?>
Batal
			<?php 
echo form_error('status');
?>
		</td></tr>
	</tbody>
	</table>
</td></tr>
</table>
</form>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:editSuccess.php

示例3: elseif

    if ($OC->isPle()) {
        $style = " background-color: #FFC4C4; ";
    } elseif ($OC->getIsRestringit() && !CursosPeer::getRestrictedNotes($IDU, $OC->getIdCursos())) {
        $style = " background-color: #FFC670; ";
    } else {
        $style = "";
    }
    ?>
	                                            
	                    <div style="margin-top:3px; clear: both; <?php 
    echo $style;
    ?>
" class="linia_curs">
	                        <div style="float: left;">                            
	                            <?php 
    echo radiobutton_tag('matricules[idC]', $OC->getIdcursos(), false, array('class' => 'matricula'));
    ?>
	                        </div>
	                        <div style="padding-left:5px; float: left; width:100px;">
	                            <b><?php 
    echo $OC->getCodi();
    ?>
</b><br />
	                            <div style="font-size:8px; color:gray;"><?php 
    echo $OC->getDatainici('d/m/Y');
    ?>
</div>
	                        </div>
	                        <div style="padding-left:5px; float: left; width:400px;">
	                            <?php 
    echo $OC->getTitolcurs() . '<span style="color:gray; font-size:8px;"> | ' . $OC->getHoraris() . ' </span> ';
开发者ID:nagiro,项目名称:hospici_cultural,代码行数:31,代码来源:_matriculesLlistatCursos.php

示例4: radiobutton_tag

    $field = 'genders' . $row . '[]';
    ?>
      <?php 
    echo radiobutton_tag($field, $entity['id'] . ':' . '1', false);
    ?>
 F <br />
      <?php 
    echo radiobutton_tag($field, $entity['id'] . ':' . '2', false);
    ?>
 M <br />
      <?php 
    echo radiobutton_tag($field, $entity['id'] . ':' . '0', false);
    ?>
 X <br />
      <?php 
    echo radiobutton_tag($field, $entity['id'] . ':' . '?', false);
    ?>
 ? <br />
      <?php 
    echo link_to('search', 'http://google.com/images?q=' . urlencode($entity['name']), 'target=_blank');
    ?>
    </td>
    
    <td>
      <?php 
    echo entity_link($entity);
    ?>
    </td>
    
    <td>
      <?php 
开发者ID:silky,项目名称:littlesis,代码行数:31,代码来源:theyRuleGendersSuccess.php

示例5: array

// checkbox_tag()
$t->diag('checkbox_tag()');
$t->is(checkbox_tag('name'), '<input type="checkbox" name="name" id="name" value="1" />', 'checkbox_tag() takes a name as its first argument');
$t->is(checkbox_tag('name', 'foo'), '<input type="checkbox" name="name" id="name" value="foo" />', 'checkbox_tag() takes a value as its second argument');
$t->is(checkbox_tag('name', null, true), '<input type="checkbox" name="name" id="name" value="" checked="checked" />', 'checkbox_tag() takes a boolean as its third argument');
// options
$t->is(checkbox_tag('name', null, false, array('class' => 'foo')), '<input type="checkbox" name="name" id="name" value="" class="foo" />', 'checkbox_tag() takes an array of attribute options as its fourth argument');
$t->is(checkbox_tag('name', null, false, array('id' => 'foo')), '<input type="checkbox" name="name" id="foo" value="" />', 'checkbox_tag() can override the "id" attribute');
// radiobutton_tag()
$t->diag('radiobutton_tag()');
$t->is(radiobutton_tag('name', 1), '<input type="radio" name="name" id="name_1" value="1" />', 'radiobutton_tag() takes a name as its first argument');
$t->is(radiobutton_tag('name', 2), '<input type="radio" name="name" id="name_2" value="2" />', 'radiobutton_tag() takes a value as its second argument');
$t->is(radiobutton_tag('name', null, true), '<input type="radio" name="name" id="name" value="" checked="checked" />', 'radiobutton_tag() takes a boolean as its third argument');
// options
$t->is(radiobutton_tag('name', null, false, array('class' => 'foo')), '<input type="radio" name="name" id="name" value="" class="foo" />', 'radiobutton_tag() takes an array of attribute options as its fourth argument');
$t->is(radiobutton_tag('name', null, false, array('id' => 'foo')), '<input type="radio" name="name" id="foo" value="" />', 'radiobutton_tag() can override the "id" attribute');
// input_date_range_tag()
$t->diag('input_date_range_tag()');
$t->unlike(input_date_range_tag('date', array('from' => time(), 'to' => time()), array('after' => 'foo')), '/after/', 'input_date_range_tag() output date fields for a date range');
// input_date_tag()
$t->diag('input_date_tag()');
$t->todo('input_date_tag()');
// submit_tag()
$t->diag('submit_tag()');
$t->is(submit_tag(), '<input type="submit" name="commit" value="Save changes" />', 'submit_tag() default value is "Save changes"');
$t->is(submit_tag("save"), '<input type="submit" name="commit" value="save" />', 'submit_tag() takes a value as its first argument');
// options
$t->is(submit_tag('save', array('class' => 'foo')), '<input type="submit" name="commit" value="save" class="foo" />', 'submit_tag() takes an array of attribute options as its second argument');
$t->is(submit_tag('save', array('name' => 'foo')), '<input type="submit" name="foo" value="save" />', 'submit_tag() can override the "name" attribute');
// reset_tag()
$t->diag('reset_tag()');
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:31,代码来源:FormHelperTest.php

示例6: __

?>
<br/>
	<div>
            <label for="mood"><?php 
echo __('Настроение');
?>
:</label>
            <div class='mood'>
                <?php 
echo radiobutton_tag('mood', 'good', false, array('class' => 'styled_good'));
?>
                <?php 
echo radiobutton_tag('mood', 'normal', true, array('class' => 'styled_normal'));
?>
                <?php 
echo radiobutton_tag('mood', 'bad', false, array('class' => 'styled_bad'));
?>
            </div>
            <?php 
echo __('Картинка');
?>
: <?php 
echo input_file_tag('picture', array("style" => 'display:none'));
?>
&nbsp;
            <?php 
echo link_to_function(__('из файла'), 'showPictureUpload()', array('id' => 'more_file'));
?>
&nbsp;
            <?php 
echo input_tag('picture_url', null, array("style" => 'display:none'));
开发者ID:auphau,项目名称:joyreactor,代码行数:31,代码来源:_addPost.php

示例7: radiobutton_tag

  <div>
    <?php 
echo radiobutton_tag('return_type', CriteriaBuilder::RETURN_ARRAY, true);
?>
Propel object array
    <fieldset>
    <legend><?php 
echo radiobutton_tag('return_type', CriteriaBuilder::RETURN_RESULTSET);
?>
Propel ResultSet</legend>
    <div><?php 
echo radiobutton_tag('resultset_type', CriteriaBuilder::RESULTSET_NUM, true);
?>
Numerically indexed array (slightly faster)
    <?php 
echo radiobutton_tag('resultset_type', CriteriaBuilder::RESULTSET_ASSOC);
?>
Associative array (more maintainable)</div>
    </fieldset>
  </div>
  <div>
  Criterion variable prefix: <?php 
echo input_tag('crit_prefix', 'crit');
?>
  </div>
  <?php 
echo submit_tag('Generate');
?>
</div>
</form>
</fieldset>
开发者ID:eburhan,项目名称:Propel-Criteria-Builder,代码行数:31,代码来源:indexSuccess.php

示例8: radiobutton_tag

<?php

$type = $agent->getType() ? $agent->getType() : 'Individual';
echo radiobutton_tag("agent[type]", "Individual", $type == 'Individual');
?>
&nbsp;Individual&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php 
echo radiobutton_tag("agent[type]", "Organization", $type == 'Organization');
?>
&nbsp;Organization
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:10,代码来源:_type.php

示例9: radiobutton_tag

	<fieldset id="search-autocompleter-fbox">
	  <?php 
if (isset($limit)) {
    ?>
  	  <input id="limit" name="limit" value="<?php 
    echo $limit;
    ?>
" type="hidden"/>	   
	  <?php 
}
?>
    <input id="tag_search" name="tag_search" class="ac_input blur" value="<?php 
echo $tags;
?>
"/>
    <label for="ramo_C">Camera</label>
    <?php 
echo radiobutton_tag('ramo', 'C', $ramo == 'C');
?>
    <label for="ramo_S">Senato</label>
    <?php 
echo radiobutton_tag('ramo', 'S', $ramo == 'S');
?>
    <?php 
echo submit_image_tag('btn-cerca-small.png', array('alt' => 'cerca', 'id' => 'aggiungi', 'name' => 'aggiungi'));
?>
	</fieldset>
</form>
      

开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:28,代码来源:_searchWithAutocompleter.php

示例10: radiobutton_tag

<?php

$check_value = $finance->getDebit();
$check_value ? $check_value = $check_value : ($check_value = '1');
echo radiobutton_tag('debit', '1', $check_value == '1' ? true : false);
echo __("ÊÕ");
echo radiobutton_tag('debit', '2', $check_value == '2' ? true : false);
echo __("Ö§");
开发者ID:BackupTheBerlios,项目名称:flushcms,代码行数:8,代码来源:_debit.php

示例11: __

echo __('Relation');
?>
</label></td>
                                                                <td style="text-align:center; vertical-align:middle;">:</td>
                                                                <td style="vertical-align:middle;">
                                                                         <?php 
echo radiobutton_tag('relation', EmployeeChilds::RELATION_SON1, $employee_childs->getRelation() == EmployeeChilds::RELATION_SON1) . ' ' . __('RELATION_SON1');
?>
                                                                        <?php 
echo radiobutton_tag('relation', EmployeeChilds::RELATION_SON2, $employee_childs->getRelation() == EmployeeChilds::RELATION_SON2) . ' ' . __('RELATION_SON2');
?>
                                                                        <?php 
echo radiobutton_tag('relation', EmployeeChilds::RELATION_SON3, $employee_childs->getRelation() == EmployeeChilds::RELATION_SON3) . ' ' . __('RELATION_SON3');
?>
                                                                        <?php 
echo radiobutton_tag('relation', EmployeeChilds::RELATION_SON4, $employee_childs->getRelation() == EmployeeChilds::RELATION_SON4) . ' ' . __('RELATION_SON4');
?>
                                                                        <?php 
echo radiobutton_tag('relation', EmployeeChilds::RELATION_SON5, $employee_childs->getRelation() == EmployeeChilds::RELATION_SON5) . ' ' . __('RELATION_SON5');
?>
                                                                    
                                                                        <?php 
echo form_error('relation');
?>
                                                                </td>
                                                     </tr>
            </tbody>
            </table>
    </td></tr>
    </table>
    </form>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:editChildsSuccess.php

示例12: form_error

  <?php 
if ($sf_request->hasError('campo{tipo_items}')) {
    ?>
    <?php 
    echo form_error('campo{tipo_items}', array('class' => 'form-error-msg'));
    ?>
  <?php 
}
?>
  <?php 
$lista_tipos = CampoPeer::getTiposItems();
$value = "<ul class=\"sf_admin_checklist\">\n";
$tipo_items_campo = $campo->getTipoItems() ? $campo->getTipoItems() : CampoPeer::getDefaultIdTipoItems();
foreach ($lista_tipos as $id => $nombre_tipo) {
    $value .= "<li>";
    $value .= radiobutton_tag('campo[tipo_items]', $id, $tipo_items_campo == $id, array('id' => 'campo_tipo_items_' . $id));
    $value .= label_for('campo_tipo_items_' . $id, __($nombre_tipo), '');
    $value .= "</li>\n";
}
$value .= "</ul>\n";
echo $value ? $value : '-';
?>
  <div class="sf_edit_help"><?php 
echo __('Indique el tipo de los elementos de la lista');
?>
</div>
  </div>
</div>

<div class="form-row" >
  <?php 
开发者ID:Esleelkartea,项目名称:legedia-ESLE,代码行数:31,代码来源:_edit_campo_form.php

示例13: frontend_radio

function frontend_radio($name, $input = null, $value, $options = array(), $methode = null)
{
    $context = sfContext::getInstance();
    $request = $context->getRequest();
    $errors = $request->getErrors();
    if (array_key_exists("err" . $name, $errors)) {
        $options["class"] .= " error";
    }
    $code = getDivLabel($options, $name);
    $code .= radiobutton_tag($name, $value, $value == getVal($input, $methode, $name), clearOptions($options));
    return $code;
}
开发者ID:kotow,项目名称:work,代码行数:12,代码来源:FrontendFormHelper.php

示例14: __

    ?>
      </div>
    </div>
  
    <div class="form-row">
      <label for="position"><?php 
    echo __('Position');
    ?>
</label>
      <div class="content">
        <?php 
    echo radiobutton_tag('position_type', 'after');
    ?>
After
        <?php 
    echo radiobutton_tag('position_type', 'under', 'selected=selected');
    ?>
Under
      </div>
      <div class="content">
        <?php 
    echo select_tag('position', options_for_select($sf_request->getAttribute('page_names')));
    ?>
      </div>
    </div>
    </fieldset>
  
    <ul class="sf_admin_actions">
      <li><?php 
    echo submit_tag(__('create'), array('name' => 'create', 'class' => 'sf_admin_action_save'));
    ?>
开发者ID:net7,项目名称:Talia-CMS,代码行数:31,代码来源:_list_footer.php

示例15: radiobutton_tag

        ?>
">
            <td><?php 
        echo $pilot_aircraft->getNNumber();
        ?>
</td>
            <td><?php 
        echo $pilot_aircraft->getAircraft()->getMake();
        ?>
</td>
            <td><?php 
        echo $pilot_aircraft->getAircraft()->getModel();
        ?>
</td>
            <td><?php 
        echo radiobutton_tag('primary_aircraft', 1);
        ?>
</td>
            <td><?php 
        echo $pilot_aircraft->getOwn() ? 'Yes' : 'No';
        ?>
</td>
            <td>
            <?php 
        if ($sf_user->hasCredential(array('Administrator'), false)) {
            ?>
              <?php 
            echo link_to('edit', 'account/editAircraft?id=' . $pilot_aircraft->getId());
            ?>
              <?php 
            echo jq_link_to_remote('remove', array('url' => 'account/ajaxDeleteAircraft?id=' . $pilot_aircraft->getId(), 'success' => "\$('#pilot_aircraft_{$pilot_aircraft->getId()}').remove();"), array('confirm' => 'Are you sure?'));
开发者ID:yasirgit,项目名称:afids,代码行数:31,代码来源:indexSuccess.php


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