public function render() { $control = array_pop($this->get_form()->controls()); $rc = $this->get_form()->resource_class; $class = Synerg_Model_Gameresourceclasses::get_by_name(Synerg_Model_Gameresourceclasses::CLASS_RESOURCES); $rc->set_value($class->identity()); ob_start(); echo $rc; echo $this->get_form()->id; echo $this->get_form()->game_type; ?> <table class="zupal_form_table"> <tr> <th style="width: 100px">Resource:</th> <td><?php echo $this->get_form()->title; ?> </td> </tr> <tr> <th style="width: 100px"><?php echo $this->get_form()->lead->get_label(); ?> </th> <td><?php echo $this->get_form()->lead; ?> </td> </tr> <tr> <th style="width: 100px"> </th> <td><?php echo $this->get_form()->active; ?> </td> </tr> <tr> <!-- th><?php echo $this->get_form()->content->get_label(); ?> </th --> <td colspan="2"><?php echo $this->get_form()->content; ?> </td> </tr> <tr> <th colspan="2"> <?php echo $control; ?> </th> </tr> </table></td></tr> </table> <?php return ob_get_clean(); }
public function render() { $control = array_pop($this->get_form()->controls()); $rc = $this->get_form()->resource_class; $class = Synerg_Model_Gameresourceclasses::get_by_name(Synerg_Model_Gameresourceclasses::CLASS_GROUPS); $rc->set_value($class->identity()); ob_start(); echo $rc; echo $this->get_form()->id; echo $this->get_form()->game_type; ?> <table class="zupal_form_table"> <tr> <th style="width: 100px">Group:</th> <td><?php echo $this->get_form()->title; ?> </td> </tr> <tr> <th style="width: 100px"><?php echo $this->get_form()->lead->get_label(); ?> </th> <td><?php echo $this->get_form()->lead; ?> </td> </tr> <tr> <th style="width: 100px"> </th> <td><?php echo $this->get_form()->active; ?> </td> </tr> <tr> <!-- th><?php echo $this->get_form()->content->get_label(); ?> </th --> <td colspan="2"><?php echo $this->get_form()->content; ?> </td> </tr> <tr> <td> </td> </tr> <tr><td colspan="4" style="border: 1px solid white; padding: 1em"> <table style="width: auto;"> <tr><th colspan="2"> <h2>Properties</h2> </th> </tr> <tr> <th style="text-align: center; font-style:italic">Resource</th> <th style="text-align: center; font-style:italic">Effect (%)</th> </tr> <?php for ($i = 1; $i <= 5; ++$i) { ?> <tr> <?php $nfield = $this->get_form()->get_field("string_{$i}"); $nfield->set_width(250); ?> <td><?php echo $nfield; ?> </td> <?php $vfield = $this->get_form()->get_field("value_{$i}"); $vfield->set_align('right'); $vfield->set_width(100); ?> <td><?php echo $vfield; ?> %</td> </tr> <?php } ?> <tr> <th colspan="2"> <?php echo $control; ?> </th> </tr> </table></td></tr> </table> <?php return ob_get_clean(); }