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


PHP submit_tag函数代码示例

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


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

示例1: form

function form($objectName, $object, $options = array())
{
    if (!isset($options['action'])) {
        if ($object->isNewRecord()) {
            $options['action'] = 'create';
        } else {
            $options['action'] = 'update';
        }
    }
    if (!isset($options['submit_value'])) {
        $options['submit_value'] = ucfirst($options['action']);
    }
    if (isset($options['multipart']) && $options['multipart'] === true) {
        $form = form_tag(array('action' => $options['action']), array('multipart' => true));
    } else {
        $form = form_tag(array('action' => $options['action']));
    }
    if (!$object->isNewRecord()) {
        $form .= hidden_field($objectName, 'id', $object);
    }
    $fields = $object->contentAttributes();
    foreach ($fields as $attr) {
        $form .= '<p><label for="' . $objectName . '_' . $attr->name . '">' . SInflection::humanize($attr->name) . "</label>\n" . input($objectName, $attr->name, $object) . "</p>\n";
    }
    if (isset($options['include'])) {
        $form .= $options['include'];
    }
    $form .= submit_tag($options['submit_value']);
    $form .= end_form_tag();
    return $form;
}
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:31,代码来源:record_helper.php

示例2: 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

示例3: link_to

    ?>
"><?php 
    echo $file->nombre_archivo;
    ?>
</a>&nbsp;&nbsp;<?php 
    echo link_to("Borrar", "legajopedagogico/borrarAdjunto?id=" . $legajopedagogico->getId() . "&ajid=" . $file->id . "&aid=" . $alumno_id);
    echo "&nbsp;&nbsp;&nbsp;&nbsp;";
}
?>
        </div>

</fieldset>

<ul class="sf_admin_actions">
      <li><?php 
echo submit_tag(__('save'), array('name' => 'save', 'class' => 'sf_admin_action_save'));
?>
</li>
    <li><?php 
echo button_to(__('Legajos'), 'legajopedagogico/verLegajo?aid=' . $alumno_id . '&cid=' . $legajo_categoria_id, array('class' => 'sf_admin_action_list'));
?>
</li>
</ul>

</form>

<ul class="sf_admin_actions">
      <li class="float-left"><?php 
if ($legajopedagogico->getId()) {
    echo button_to(__('delete'), 'legajopedagogico/delete?id=' . $legajopedagogico->getId(), array('post' => true, 'confirm' => __('Are you sure?'), 'class' => 'sf_admin_action_delete'));
}
开发者ID:mediasadc,项目名称:alba,代码行数:31,代码来源:editSuccess.php

示例4: submit_tag

