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


PHP checkbox_field函数代码示例

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


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

示例1: render

 /**
  * Render form control
  *
  * @param string $control_name
  * @return string
  */
 function render($control_name)
 {
     $value = $this->getValue();
     $dimensions = Dimensions::instance()->findAll();
     $permission_group_ids = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId(), false);
     $out = '';
     foreach ($dimensions as $dim) {
         /* @var $dim Dimension */
         if ($dim->getOptions(1) && isset($dim->getOptions(1)->hidden) && $dim->getOptions(1)->hidden) {
             continue;
         }
         if (!$dim->getDefinesPermissions() || !$dim->deniesAllForContact($permission_group_ids)) {
             if (array_search($dim->getId(), $value) !== false) {
                 $checked = 1;
             } else {
                 $checked = 0;
             }
             $out .= '<div class="dimension" >';
             $out .= label_tag($dim->getName(), null, false, array('style' => 'display:inline;margin:10px;vertical-align:super;'));
             $out .= checkbox_field($control_name . '[' . $dim->getId() . ']', $checked);
             $out .= '</div >';
         }
     }
     $out .= '<input type="hidden" name="' . $control_name . '[0]" value=" ">';
     return $out;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:32,代码来源:RootDimensionsConfigHandler.class.php

示例2: render

 /**
  * Render form control
  *
  * @param string $control_name        	
  * @return string
  */
 function render($control_name)
 {
     $value = $this->getValue();
     $fields = array('street', 'city', 'state', 'zip_code', 'country');
     $out = '';
     foreach ($fields as $field) {
         $checked = array_search($field, $value) !== false;
         $out .= '<div class="checkbox-config-option">';
         $out .= label_tag(lang($field));
         $out .= checkbox_field($control_name . '[' . $field . ']', $checked);
         $out .= '</div>';
     }
     $out .= '<div class="clear"></div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:21,代码来源:AddressFieldsConfigHandler.class.php

示例3: field_html

 function field_html($args, $arrSlide = array())
 {
     switch ($args['type']) {
         case 'textarea':
             return text_area($args, $arrSlide);
         case 'checkbox':
             return checkbox_field($args, $arrSlide);
         case 'select':
             return select_field($args, $arrSlide);
         case 'image':
             return image_field($args, $arrSlide);
         default:
             return text_field($args, $arrSlide);
     }
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:15,代码来源:inc.fields.sliderfields.php

示例4: render

 function render($control_name)
 {
     $genid = gen_id();
     $object_types = ObjectTypes::getAvailableObjectTypes();
     $value = $this->getValue();
     $out = '';
     foreach ($object_types as $ot) {
         $checked = array_search($ot->getId(), $value) !== false;
         $out .= '<div  class="checkbox-config-option">';
         $out .= label_tag(lang($ot->getName()), $genid . '_' . $control_name . '_' . $ot->getId(), false, array('style' => 'cursor:pointer;'), '');
         $out .= checkbox_field($control_name . '[' . $ot->getId() . ']', $checked, array('id' => $genid . '_' . $control_name . '_' . $ot->getId()));
         $out .= '</div >';
     }
     $out .= '<input type="hidden" name="' . $control_name . '[0]" value=" "><div class="clear"></div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:16,代码来源:MultipleObjectTypeConfigHandler.class.php

示例5: render

 function render($control_name)
 {
     $genid = gen_id();
     $object_types = ObjectTypes::getAvailableObjectTypesWithDimensionObjects(" AND `name` IN ('task', 'project', 'sample')");
     $value = $this->getValue();
     $out = '';
     foreach ($object_types as $ot) {
         $checked = array_search($ot->getId(), $value) !== false;
         $out .= '<div style="float:left; margin-right: 15px; min-width: 130px;">';
         $out .= label_tag(lang($ot->getName()), $genid . '_' . $control_name . '_' . $ot->getId(), false, array('style' => 'cursor:pointer;'), '');
         $out .= checkbox_field($control_name . '[' . $ot->getId() . ']', $checked, array('id' => $genid . '_' . $control_name . '_' . $ot->getId()));
         $out .= '</div >';
     }
     $out .= '<input type="hidden" name="' . $control_name . '[0]" value=" "><div class="clear"></div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:16,代码来源:MultipleObjectTypePrefixConfigHandler.class.php

示例6: render

 function render($control_name)
 {
     $genid = gen_id();
     $groups = PermissionGroups::findAll(array('conditions' => "`type`='roles' AND `parent_id`>0"));
     $value = $this->getValue();
     $out = '';
     foreach ($groups as $group) {
         /* @var $dim Dimension */
         $checked = array_search($group->getId(), $value) !== false;
         $out .= '<div class="checkbox-config-option">';
         $out .= label_tag($group->getName(), $genid . '_' . $control_name . '_' . $group->getId(), false, array('style' => 'cursor:pointer;'), '');
         $out .= checkbox_field($control_name . '[' . $group->getId() . ']', $checked, array('id' => $genid . '_' . $control_name . '_' . $group->getId()));
         $out .= '</div >';
     }
     $out .= '<input type="hidden" name="' . $control_name . '[0]" value=" "><div class="clear"></div>';
     return $out;
 }
开发者ID:abhinay100,项目名称:feng_app,代码行数:17,代码来源:UserTypeMultipleConfigHandler.class.php

示例7: render

   /**
    * Render form control
    *
    * @param string $control_name
    * @return string
    */
    function render($control_name) {
       $value =  $this->getValue();
       $dimensions  = Dimensions::instance()->findAll();
       $permission_group_ids = ContactPermissionGroups::getPermissionGroupIdsByContactCSV(logged_user()->getId(),false);
       $out = '' ;
       foreach ($dimensions as $dim) { /* @var $dim Dimension */
			if ( $dim->getOptions(1) && isset($dim->getOptions(1)->hidden) && $dim->getOptions(1)->hidden ) {
				continue ;
			}
       		if (!$dim->getDefinesPermissions() || !$dim->deniesAllForContact($permission_group_ids)) {
	       		if  (array_search($dim->getId(), $value) !== false ){
	       			$checked = 1 ; 	
	       		}else{
	       			$checked = 0 ;
	       		}
	       		$out.='<div class="dimension" >';
	       		$out.=label_tag($dim->getName());
	       		$out.=checkbox_field($control_name.'['.$dim->getId().']',$checked );
	       		$out.='</div >';
       		}
       }
	   return $out ;	 
    }
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:29,代码来源:RootDimensionsConfigHandler.class.php

示例8: checkbox_field

echo checkbox_field('report[include_subworkspaces]', true, array('id' => 'report[include_subworkspaces]'));
?>
 
	      <label for="<?php 
echo 'report[include_subworkspaces]';
?>
" class="checkbox"><?php 
echo lang('include subworkspaces');
?>
</label>
			</td>
		</tr>
		<tr style='height:30px;'>
			<td colspan=2 align='left'>
				<?php 
echo checkbox_field('report[show_details]', false, array('id' => 'report[show_details]'));
?>
 
	      <label for="<?php 
echo 'report[show_details]';
?>
" class="checkbox"><?php 
echo lang('show details');
?>
</label>
			</td>
		</tr>
	</table>
	
<br/>
<?php 
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:total_task_times_vs_estimate_comparison_p.php

示例9: foreach

	<?php 
        foreach ($custom_properties as $cp) {
            /* @var $cp CustomProperty */
            $isAlt = !$isAlt;
            $options = array(option_tag('', -1));
            foreach ($titles as $k => $t) {
                $options[] = option_tag($t, $k, $t == $cp->getName() ? array('selected' => 'selected') : null);
            }
            $i++;
            ?>
<tr<?php 
            echo $isAlt ? ' class="altRow"' : '';
            ?>
>
					<td><?php 
            echo checkbox_field('check_custom_properties[' . $cp->getId() . ']', true, array('tabindex' => 50 + $i));
            ?>
</td><td><?php 
            echo $cp->getName();
            ?>
</td>
					<td><?php 
            echo select_box('select_custom_properties[' . $cp->getId() . ']', $options);
            ?>
</td>
				</tr>
	<?php 
        }
        ?>
	<?php 
    }
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:csv_import.php

示例10: checkbox_field

    <div>
      <?php 
echo checkbox_field('group[can_manage_time]', array_var($group_data, 'can_manage_time'), array('id' => 'group[can_manage_time]'));
?>
 
      <label for="<?php 
echo 'group[can_manage_time]';
?>
" class="checkbox"><?php 
echo lang('can manage time');
?>
</label>
    </div>
    <div>
      <?php 
echo checkbox_field('group[can_add_mail_accounts]', array_var($group_data, 'can_add_mail_accounts'), array('id' => 'group[can_add_mail_accounts]'));
?>
 
      <label for="<?php 
echo 'group[can_add_mail_accounts]';
?>
" class="checkbox"><?php 
echo lang('can add mail accounts');
?>
</label>
    </div>
  </fieldset>

   <fieldset class="">
	 <legend><?php 
echo lang('group users');
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:add_group.php

示例11: checkbox_field

        echo checkbox_field('ticket[notify_company_' . $company->getId() . ']', array_var($ticket_data, 'notify_company_' . $company->getId()), array('id' => 'notifyCompany' . $company->getId(), 'onclick' => 'App.modules.addMessageForm.emailNotifyClickCompany(' . $company->getId() . ')'));
        ?>
 <label for="notifyCompany<?php 
        echo $company->getId();
        ?>
" class="checkbox"><?php 
        echo clean($company->getName());
        ?>
</label></div>
      <div class="companyMembers">
        <ul>
<?php 
        foreach ($users as $user) {
            ?>
          <li><?php 
            echo checkbox_field('ticket[notify_user_' . $user->getId() . ']', array_var($message_data, 'notify_user_' . $user->getId()), array('id' => 'notifyUser' . $user->getId(), 'onclick' => 'App.modules.addMessageForm.emailNotifyClickUser(' . $company->getId() . ', ' . $user->getId() . ')'));
            ?>
 <label for="notifyUser<?php 
            echo $user->getId();
            ?>
" class="checkbox"><?php 
            echo clean($user->getDisplayName());
            ?>
</label></li>
<?php 
        }
        // foreach
        ?>
        </ul>
      </div>
    </div>
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:add_ticket.php

示例12: lang

    <div class="content"><?php 
    echo lang('update company permissions hint');
    ?>
</div>
  </div>
  <form action="<?php 
    echo $company->getUpdatePermissionsUrl();
    ?>
" method="post">
    <table class="blank">
<?php 
    foreach ($projects as $project) {
        ?>
      <tr>
        <td><?php 
        echo checkbox_field('project_' . $project->getId(), $company->isProjectCompany($project), array('id' => 'projectPermissionsCheckbox' . $project->getId(), 'disabled' => !logged_user()->isProjectUser($project)));
        ?>
</td>
        <td>
          <label for="projectPermissionsCheckbox<?php 
        echo $project->getId();
        ?>
" class="checkbox normal">
<?php 
        if ($project->isCompleted()) {
            ?>
          <del><span title="<?php 
            echo lang('project completed on by', format_datetime($project->getCompletedOn()), $project->getCompletedByDisplayName());
            ?>
"><?php 
            echo clean($project->getName());
开发者ID:469306621,项目名称:Languages,代码行数:31,代码来源:update_permissions.php

示例13: checkbox_field

                <div><?php 
                        echo checkbox_field('project_user_' . $user->getId() . '_all', $user->hasAllProjectPermissions(active_project()), array('id' => 'project_user_' . $user->getId() . '_all', 'onclick' => "App.modules.updatePermissionsForm.userPermissionAllCheckboxClick(" . $user->getId() . ")"));
                        ?>
 <label for="<?php 
                        echo 'project_user_' . $user->getId() . '_all';
                        ?>
" class="checkbox" style="font-weight: bolder"><?php 
                        echo lang('all permissions');
                        ?>
</label></div>
<?php 
                        foreach ($permissions as $permission_id => $permission_text) {
                            ?>
            
                <div><?php 
                            echo checkbox_field('project_user_' . $user->getId() . "_{$permission_id}", $user->hasProjectPermission(active_project(), $permission_id), array('id' => 'project_user_' . $user->getId() . "_{$permission_id}", 'onclick' => "App.modules.updatePermissionsForm.userPermissionCheckboxClick(" . $user->getId() . ")"));
                            ?>
 <label for="<?php 
                            echo 'project_user_' . $user->getId() . "_{$permission_id}";
                            ?>
" class="checkbox normal"><?php 
                            echo $permission_text;
                            ?>
</label></div>
<?php 
                        }
                        // foreach
                        ?>
              </div>
              <script>
	            if(!document.getElementById('project_user_<?php 
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:permissions.php

示例14: text_field

            ?>
      <?php 
            echo $page_attachment->render('project[page_attachments][' . $page_attachment->getId() . '][text]');
            ?>
      <?php 
            echo $page_attachment->renderControl('project[page_attachments][' . $page_attachment->getId() . '][rel_object_id]');
            ?>
      <?php 
            echo text_field('project[page_attachments][' . $page_attachment->getId() . '][order]', $page_attachment->getOrder(), array('class' => 'short pageAttachmentOrder'));
            ?>
      <span class="pageAttachmentDeleteBlock">
      <?php 
            echo label_tag(lang('delete'), 'project[page_attachments][' . $page_attachment->getId() . '][delete]', false, array('class' => 'checkbox'));
            ?>
      <?php 
            echo checkbox_field('project[page_attachments][' . $page_attachment->getId() . '][delete]', false, array('class' => 'checkbox pageAttachmentDelete', 'id' => 'project[page_attachments][' . $page_attachment->getId() . '][delete]'));
            ?>
      <input type="hidden" name="<?php 
            echo 'project[page_attachments][' . $page_attachment->getId() . '][rel_object_manager]';
            ?>
" value="<?php 
            echo $page_attachment->getRelObjectManager();
            ?>
"/>
      </span>
      <div class="clear"></div>
    </div>
    <div class="attachmentActions">
      <!-- TODO make these links less hard-coded -->
      <!-- TODO make a helper for these links -->
      <a href="<?php 
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:add_project.php

示例15: label_tag

    ?>
      </div>
      
      <div>
        <?php 
    echo label_tag(lang('password again'), 'userFormPasswordA', true);
    ?>
        <?php 
    echo password_field('user[password_a]', null, array('id' => 'userFormPasswordA', 'tabindex' => '1000'));
    ?>
      </div>
    </div>
    <div style="margin-top:10px">
    <label class="checkbox">
    <?php 
    echo checkbox_field('user[send_email_notification]', array_var($user, 'send_email_notification', 1), array('id' => $genid . 'notif', 'tabindex' => '1050'));
    ?>
    <?php 
    echo lang('send new account notification');
    ?>
    </label>
    </div>
  </fieldset>
  <script>
    App.modules.addUserForm.generateRandomPasswordClick();
  </script>
<?php 
}
// if
?>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:30,代码来源:add_user.php


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