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


PHP Zend_Form_Element_Select::setAttribs方法代码示例

本文整理汇总了PHP中Zend_Form_Element_Select::setAttribs方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Form_Element_Select::setAttribs方法的具体用法?PHP Zend_Form_Element_Select::setAttribs怎么用?PHP Zend_Form_Element_Select::setAttribs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Form_Element_Select的用法示例。


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

示例1: init

 function init()
 {
     // Set the method for the display form to POST
     $this->setMethod('post');
     $this->addAttribs(array('id' => 'addGroup', 'class' => ''));
     $this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
     $control = new Zend_Form_Element_Hidden('control');
     $control->setValue('addGroup');
     $this->addElement($control);
     // begin inputs
     $name = new Zend_Form_Element_Text('name');
     $name->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_category_name')));
     $name->setRequired(true);
     $this->addElement($name);
     // begin inputs
     $color = new Zend_Form_Element_Text('color');
     $color->setAttribs(array('class' => 'text validate[required] rightAdd', 'placeholder' => Zend_Registry::get('translate')->_('admin_color_for_charts')));
     $color->setRequired(true);
     $this->addElement($color);
     // begin inputs
     $type = new Zend_Form_Element_Select('type');
     $options = array('' => Zend_Registry::get('translate')->_('admin_category_select_type'), '0' => Zend_Registry::get('translate')->_('admin_expenses'), '1' => Zend_Registry::get('translate')->_('admin_income'));
     $type->setMultiOptions($options);
     $type->addValidator(new Zend_Validate_InArray(array_keys($options)));
     $type->setAttribs(array('class' => 'select', 'id' => 'type'));
     $type->setRequired(true);
     $this->addElement($type);
     $submit = new Zend_Form_Element_Submit('submit');
     $submit->setValue(Zend_Registry::get('translate')->_('admin_add'));
     $submit->setAttribs(array('class' => 'submit'));
     $submit->setIgnore(true);
     $this->addElement($submit);
 }
开发者ID:valizr,项目名称:MMA,代码行数:33,代码来源:Groups.php

