本文整理汇总了PHP中HtmlInput::button_image方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlInput::button_image方法的具体用法?PHP HtmlInput::button_image怎么用?PHP HtmlInput::button_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HtmlInput
的用法示例。
在下文中一共展示了HtmlInput::button_image方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dsp_button
public function dsp_button()
{
$this->id = $this->id == "" ? $this->name : $this->id;
$javascript = 'search_poste(this)';
$button = HtmlInput::button_image($javascript, $this->id . "_bt", 'alt="' . _('Recherche') . '" class="image_search"', "image/magnifier13.png");
/* add the property */
$sc = $this->get_js_attr();
return $button . $sc;
}
示例2: IPopup
/**
*@brief return a string containing the button for displaying
* a search form. When clicking on the result, update the input text file
* the common used attribute as
* - jrn the ledger
* - label the field to update
* - name name of the input text
* - price amount
* - tvaid
* - typecard (deb, cred, filter or list of value)
* will be set
* if ICard is in readOnly, the button disappears, so the return string is empty
\code
// search ipopup
$search_card=new IPopup('ipop_card');
$search_card->title=_('Recherche de fiche');
$search_card->value='';
echo $search_card->input();
$a=new ICard('test');
$a->search();
\endcode
*\see ajax_card.php
*\note the ipopup id is hard coded : ipop_card
*@return HTML string with the button
*/
function search()
{
if ($this->readOnly == true) {
return '';
}
if (!isset($this->id)) {
$this->id = $this->name;
}
$a = "";
foreach (array('typecard', 'jrn', 'label', 'price', 'tvaid') as $att) {
if (isset($this->{$att})) {
$a .= "this." . $att . "='" . $this->{$att} . "';";
}
}
if (isset($this->id) && $this->id != "") {
$a .= "this.inp='" . $this->id . "';";
} else {
$a .= "this.inp='" . $this->name . "';";
}
$a .= "this.popup='ipop_card';";
$javascript = $a . ' search_card(this);return false;';
$button = HtmlInput::button_image($javascript, $this->name . "_bt", 'alt="' . _('Recherche') . '" class="image_search"', "image/magnifier13.png");
return $button;
}