本文整理汇总了PHP中button_to_function函数的典型用法代码示例。如果您正苦于以下问题:PHP button_to_function函数的具体用法?PHP button_to_function怎么用?PHP button_to_function使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了button_to_function函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: button_to_modal_box_preview
function button_to_modal_box_preview($name, $id_formulario, $informe)
{
use_helper('Javascript');
$js = "\n function preview_informe()\n {\n Modalbox.show('" . url_for('informes/preview?id_informe=' . $informe->getPrimaryKey()) . "', {title: '" . __('Vista preliminar del informe') . "', width: 700});\n }";
$html = content_tag('script', $js, array('type' => 'text/javascript'));
$html .= button_to_function($name, 'preview_informe();', array('class' => 'sf_action_show', 'submit' => $id_formulario));
$html .= "\n";
return $html;
}
示例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);
}
}
示例3: button_to_function
?>
</td></tr>
<tr><th>End Time</th>
<td><?php
echo $basicInfoForm["end_time"]->render(array("size" => 7, "nojs" => true));
?>
</td></tr>
<?php
echo $basicInfoForm["due_date"]->renderRow();
?>
<?php
echo $basicInfoForm["contact_name"]->renderRow();
?>
<?php
echo $basicInfoForm["contact_email"]->renderRow();
?>
<?php
echo $basicInfoForm["contact_phone"]->renderRow();
?>
<tr><td><?php
echo button_to_function("Save", "saveBasicInfo()");
?>
<?php
echo $basicInfoForm->renderHiddenFields();
?>
</td></tr>
</table>
</form>
<?php
}
示例4: url_for
action="<?php
echo url_for("client_edit", array("form" => 'info', "client_id" => $client->getId()));
?>
"
method="post">
<table id="info-edit" style="display: none">
<?php
echo $InfoForm["name"]->renderRow();
?>
<?php
echo $InfoForm["department"]->renderRow();
?>
<?php
echo $InfoForm["address"]->renderRow();
?>
<?php
echo $InfoForm["email"]->renderRow();
?>
<?php
echo $InfoForm["phone"]->renderRow();
?>
<tr><td><?php
echo button_to_function("Save", "saveClientInfo()");
?>
<?php
echo $InfoForm->renderHiddenFields();
?>
</td></tr>
</table>
</form>
示例5: __
?>
<?php
echo "<h3>";
echo __("Se generará un archivo con la información de la base de datos");
echo "<br/>";
echo __('¿Desea continuar?');
echo "</h3>";
echo form_remote_tag(array('url' => 'backups/generar', 'update' => 'actualizable', 'loading' => "Element.hide('capa_generar');" . visual_effect("toggle_appear", "indicador"), 'complete' => "Element.hide('indicador')", 'success' => "this.document.location.reload(true);"), 'id=formulario_generar');
?>
<?php
echo submit_tag('Aceptar');
?>
<?php
echo button_to_function(__('Cancelar'), visual_effect('toggle_appear', 'capa_generar'));
?>
</form>
<?php
}
?>
</div>
<div style="display:none" id="resultado_backup"> Espere un momento, por favor ...</div>
<div class="indicador" style="display:none" id="indicador">
<p style="text-align:center;top:700%"><br />
<?php
echo image_tag('/images/ajax-loader.gif', array('alt' => __('cargando'), 'title' => __('cargando'), 'align' => 'center'));
?>
<br /><br />La operación se esta realizando, espero por favor...<br />
示例6: input_hidden_tag
$avgSpeed = $sf_params->get('avg_speed');
}
echo $avgSpeed;
?>
</div>
<div class="form-row">
<label for="model">Calories Burned:</label>
<?php
if ($calories) {
$cal = $calories;
} else {
$cal = $sf_params->get('cal_burned');
}
echo $cal;
?>
</div>
</fieldset>
<div class="submit-row">
<?php
echo input_hidden_tag('statid', $statid);
$editUrl = "Modalbox.show('userstats/edit?statid=" . $statid . "', {title:' Edit Ride', width: 600});return false;";
$cancelUrl = "Modalbox.hide();return false;";
$deleteUrl = "Modalbox.show('userstats/delete?statid=" . $statid . "', {title:' Delete Ride', width: 600});return false;";
echo button_to_function('Edit', $editUrl);
echo button_to_function('Cancel', $cancelUrl);
echo button_to_function('Delete', $deleteUrl);
?>
</div>
</form>
示例7: button_to_function
method="post">
<table id="shoot-edit-table" style="display: none">
<?php
echo $form["street"]->renderRow();
?>
<?php
echo $form["city"]->renderRow();
?>
<?php
echo $form["state"]->renderRow();
?>
<?php
echo $form["zip"]->renderRow();
?>
<tr><td><?php
echo button_to_function("Save", "saveShootInfo()");
?>
</table>
</form>
<?php
}
?>
<script type="text/javascript">
var map;
$(document).ready( function(){
initialize();
});
function initialize() {
示例8: include_component
include_component($editModule, "editView", array("name" => $name, "type" => $type, "permid" => $permid, "options" => $options, "updating" => $updating, "validationData" => $validationData));
?>
<ul class="a-controls a-slot-save-cancel-controls">
<li>
<input type="submit" name="Save" value="<?php
echo htmlspecialchars(__('Save', null, 'apostrophe'));
?>
" class="submit a-submit" id="<?php
echo 'a-slot-form-submit-' . $id;
?>
" />
</li>
<li>
<?php
echo button_to_function(__("Cancel", null, 'apostrophe'), "", array("class" => "a-cancel", 'id' => 'a-slot-form-cancel-' . $id));
?>
</li>
</ul>
</form>
<script type="text/javascript" charset="utf-8">
$('#a-slot-form-<?php
echo $id;
?>
').submit(function() {
$.post(
<?php
// These fields are the context, not something the user gets to edit. So rather than
?>
示例9: url_for
<small><?php
echo $job->getNumberRevisions();
?>
revisions</small>
</a>
</div>
<br/>
<?php
echo $job->getNotes();
?>
</div>
<div id="internal-notes-edit" style="display: none">
<form name="internal-notes-form" id="internal-notes-form"
action="<?php
echo url_for("job_edit", array("form" => 'internal', "job_id" => $job->getId()));
?>
"
method="post">
<?php
echo input_hidden_tag("job_id", $job->getId());
?>
<?php
echo textarea_tag("internal-edit", $job->getNotes(), array("rows" => 20, "cols" => 50));
?>
<?php
echo button_to_function("Update", "saveInternalNotes()");
?>
</form>
</div>
示例10: button_to_function
<?php
echo button_to_function('Undo', "undoPoint()") . "Undo the last point on the map.";
?>
<br>
<?php
//php echo button_to_function('Done', "done()")
?>
<?php
echo button_to_function('Cancel', "editDone()") . "Cancel editing.";
?>
<br><br>
<?php
echo checkbox_tag('mapMileage') . "Use map mileage - Check this if you want to use the mileage from the map for the ride.";
?>
<div class="submit-row">
<?php
echo submit_tag('Save Map') . "Save the map as it currently is.";
?>
</div>
</form>
</div>
<div id="control">
<?php
echo button_to_function('Edit', "doEdit()") . "Edit existing map.";
?>
</div>
</div>
</div>
</div>
示例11: asset_image_tag
<?php
echo asset_image_tag($sf_asset, 'large', array('class' => 'thumb'));
?>
<div class="form-row">
<label><?php
echo __('Filename', null, 'sfAsset');
?>
</label>
<div class=""><?php
echo $sf_asset->getUrl();
?>
</div>
</div>
<?php
echo $form;
?>
</fieldset>
<ul class="sf_admin_actions">
<li>
<?php
echo button_to_function(__('Insert', null, 'sfAsset'), "insertAction(\r\n '" . $sf_asset->getUrl() . "',\r\n \$('alt" . $sf_asset->getId() . "').value,\r\n \$('border" . $sf_asset->getId() . "').checked,\r\n \$('legend" . $sf_asset->getId() . "').checked,\r\n \$('description" . $sf_asset->getId() . "').value,\r\n \$('align" . $sf_asset->getId() . "').value,\r\n \$('thumbnails" . $sf_asset->getId() . "').selectedIndex,\r\n \$('width" . $sf_asset->getId() . "').value\r\n )", 'class=sf_admin_action_save');
?>
</li>
</ul>
</fieldset>
</form>
示例12: url_for
?>
<form id="billing-info-form"
action="<?php
echo url_for("job_edit", array("form" => 'billing', "job_id" => $job->getId()));
?>
"
method="post">
<table id="billing-edit-table" style="display: none">
<?php
echo $form["estimate"]->renderRow();
?>
<?php
echo $form["processing"]->renderRow();
?>
<tr><td><?php
echo button_to_function("Save", "saveBillingInfo()");
?>
</table>
</form>
<?php
echo link_to("Print Invoice", "job_invoice", array("slug" => $job->getSlug()), array("target" => "_blank"));
?>
<?php
}
?>
<div id="invoice"></div>
示例13: input_tag
</a>
</div>
<div id="hiddenAddPhotographer" style="display:none">
<h3>Add Photographer:</h3>
<label for="add-photographer-name">
Photographer Name <br/>
</label>
<?php
echo input_tag("add-photographer-name", "", array("size" => 30));
?>
<?php
echo input_hidden_tag("add-photographer-id");
?>
<?php
echo button_to_function("Add", "addPhotographerToJob()");
?>
</div>
<div id="job-photographer-list">
<?php
include_partial("photographerList", array("job" => $job));
?>
</div>
</div>
<hr />
<div class="info-header">Billing and Delivery <a href="#"
onclick="javascript:$('#job-billing-info').toggle(); return false;">[tg]</a>
示例14: input_tag
echo input_tag("project-name", "", array("size" => 40));
?>
<br />
<label for="project-create-new">Create new project</label>
<?php
echo checkbox_tag("project-create-new", 1, false);
?>
<br />
<label for="project-create-remove">Remove from project</label>
<?php
echo checkbox_tag("project-create-remove", 1, false);
?>
<br />
<?php
echo input_hidden_tag("add-project-id");
?>
<?php
echo button_to_function("Add", "addToProject()");
?>
</div>
<div id="hiddenSearchByTag" style="display:none">
<h3>Search By Tag</h3>
<?php
echo input_tag("search-tag", "", array("size" => 25));
?>
</div>
示例15: radiobutton_tag
echo radiobutton_tag('mood', 'good', $sf_request->getParameter('mood') == 'good', array('class' => 'styled_good', 'onclick' => "onMoodSelect('good')"));
?>
<?php
echo radiobutton_tag('mood', 'normal', $sf_request->getParameter('mood') == 'normal', array('class' => 'styled_normal', 'onclick' => "onMoodSelect('normal')"));
?>
<?php
echo radiobutton_tag('mood', 'bad', $sf_request->getParameter('mood') == 'bad', array('class' => 'styled_bad', 'onclick' => "onMoodSelect('bad')"));
?>
</div>
<div id="main_question" style="display:none; font-weight:bold;"></div>
<?php
echo textarea_tag('text', $sf_request->getParameter('text'), array('rows' => 2, 'cols' => 50, 'style' => 'display:none'));
?>
<br/>
<?php
echo button_to_function(__('Написать'), 'onSubmitWriteClick()', array('id' => 'submit_write', 'style' => 'display:none; margin-bottom: 10px;'));
?>
<div id='registration_promt' style="display:none">
<p><?php
echo __('Теперь надо бы зарегистрироваться ;)');
?>
</p>
<?php
echo $form;
?>
<li><small><p><?php
echo __("*Для того, чтобы общаться, надо указать свою настоящую почту.");
?>
</p></small></li>
<?php