echo submit_tag(__('Perpustakaan') . ($sf_user->getAttribute('sort_field', null, 'cir_history_list_late') == 'COL_ITEM_ID' ? $sf_user->getAttribute('sort_type', null, 'cir_history_list_late') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='COL_ITEM_ID';"));
?>
</th>
				
                    		<th><?php 
echo submit_tag(__('Order Date') . ($sf_user->getAttribute('sort_field', null, 'cir_history_list_late') == 'ORDER_DATE' ? $sf_user->getAttribute('sort_type', null, 'cir_history_list_late') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='ORDER_DATE';"));
?>
</th>

				<th><?php 
echo submit_tag(__('Due Date') . ($sf_user->getAttribute('sort_field', null, 'cir_history_list_late') == 'DUE_DATE' ? $sf_user->getAttribute('sort_type', null, 'cir_history_list_late') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='DUE_DATE';"));
?>
</th>

				<th><?php 
echo submit_tag(__('Tanggal Penggembalian') . ($sf_user->getAttribute('sort_field', null, 'cir_history_list_late') == 'RETURN_DATE' ? $sf_user->getAttribute('sort_type', null, 'cir_history_list_late') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='RETURN_DATE';"));
?>
</th>
                    	</tr>
			<tr class="list" id='filter' <?php 
if (!isset($filters)) {
    echo 'style=""';
}
?>
>
				<td class='filter'><?php 
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
                    		<td class='filter_first'><?php 
echo input_tag('filters[CODE]', isset($filters['CODE']) ? $filters['CODE'] : null, array('size' => 12));
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listLateSuccess.php

示例5: textarea_tag

    ?>
            <?php 
    echo textarea_tag('task_tags', '', array('rows' => '3'));
    ?>
          </div>
          <div id="task-dates" class="float-right" style="text-align:right;">
            <label for="task_begin">Task Starts: <?php 
    echo input_date_tag('task_begin', '', array('rich' => 'true'));
    ?>
</label><br />
            <label for="task_finish">Task Due: <?php 
    echo input_date_tag('task_finish', '', array('rich' => 'true'));
    ?>
<br />
            <?php 
    echo submit_tag('Add Task');
    ?>
          </div>
          <div style="height:20px">
            <p id="indicator" style="display:none">
              <?php 
    echo image_tag('indicator.gif');
    ?>
 adding task...
            </p>
          </div>
        </form>
      </div>
      <div class="clear-both">&nbsp;</div>
    </div>
  <?php 
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:_edit_project_tasklist.php

示例6: submit_tag

echo submit_tag(__('ActivityDate') . ($sf_user->getAttribute('sort_field', null, 'accal_activity') == 'START' ? $sf_user->getAttribute('sort_type', null, 'accal_activity') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='START';"));
?>
</th>
                    
					<th><?php 
echo submit_tag(__('ActivityLength') . ($sf_user->getAttribute('sort_field', null, 'accal_activity') == 'ACTIVITY_LENGTH' ? $sf_user->getAttribute('sort_type', null, 'accal_activity') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='ACTIVITY_LENGTH';"));
?>
</th>
                    
					<th><?php 
echo submit_tag(__('ActivityType') . ($sf_user->getAttribute('sort_field', null, 'accal_activity') == 'ACTIVITY_TYPE_ID' ? $sf_user->getAttribute('sort_type', null, 'accal_activity') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='ACTIVITY_TYPE_ID';"));
?>
</th>

					<th><?php 
echo submit_tag(__('ActivityDetail') . ($sf_user->getAttribute('sort_field', null, 'accal_activity') == 'Detail' ? $sf_user->getAttribute('sort_type', null, 'accal_activity') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='Detail';"));
?>
</th>

				</tr>
				<tr class="list" id='filter' <?php 
if (!isset($filters)) {
    echo 'style=""';
}
?>
>
					<td class='filter'><?php 
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
					
开发者ID:taryono,项目名称:school,代码行数:30,代码来源:listByEmployeeSuccess.php

示例7: submit_tag

                                    <tr>
                                            <th >#</th>                                            
                                            <th class='first'><?php 
echo submit_tag(__('Academic calendar') . ($sf_user->getAttribute('sort_field', null, 'emp_leave') == 'ACADEMIC_CALENDAR_ID' ? $sf_user->getAttribute('sort_type', null, 'emp_leave') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='ACADEMIC_CALENDAR_ID';"));
?>
</th>
                                            <th><?php 
echo submit_tag(__('Emp no') . ($sf_user->getAttribute('sort_field', null, 'emp_leave') == 'EMP_NO' ? $sf_user->getAttribute('sort_type', null, 'emp_leave') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='EMP_NO';"));
?>
</th>
                                            <th><?php 
echo submit_tag(__('DPLK No') . ($sf_user->getAttribute('sort_field', null, 'emp_leave') == 'EXTRA_CODE' ? $sf_user->getAttribute('sort_type', null, 'emp_leave') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='EXTRA_CODE';"));
?>
</th>
                                            <th><?php 
echo submit_tag(__('Name') . ($sf_user->getAttribute('sort_field', null, 'emp_leave') == 'EMP_NAME' ? $sf_user->getAttribute('sort_type', null, 'emp_leave') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='EMP_NAME';"));
?>
</th>
                                            <th rowspan="2" style="text-align: center; vertical-align: middle;"><?php 
echo __('Total Leave');
?>
</th>
                                            <th rowspan="2" style="text-align: center; vertical-align: middle;"><?php 
echo __('Leave Used');
?>
</th>
                                            <th rowspan="2" style="text-align: center; vertical-align: middle;"><?php 
echo __('Leave Rest');
?>
</th>    
                                    </tr>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listSuccess.php

示例8: image_tag

    echo image_tag('star.png', array('alt' => '*'));
    ?>
&nbsp;&nbsp;i campi contrassegnati da asterisco sono obbligatori</p>

    <?php 
    echo form_error('text');
    ?>
    <p><label for="text">scrivi qui sotto il tuo commento</label><br/>      
      <?php 
    echo textarea_tag('text', $sf_request->hasErrors() ? $sf_params->get('text') : '', 'id=comment_text size=60x10');
    ?>
   
    </p>
    <p><?php 
    echo image_tag('arrow_mid.png', array('alt' => '&gt;', 'align' => 'absmiddle'));
    echo submit_tag('INVIA', array('class' => 'btn-submit'));
    ?>
</p>
  </form>


  <?php 
    if (sfConfig::get('app_comments_use_ajax', true)) {
        ?>
    <script type="text/javascript" language="javascript">
    //<![CDATA[
    $('comment-form').onsubmit = function () { 
      new Ajax.Updater(
        'comments-block',
        $('comment-form').action, 
        { parameters: Form.serialize(this), evalScripts: true, encoding: 'UTF-8' }
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:31,代码来源:_addComment.php

示例9: form_error

    
        <div class="row">
            <?php 
echo form_error('login');
?>
            <label for="login">Login: </label>
            <?php 
echo input_tag('login');
?>
        </div>
        
        <div class="row">
            <?php 
echo form_error('password');
?>
            <label for="password">Hasło: </label>
            <?php 
echo input_password_tag('password');
?>
        </div>
    </fieldset>
    
    <?php 
echo submit_tag('Dalej', array('class' => 'submit'));
?>
    <?php 
echo button_to('Powrót', $sf_request->getReferer(), array('class' => 'submit'));
?>
</form>
<?php 
include_partial('global/page_footer');
开发者ID:noose,项目名称:Planeta,代码行数:30,代码来源:verificationForm.php

示例10: __

echo __('nickname:');
?>
</label><?php 
echo input_tag('nickname');
?>
      <label for="password"><?php 
echo __('password:');
?>
</label><?php 
echo input_password_tag('password');
?>
      <?php 
echo input_hidden_tag('referer', $sf_params->get('referer') ? $sf_params->get('referer') : $sf_request->getUri());
?>
      <?php 
echo submit_tag(__('login'));
?>
      <?php 
echo link_to_function(__('cancel'), visual_effect('blind_up', 'login', array('duration' => 0.5)));
?>
    </form>
  </div>

  <div id="content">
    <div id="content_main">
      <?php 
echo $content;
?>
      <div class="verticalalign"></div>
    </div>
开发者ID:emacsattic,项目名称:symfony,代码行数:30,代码来源:layout.php

示例11: submit_tag

echo submit_tag(__('Curriculum') . ($sf_user->getAttribute('sort_field', null, 'student') == 'CURRICULUM_ID' ? $sf_user->getAttribute('sort_type', null, 'student') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='CURRICULUM_ID';"));
?>
</th>
					
                    <th><?php 
echo submit_tag(__('Academic calendar') . ($sf_user->getAttribute('sort_field', null, 'student') == 'ACADEMIC_CALENDAR_ID' ? $sf_user->getAttribute('sort_type', null, 'student') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='ACADEMIC_CALENDAR_ID';"));
?>
</th>
					
                    <th><?php 
echo submit_tag(__('Class group') . ($sf_user->getAttribute('sort_field', null, 'student') == 'CLASS_GROUP_ID' ? $sf_user->getAttribute('sort_type', null, 'student') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='CLASS_GROUP_ID';"));
?>
</th>
					
                    <th><?php 
echo submit_tag(__('Status') . ($sf_user->getAttribute('sort_field', null, 'student') == 'STATUS' ? $sf_user->getAttribute('sort_type', null, 'student') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='STATUS';"));
?>
</th>
				</tr>
                
				<tr class="list" id='filter'
				<?php 
if (!isset($filters)) {
    echo 'style="display:none;"';
}
?>
>
					<td class='filter'><?php 
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listStudentSuccess.php

示例12: __

		<div><?php 
echo __("Search By");
?>
&nbsp; <?php 
echo select_tag('ssSearchOption', options_for_select($oAppCommon->aSearchOptions, $sf_params->get('ssSearchOption')), array('tabindex' => 2));
?>
		</div>
		<div class="searchinput"><?php 
echo __('Search For');
?>
&nbsp;<?php 
echo input_tag('ssSearchWord', trim($sf_params->get('ssSearchWord')), array('size' => '20', 'maxlength' => '100', 'tabindex' => 1));
?>
</div>
		<div class="menu padding0"><?php 
echo submit_tag(__('Search'), array('title' => __('Search'), 'tabindex' => 1));
?>
		</div>
		<div class="menu padding0"><?php 
echo link_to(__('Show All'), $oAppCommon->ssLink, array('title' => __('Show All'), 'tabindex' => 1));
?>
		</form>
		</div>
		<div>
		</td>
	</tr>
</table>
		<?php 
echo jq_form_remote_tag(array('update' => $oAppCommon->ssDivId, 'url' => $oAppCommon->ssLink), array('name' => 'frmList', 'id' => 'frmList', 'method' => 'post', 'class' => 'fright'));
echo input_hidden_tag('ssSortOn', $oAppCommon->ssSortOn);
echo input_hidden_tag('ssSortBy', $oAppCommon->ssSortBy);
开发者ID:nainit-virtueinfo,项目名称:visymfony,代码行数:31,代码来源:_List.php

示例13: submit_tag

</th>
                                       
                    			<th>
					<?php 
echo submit_tag(__('Class group') . ($sf_user->getAttribute('sort_field', null, 'counseling') == 'CLASS_GROUP_ID' ? $sf_user->getAttribute('sort_type', null, 'counseling') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='CLASS_GROUP_ID';"));
?>
</th>
                    
                   			<th rowspan="2" style="vertical-align: middle;"><?php 
echo __('Wali Kelas');
?>
</th>
                    
                    			<th rowspan="2" style="vertical-align: middle;">
					<?php 
echo submit_tag(__('Jumlah Siswa') . ($sf_user->getAttribute('sort_field', null, 'counseling') == 'STUDENT_COUNT' ? $sf_user->getAttribute('sort_type', null, 'counseling') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='STUDENT_COUNT';"));
?>
</th>
				
                			<th style="vertical-align: middle; text-align: center;" colspan="2"><?php 
echo __('Rekap UTS');
?>
</th>
                    			<th style="vertical-align: middle; text-align: center;" colspan="2"><?php 
echo __('Rekap UAS');
?>
</th>
                    			<th style="vertical-align: middle; text-align: center;" colspan="2"><?php 
echo __('Administrasi Ledger');
?>
</th>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listLedgerSuccess.php

示例14: submit_tag

</div>
<ul class="sf_admin_actions" style='margin-left:240px'>
  <li class="sf_admin_action">
	<?php 
echo submit_tag('Save Settings');
?>
	</li>
</ul>
</form>
<div>
开发者ID:bshaffer,项目名称:Symplist,代码行数:10,代码来源:_list_footer.php

示例15: __

echo __('Sesi Kelas');
?>
</th>
                                                                    
                                                                    <th><?php 
echo submit_tag(__('Class group') . ($sf_user->getAttribute('sort_field', null, 'course_schedule') == 'CLASS_GROUP_ID' ? $sf_user->getAttribute('sort_type', null, 'course_schedule') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='CLASS_GROUP_ID';"));
?>
</th>
                    
                                                                    <th><?php 
echo submit_tag(__('Kegiatan Harian') . ($sf_user->getAttribute('sort_field', null, 'course_schedule') == 'SUBJECT_ID' ? $sf_user->getAttribute('sort_type', null, 'course_schedule') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='SUBJECT_ID';"));
?>
</th>
					
                                                                    <th><?php 
echo submit_tag(__('Lector') . ($sf_user->getAttribute('sort_field', null, 'course_schedule') == 'EMPLOYEE_ID' ? $sf_user->getAttribute('sort_type', null, 'course_schedule') == 'asc' ? ' &darr;' : ' &uarr;' : ''), array('class' => 'sort', 'onclick' => "blur();sort.value='EMPLOYEE_ID';"));
?>
</th>					
                                                        </tr>
			<tr class="list" id='filter' <?php 
if (!isset($filters)) {
    echo 'style=""';
}
?>
>
                                                                    <td class='filter' style="vertical-align: middle; text-align: center;"><?php 
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
					
                                                                    <td class='filter_first'><?php 
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listTKSuccess.php


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