예제 #1
0
 function registerPaymentTypeCopier()
 {
     $PaymentAdder = new ElementCopierScript();
     $PaymentAdder->formname = $this->formname;
     $PaymentAdder->addCopier('payment_type', $this->getPaymentFields());
     $this->registerJavascript($PaymentAdder->output());
 }
예제 #2
0
 function _initCopier()
 {
     require_once 'AMP/Form/ElementCopierScript.inc.php';
     $this->_getValueSet('navid');
     $this->_getValueSet('position');
     $copier_fields = array('navid' => $this->getField('navid'), 'position' => $this->getField('position'));
     $this->_copier =& ElementCopierScript::instance();
     $this->_copier->addCopier($this->copier_name, $copier_fields, $this->_form_name);
     if (!empty($_POST)) {
         $this->_copier->addSets($this->copier_name, $_POST);
     }
     $this->addFields($this->_copier->getAddButton($this->copier_name));
     $header =& AMP_getHeader();
     $header->addJavascriptDynamic($this->_copier->output(), 'copier');
 }
예제 #3
0
파일: List.inc.php 프로젝트: radicalsuz/amp
 function _initCopier()
 {
     require_once 'AMP/Content/Nav/Location/Form.inc.php';
     $form =& new AMP_Content_Nav_Location_Form();
     $form->_getValueSet('navid');
     $form->_getValueSet('position');
     //        $form->_getValueSet( 'badge_id');
     $copier_fields = array('position' => $form->getField('position'), 'navid' => $form->getField('navid'), 'id' => array('type' => 'hidden'));
     foreach ($copier_fields as $key => $field_def) {
         unset($copier_fields[$key]['label']);
     }
     $this->_copier =& ElementCopierScript::instance();
     $this->_copier->addControl('edit', array('type' => 'button', 'action' => 'window.open( "' . AMP_url_add_vars(AMP_SYSTEM_URL_NAV, 'id=') . '"+window.' . $this->copier_name . '.GetCurrentValue(this, "' . $this->copier_name . '_navid" ));', 'label' => AMP_TEXT_EDIT));
     $this->_copier->addCopier($this->copier_name, $copier_fields, $this->formname);
     $this->_copier->setSingleRow(true, $this->copier_name);
     $this->_copier->setLabelColumn(false, $this->copier_name);
     $this->_copier->setRowOffset("0", $this->copier_name);
     $this->_copier->setFormTable($this->_css_id_container_table, $this->copier_name);
     $this->_copier->setElementClass('system_list_input', $this->copier_name);
     if (!empty($_POST)) {
         $this->_copier->addSets($this->copier_name, $_POST);
     }
     //$header = &AMP_getHeader( );
     //$header->addJavascriptDynamic( $this->_copier->output( ), 'copier' );
 }