示例2: addBrand

 public function addBrand($data = null)
 {
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     $db = new Application_Model_DbTable_DbGlobal();
     $rowsbrand = $db->getGlobalDb('SELECT branch_id, Name
 			FROM tb_branch WHERE Name!="" ');
     $options = array('' => $tr->translate('Please_Select'));
     if ($rowsbrand) {
         foreach ($rowsbrand as $readBrand) {
             $options[$readBrand['branch_id']] = $readBrand['Name'];
         }
     }
     $brandElement = new Zend_Form_Element_Select('Parent brand');
     $brandElement->setAttribs(array('class' => 'demo-code-language'));
     $brandElement->setMultiOptions($options);
     $this->addElement($brandElement);
     $b_nameElement = new Zend_Form_Element_Text('brand Name');
     $b_nameElement->setAttribs(array('class' => 'validate[required]'));
     $this->addElement($b_nameElement);
     $optionsStatus = array(1 => $tr->translate("ACTIVE"), 2 => $tr->translate('DEACTIVE'));
     $statusElement = new Zend_Form_Element_Select('status');
     $statusElement->setAttribs(array('class' => 'demo-code-language'));
     $statusElement->setMultiOptions($optionsStatus);
     $this->addElement($statusElement);
     if ($data != null) {
         $idElement = new Zend_Form_Element_Hidden('id');
         $this->addElement($idElement);
         $statusElement->setValue($data["IsActive"]);
         $idElement->setValue($data['branch_id']);
         $b_nameElement->setValue($data['Name']);
         $brandElement->setValue($data['parent_id']);
     }
     return $this;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:34,代码来源:FrmInclude.php

示例3: init

 public function init()
 {
     // contato_nome
     $contato_nome = new Zend_Form_Element_Text("contato_nome");
     $contato_nome->setLabel("Nome");
     $contato_nome->setRequired();
     $contato_nome->setAttribs(array('class' => 'form-control'));
     $contato_nome->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // contato_email
     $contato_email = new Zend_Form_Element_Text("contato_email");
     $contato_email->setLabel("E-mail");
     $contato_email->setRequired();
     $contato_email->setAttribs(array('class' => 'form-control'));
     $contato_email->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // contato_assunto
     $contato_assunto = new Zend_Form_Element_Select("contato_assunto");
     $contato_assunto->setLabel("Assunto");
     $contato_assunto->setRequired();
     $contato_assunto->setAttribs(array('class' => 'form-control'));
     $contato_assunto->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $contato_assunto->setMultiOptions(array("" => "Selecione o assunto...", "Informação" => "Informação", "Elogio" => "Eologio", "Crítica" => "Crítica", "Sugestão" => "Sugestão", "Outros" => "Outros"));
     // contato_mensagem
     $contato_mensagem = new Zend_Form_Element_Textarea("contato_mensagem");
     $contato_mensagem->setLabel("mensagem");
     $contato_mensagem->setRequired();
     $contato_mensagem->setAttribs(array('class' => 'form-control', 'rows' => 5));
     $contato_mensagem->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $this->addElements(array($contato_nome, $contato_email, $contato_assunto, $contato_mensagem));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:naopresta,代码行数:30,代码来源:Contato.php

示例4: FrmBrand

 public function FrmBrand($frm = null)
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $status = new Zend_Form_Element_Select('status');
     $_arr_status = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $status->setMultiOptions($_arr_status);
     $status->setAttribs(array('class' => 'form-control validate[required]'));
     $parent = new Zend_Form_Element_Select("parent_id");
     $parent->setAttribs(array('class' => 'select', 'style' => 'width:100%'));
     $category = $db->getAllBrand();
     if (empty($category)) {
         $option_category = array('0' => 'No Brand To Select');
     } else {
         $option_category = array('0' => 'Choose Brand');
         foreach ($category as $row_cat) {
             $option_category[$row_cat["brand_id"]] = $row_cat["name_kh"];
         }
     }
     $parent->setMultiOptions($option_category);
     $brand_en = new Zend_Form_Element_Text("name_en");
     $brand_en->setAttribs(array('class' => 'validate[required]', 'placeholder' => ' Brand Name In English', "OnChange" => "GetBrandName(1)"));
     $brand_km = new Zend_Form_Element_Text("name_km");
     $brand_km->setAttribs(array('class' => 'validate[required]', 'placeholder' => ' Brand Name In Khmer', "OnChange" => "GetBrandName(2)"));
     $icon = new Zend_Form_Element_File("icon");
     $this->addElements(array($icon, $status, $brand_en, $brand_km, $parent));
     if ($frm != "") {
         $parent->setValue($frm["parent_id"]);
         $brand_en->setValue($frm["name_en"]);
         $brand_km->setValue($frm["name_kh"]);
         $status->setValue($frm["status"]);
     }
     return $this;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:33,代码来源:FrmBrand.php

示例5: FrmProCate

 public function FrmProCate($frm = null)
 {
     $vendor_name = new Zend_Form_Element_Text("vendor_name");
     $vendor_name->setAttribs(array('class' => 'validate[required]', 'placeholder' => 'ឈ្មោះអ្នផ្ឌត់ផ្ឌង់'));
     $phone = new Zend_Form_Element_Text("phone");
     $phone->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
     $contact = new Zend_Form_Element_Text("contact");
     $contact->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
     $email = new Zend_Form_Element_Text("email");
     $email->setAttribs(array('class' => 'validate[required]', 'placeholder' => ''));
     $address = new Zend_Form_Element_Textarea("address");
     $address->setAttribs(array('class' => '', 'placeholder' => ''));
     $status = new Zend_Form_Element_Select('status');
     $_arr_status = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $status->setMultiOptions($_arr_status);
     $status->setAttribs(array('class' => 'form-control validate[required]'));
     $this->addElements(array($vendor_name, $phone, $contact, $email, $address, $status));
     if ($frm != "") {
         $vendor_name->setValue($frm["v_name"]);
         $phone->setValue($frm["phone"]);
         $contact->setValue($frm["contact_name"]);
         $email->setValue($frm["email"]);
         $address->setValue($frm["vendor_remark"]);
         $status->setValue($frm["is_active"]);
     }
     return $this;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:27,代码来源:FrmVendor.php

示例6: FrmProCate

 public function FrmProCate($frm = null)
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $id_code = new Zend_Form_Element_Text('id_code');
     $id_code->setAttribs(array('class' => 'form-control', "readonly" => ""));
     $code = table_Model_DbTable_DbTable::getCallteralCode();
     $id_code->setValue($code);
     $cat_name_en = new Zend_Form_Element_Text("name_en");
     $cat_name_en->setAttribs(array('class' => 'validate[required]', 'placeholder' => 'Name In English', "OnChange" => "GetCatName(1)"));
     $cat_name_km = new Zend_Form_Element_Text("name_km");
     $cat_name_km->setAttribs(array('class' => 'validate[required]', 'placeholder' => 'Name In Khmer', "OnChange" => "GetCatName(2)"));
     $status = new Zend_Form_Element_Select('status');
     $_arr_status = array(1 => $this->tr->translate("ACTIVE"), 0 => $this->tr->translate("DACTIVE"));
     $status->setMultiOptions($_arr_status);
     $status->setAttribs(array('class' => 'form-control validate[required]'));
     $icon = new Zend_Form_Element_File("icon");
     $description = new Zend_Form_Element_Textarea("description");
     $this->addElements(array($icon, $status, $cat_name_en, $cat_name_km, $id_code, $description));
     if ($frm != "") {
         $id_code->setValue($frm["code"]);
         $cat_name_en->setValue($frm["name_en"]);
         $cat_name_km->setValue($frm["name_km"]);
         $status->setValue($frm["status"]);
         $description->setValue($frm["description"]);
     }
     return $this;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:27,代码来源:FrmTable.php

示例7: init

 public function init()
 {
     $request = Zend_Controller_Front::getInstance()->getRequest();
     $db = new Application_Model_DbTable_DbGlobal();
     /////////////Filter stock/////////////////
     $tr = Application_Form_FrmLanguages::getCurrentlanguage();
     $nameElement = new Zend_Form_Element_Text('s_name');
     $nameValue = $request->getParam('s_name');
     $nameElement->setValue($nameValue);
     $this->addElement($nameElement);
     $phonevalue = $request->getParam('phone');
     $phoneElement = new Zend_Form_Element_Text('phone');
     $phoneElement->setValue($phonevalue);
     $this->addElement($phoneElement);
     $rs = $db->getGlobalDb('SELECT LocationId,Name FROM tb_sublocation ORDER BY LocationId DESC ');
     $options = array('' => $tr->translate('Please_Select'));
     $agentValue = $request->getParam('stock_location');
     foreach ($rs as $read) {
         $options[$read['LocationId']] = $read['Name'];
     }
     $sale_agent = new Zend_Form_Element_Select('stock_location');
     $sale_agent->setMultiOptions($options);
     $sale_agent->setAttribs(array('id' => 'LocationId', 'class' => 'demo-code-language'));
     $sale_agent->setValue($agentValue);
     $this->addElement($sale_agent);
     return $this;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:27,代码来源:FrmStockFilter.php

示例8: FrmInvoice

 public function FrmInvoice($data = null)
 {
     $customer_id = new Zend_Form_Element_Select('customer_id');
     $customer_id->setAttribs(array('class' => 'form-control'));
     $general_opt = array("" => $this->tr->translate("GENERAL_CUSTOMER"));
     $customer_id->setMultiOptions($general_opt);
     $general = new Zend_Form_Element_Text('general');
     $general->setAttribs(array('class' => 'form-control'));
     $session = new Zend_Form_Element_Text('session');
     $session->setAttribs(array('class' => 'form-control'));
     $contact_name = new Zend_Form_Element_Select('contact_name');
     $contact_name->setAttribs(array('class' => 'form-control', 'required' => true));
     $check = new Zend_Form_Element_Text('check');
     $check->setAttribs(array('class' => 'form-control'));
     $phone = new Zend_Form_Element_Text('phone');
     $phone->setAttribs(array('class' => 'form-control'));
     $pay_date = new Zend_Form_Element_Text('pay_date');
     $pay_date->setAttribs(array('class' => 'form-control'));
     $fax = new Zend_Form_Element_Text('fax');
     $fax->setAttribs(array('class' => 'form-control'));
     $account_num = new Zend_Form_Element_Select('account_no');
     $account_num->setAttribs(array('class' => 'form-control'));
     $undeposit = new Zend_Form_Element_Text('undeposit');
     $undeposit->setAttribs(array('class' => 'form-control'));
     $address = new Zend_Form_Element_Text('address');
     $address->setAttribs(array('class' => 'form-control'));
     $address1 = new Zend_Form_Element_Text('address1');
     $address1->setAttribs(array('class' => 'form-control'));
     $pay_amount = new Zend_Form_Element_Text('pay_amount');
     $pay_amount->setAttribs(array('class' => 'form-control'));
     $remaining = new Zend_Form_Element_Text('remaining_amount');
     $remaining->setAttribs(array('class' => 'form-control'));
     $this->addElements(array($address1, $customer_id, $general, $contact_name, $session, $check, $phone, $pay_date, $fax, $account_num, $undeposit, $address, $pay_amount, $remaining));
     return $this;
 }
开发者ID:sarankh80,项目名称:restaurant168,代码行数:35,代码来源:FrmInvoice.php

示例9: init

 public function init()
 {
     /**
      * projeto_id
      */
     $modelProjeto = new Model_DbTable_Projeto();
     $projeto_id = new Zend_Form_Element_Select("projeto_id");
     $projeto_id->setLabel("Projeto: ");
     $projeto_id->setAttribs(array('class' => 'form-control'));
     $projeto_id->setMultiOptions($modelProjeto->fetchPairs());
     $this->addElement($projeto_id);
     /**
      * tarefa_nome
      */
     $tarefa_nome = new Zend_Form_Element_Text("tarefa_nome");
     $tarefa_nome->setLabel("Título: ");
     $tarefa_nome->setAttribs(array('class' => 'form-control'));
     $tarefa_nome->setRequired();
     $this->addElement($tarefa_nome);
     /**
      * tarefa_descricao
      */
     $tarefa_descricao = new Zend_Form_Element_Textarea("tarefa_descricao");
     $tarefa_descricao->setLabel("Descrição: ");
     $tarefa_descricao->setAttribs(array('class' => 'form-control', 'rows' => 10));
     $tarefa_descricao->setRequired();
     $this->addElement($tarefa_descricao);
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:intranet,代码行数:29,代码来源:TarefaCadastro.php

示例10: init

 public function init()
 {
     // profissional_beleza_id
     $profissional_beleza_id = new Zend_Form_Element_Radio("profissional_beleza_id");
     $profissional_beleza_id->setLabel("Selecione o profissional desejado: ");
     $profissional_beleza_id->setRegisterInArrayValidator(false);
     $profissional_beleza_id->setRequired();
     $profissional_beleza_id->setDecorators(App_Forms_Decorators::$checkboxElementDecorators);
     // agenda_data
     $agenda_data = new Zend_Form_Element_Text("agenda_data");
     $agenda_data->setLabel("Selecione a data: ");
     $agenda_data->setAttribs(array('class' => 'form-control', 'autocomplete' => 'off'));
     $agenda_data->setRequired();
     $agenda_data->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     // agenda_hora
     $agenda_hora = new Zend_Form_Element_Select("agenda_hora");
     $agenda_hora->setLabel('Selecione a hora: ');
     $agenda_hora->setAttribs(array('class' => 'form-control'));
     $agenda_hora->setMultiOptions(array('' => 'Horários'));
     $agenda_hora->setRequired();
     $agenda_hora->setDecorators(App_Forms_Decorators::$simpleElementDecorators);
     $agenda_hora->setRegisterInArrayValidator(false);
     // agenda_observacao
     $agenda_observacao = new Zend_Form_Element_Textarea("agenda_observacao");
     $agenda_observacao->setLabel("Observações: ");
     $agenda_observacao->setAttribs(array('class' => 'form-control', 'rows' => 7, 'placeholder' => 'Informe alguma observação, por exemplo, alguma preferência de produto, etc.'));
     // salao_id
     $salao_id = new Zend_Form_Element_Hidden('salao_id');
     // especialidade_id
     $especialidade_id = new Zend_Form_Element_Hidden("especialidade_id");
     // usuario_id
     $usuario_id = new Zend_Form_Element_Hidden("usuario_id");
     $this->addElements(array($profissional_beleza_id, $agenda_data, $agenda_hora, $agenda_observacao, $salao_id, $especialidade_id, $usuario_id));
     parent::init();
 }
开发者ID:nandorodpires2,项目名称:homemakes,代码行数:35,代码来源:Agendar.php

示例11: FrmSaleOrderUpdate

 public function FrmSaleOrderUpdate($frm = null)
 {
     $db = new saleorder_Model_DbTable_DbSaleOrder();
     $rs_table = $db->getAllTable();
     $option_table = array('0' => $this->tr->translate("CHOOSE_TABLE"));
     foreach ($rs_table as $row) {
         $option_table[$row["tab_id"]] = $row["code"] . ":" . $row["name_en"] . "-" . $row["name_km"];
     }
     $table = new Zend_Form_Element_Select("tables");
     $table->setAttribs(array('class' => 'select validate[required]', 'style' => 'width:100%'));
     $table->setMultiOptions($option_table);
     $rs_product = $db->getAllProduct();
     $option_product = array(0 => $this->tr->translate('CHOOSE_PRODUCT'));
     foreach ($rs_product as $row) {
         $option_product[$row["pro_id"]] = $row["item_code"] . '-' . $row["name_kh"] . '-' . $row["name_en"];
     }
     $product = new Zend_Form_Element_Select("product");
     $product->setAttribs(array('class' => 'select form-control', 'style' => 'width:100%'));
     $product->setMultiOptions($option_product);
     $c_date = date('Y-m-d');
     $date = new Zend_Form_Element_Text('dates');
     $date->setAttribs(array('id' => 'dates', 'style' => 'float:left;width:100%', 'class' => 'form-control validate[required]'));
     //$date->setValue($c_date);
     $saleorder_num = $db->getSaleOrderNo();
     $saleorder_no = new Zend_Form_Element_Text("saleorder_nos");
     $saleorder_no->setAttribs(array('class' => 'validate[required]', 'readOnly' => 'readOnly', 'style' => 'color:red'));
     $saleorder_no->setValue($saleorder_num);
     $this->addElements(array($product, $table, $date, $saleorder_no));
     if ($frm != "") {
         $saleorder_no->setValue($frm["saleorder_no"]);
         $table->setValue($frm["tab_id"]);
         $date->setValue($frm["date"]);
     }
     return $this;
 }
开发者ID:sarankh80,项目名称:opsstock,代码行数:35,代码来源:FrmSaleOrder.php

示例12: FrmReceive

 public function FrmReceive($data = null)
 {
     $wherehouse_id = new Zend_Form_Element_Select('wherehouse_id');
     $wherehouse_id->setAttribs(array('class' => 'form-control'));
     $wherehouse_id_opt = array("1" => $this->tr->translate("..."), "2" => $this->tr->translate("..."));
     $wherehouse_id->setMultiOptions($wherehouse_id_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $handow = new Zend_Form_Element_Text('handow');
     $handow->setAttribs(array('class' => 'form-control'));
     $document = new Zend_Form_Element_Button('3');
     $document->setAttribs(array('class' => 'form-control'));
     $session = new Zend_Form_Element_Button('7');
     $session->setAttribs(array('class' => 'form-control'));
     $item_code = new Zend_Form_Element_Select('item_code');
     $item_code->setAttribs(array('class' => 'form-control'));
     $company_opt = array("1" => $this->tr->translate("SELECT_COMPANY"), "2" => $this->tr->translate("SELECT_COMPANY_NAME"));
     $item_code->setMultiOptions($company_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $ptd_usage_value = new Zend_Form_Element_Text('ptd_usage_value');
     $ptd_usage_value->setAttribs(array('class' => 'form-control'));
     $qty_onhand = new Zend_Form_Element_Text('demo3');
     $qty_onhand->setAttribs(array('class' => 'form-control', 'id' => 'demo3'));
     $branch = new Zend_Form_Element_Select('branch');
     $branch->setAttribs(array('class' => 'form-control'));
     $wherehouse_id_opt = array("1" => $this->tr->translate("..."), "2" => $this->tr->translate("..."));
     $branch->setMultiOptions($wherehouse_id_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $blank_smaler = new Zend_Form_Element_Select('blank_smaler');
     $blank_smaler->setAttribs(array('class' => 'form-control'));
     $company_opt = array("1" => $this->tr->translate("SELECT_COMPANY"), "2" => $this->tr->translate("SELECT_COMPANY_NAME"));
     $blank_smaler->setMultiOptions($company_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $average_cost = new Zend_Form_Element_Text('average_cost');
     $average_cost->setAttribs(array('class' => 'form-control'));
     $ptd_sale_value = new Zend_Form_Element_Text('ptd_sale_value');
     $ptd_sale_value->setAttribs(array('class' => 'form-control'));
     $unit_cost = new Zend_Form_Element_Radio('unit_cost');
     $unit_cost->setAttribs(array('class' => 'red'));
     $total_cost = new Zend_Form_Element_Radio('total_cost');
     $total_cost->setAttribs(array('class' => 'red'));
     $serial = new Zend_Form_Element_Text('serial');
     $serial->setAttribs(array('class' => 'form-control'));
     $lot = new Zend_Form_Element_Text('lot');
     $lot->setAttribs(array('class' => 'form-control'));
     $add_lind = new Zend_Form_Element_Button('add_lind');
     $add_lind->setAttribs(array('class' => 'form-control'));
     $edit_lind = new Zend_Form_Element_Button('edit_lind');
     $edit_lind->setAttribs(array('class' => 'form-control'));
     $delete_lind = new Zend_Form_Element_Button('delete_lind');
     $delete_lind->setAttribs(array('class' => 'form-control'));
     $concel_lind = new Zend_Form_Element_Button('concel_lind');
     $concel_lind->setAttribs(array('class' => 'form-control'));
     $this->addElements(array($combo, $wherehouse_id, $handow, $item_code, $branch, $document, $session, $blank_smaler, $ptd_usage_value, $qty_onhand, $unit_cost, $total_cost, $serial, $lot, $add_lind, $edit_lind, $delete_lind, $concel_lind));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:59,代码来源:FrmReceive.php

示例13: Frm_table_type

 public function Frm_table_type($data = null)
 {
     $menu_code = new Zend_Form_Element_Text('type_code');
     $menu_code->setAttribs(array('class' => 'form-control', 'required' => true));
     $description = new Zend_Form_Element_Text('description');
     $description->setAttribs(array('class' => 'form-control'));
     $lang_1 = new Zend_Form_Element_Text('lang_1');
     $lang_1->setAttribs(array('class' => 'form-control'));
     $lang_2 = new Zend_Form_Element_Text('lang_2');
     $lang_2->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     $lang_3 = new Zend_Form_Element_Text('lang_3');
     $lang_3->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     if ($data != null) {
         // 			print_r($data);
     }
     $show_description = new Zend_Form_Element_Select('show_description');
     $show_description->setAttribs(array('class' => 'form-control'));
     $description_opt = array("" => $this->tr->translate("SELECT_DESCRIPTION"));
     $show_description->setMultiOptions($description_opt);
     $photo = new Zend_Form_Element_File('photo');
     $background = new Zend_Form_Element_Text('background');
     $background->setAttribs(array('class' => 'form-control color-picker-rgba'));
     $font_color = new Zend_Form_Element_Text('font_color');
     $font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
     $font_size = new Zend_Form_Element_Text('demo3');
     $font_size->setAttribs(array('class' => 'form-control', 'id' => "demo3", 'value' => 12, 'placeholder' => '12'));
     $apply = new Zend_Form_Element_Select('apply');
     $apply->setAttribs(array('class' => 'form-control'));
     $apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
     $apply->setMultiOptions($apply_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $active = new Zend_Form_Element_Checkbox('active');
     $active->setAttribs(array('class' => 'red'));
     $format = new Zend_Form_Element_Text('demo4');
     $format->setAttribs(array('class' => 'form-control', 'id' => "demo4", 'value' => 12, 'placeholder' => '12'));
     $setting = new Zend_Form_Element_Select('setting');
     $setting->setAttribs(array('class' => 'form-control'));
     $setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
     $setting->setMultiOptions($setting_opt);
     $arrange = new Zend_Form_Element_Text('arrange');
     $arrange->setAttribs(array('class' => 'form-control'));
     $resize = new Zend_Form_Element_Text('resize');
     $resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
     $note = new Zend_Form_Element_Textarea('note');
     $note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
     $id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         $id->setValue($data['id']);
         $menu_code->setValue($data['code']);
         $description->setValue($data['description']);
         $lang_1->setValue($data['lang1']);
         $lang_2->setValue($data['lang2']);
         $note->setValue($data['note']);
     }
     $this->addElements(array($id, $apply, $active, $combo, $menu_code, $description, $lang_1, $lang_2, $lang_3, $show_description, $background, $font_color, $font_size, $format, $setting, $arrange, $resize, $note));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:58,代码来源:FrmTableType.php

示例14: FrmSelect

 public function FrmSelect($data = null)
 {
     $company = new Zend_Form_Element_Select('company ');
     $company->setAttribs(array('class' => 'form-control'));
     $company_opt = array("" => $this->tr->translate("VSS Our set"));
     $company->setMultiOptions($company_opt);
     $this->addElements(array($company));
     return $this;
 }
开发者ID:TheTypoMaster,项目名称:restaurant168,代码行数:9,代码来源:FrmSelect.php

示例15: frm_table_time_charge

 public function frm_table_time_charge($data = null)
 {
     $menu_code = new Zend_Form_Element_Text('menu_code');
     $menu_code->setAttribs(array('class' => 'form-control'));
     $description = new Zend_Form_Element_Text('description');
     $description->setAttribs(array('class' => 'form-control', 'required' => true));
     $amount_to_charge = new Zend_Form_Element_Text('amount_to_charge');
     $amount_to_charge->setAttribs(array('class' => 'form-control'));
     $free_amt = new Zend_Form_Element_Text('free_amt');
     $free_amt->setAttribs(array('class' => 'form-control'));
     $child = new Zend_Form_Element_Text('child');
     $child->setAttribs(array('checked' => 'checked', 'class' => 'form-control'));
     $show_description = new Zend_Form_Element_Text('show_description');
     $show_description->setAttribs(array('class' => 'form-control'));
     $photo = new Zend_Form_Element_File('photo');
     $background = new Zend_Form_Element_Text('background');
     $background->setAttribs(array('class' => 'form-control color-picker-rgba'));
     $font_color = new Zend_Form_Element_Text('font_color');
     $font_color->setAttribs(array('class' => 'form-control', 'id' => "selected-color1"));
     $interval_time = new Zend_Form_Element_Text('interval_time');
     $interval_time->setAttribs(array('class' => 'form-control'));
     $apply = new Zend_Form_Element_Select('apply');
     $apply->setAttribs(array('class' => 'form-control'));
     $apply_opt = array("" => $this->tr->translate("SELECT_APPLY_TO_COMPANY"));
     $apply->setMultiOptions($apply_opt);
     $combo = new Zend_Form_Element_Checkbox('combo');
     $combo->setAttribs(array('class' => 'red'));
     $active = new Zend_Form_Element_Checkbox('active');
     $active->setAttribs(array('class' => 'form-control'));
     $execute_number = new Zend_Form_Element_Text('execute_number');
     $execute_number->setAttribs(array('class' => 'form-control'));
     $setting = new Zend_Form_Element_Select('setting');
     $setting->setAttribs(array('class' => 'form-control'));
     $setting_opt = array("" => $this->tr->translate("SELECT_SETTING"));
     $setting->setMultiOptions($setting_opt);
     $arrange = new Zend_Form_Element_Text('arrange');
     $arrange->setAttribs(array('class' => 'form-control'));
     $resize = new Zend_Form_Element_Text('resize');
     $resize->setAttribs(array('class' => 'form-control', 'id' => "resize", 'value' => 12, 'placeholder' => '12'));
     $note = new Zend_Form_Element_Textarea('note');
     $note->setAttribs(array('class' => 'form-control', 'style' => "margin-top: 0px; margin-bottom: 0px; height: 100px;"));
     $id = new Zend_Form_Element_Hidden('id');
     if ($data != null) {
         // 			print_r($data);
         $id->setValue($data['id']);
         $description->setValue($data['description']);
         $interval_time->setValue($data['time_interval']);
         $execute_number->setValue($data['execute_amount']);
         $amount_to_charge->setValue($data['fee_charge']);
         $free_amt->setValue($data['free_amount']);
         $child->setValue($data['chil_per']);
         $active->setValue($data['nul_mul']);
     }
     $this->addElements(array($id, $apply, $active, $combo, $menu_code, $description, $amount_to_charge, $free_amt, $child, $show_description, $background, $font_color, $interval_time, $execute_number, $setting, $arrange, $resize, $note));
     return $this;
 }
开发者ID:sarankh80,项目名称:restaurant168,代码行数:56,代码来源:FrmTableTimecharge.php


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