// only values given: value is $label, get label from textfile
             $value = $label;
             $label = text('option.' . $element->key . '.' . $value);
         }
         $checked = $value == $element->value;
         $field .= Form::radio($element->name, $value, $checked, $element->attributes) . '<span class="radioLabel">' . $label . '</span>' . ($element->spacer ? $element->spacer : '&nbsp;');
     }
     break;
 case 'button':
     $field = Form::button($element->name, $element->label, $element->attributes);
     break;
 case 'file':
     $field = Form::file($element->name, $element->attributes);
     break;
 case 'image':
     $field = Form::image($element->name, $element->value, $element->attributes, false);
     break;
 case 'text':
 case 'text_small':
 case 'input':
 case 'input_small':
 case 'email':
     $field = Form::input($element->name, $element->value, $element->attributes);
     break;
 case 'password':
     $field = Form::password($element->name, $element->value, $element->attributes);
     break;
 case 'submit':
     $label = isset($element->label) ? $element->label : text('label.' . $element->key);
     $field = Form::submit($element->name, $label, $element->attributes);
     break;
Example #2
0
for ($i = 4; $i <= 23; $i++) {
    echo "\t\t";
    for ($j = 0; $j <= 9; $j++) {
        echo ' <div class="block" id="b' . $i . '_' . $j . '"></div>' . "\t";
    }
    echo "\n";
}
?>
        </div>
        <div id="AC"></div>
    </div>
    
    <div id="save_score">
        <span>Game Over!</span>
        <br /><br />
        <?php 
echo Form::open('/ranking/save', array('method' => 'post', 'id' => 'save_form')) . "\n";
?>
            <input type="hidden" name="score" value="" />
            <input type="hidden" name="lines" value="" />
            <input type="hidden" name="level" value="" /> 
            <input type="text" name="nick" value="" id="nick_in" />
            <br /><br />
            <?php 
echo Form::image(NULL, NULL, array('type' => 'image', 'src' => 'media/images/save_b.png', 'id' => 'save_b')) . "\n";
?>
            <?php 
echo Form::image(NULL, NULL, array('type' => 'image', 'src' => 'media/images/close_b.png', 'id' => 'close_s')) . "\n";
?>
        </form>
    </div>
Example #3
0
 /**
  * Tests Form::image()
  *
  * @test
  * @dataProvider provider_image
  * @param boolean $name         Input for Form::image
  * @param boolean $value        Input for Form::image
  * @param boolean $attributes  Input for Form::image
  * @param boolean $expected    Output for Form::image
  */
 public function test_image($name, $value, $attributes, $expected)
 {
     $this->assertSame($expected, Form::image($name, $value, $attributes));
 }
Example #4
0
 /**
  * Test the compilation of form image
  * 
  * @group laravel
  */
 public function testFormImage()
 {
     $form1 = Form::image('foo/bar', 'foo');
     $form2 = Form::image('foo/bar', 'foo', array('class' => 'span2'));
     $form3 = Form::image('http://google.com/foobar', 'foobar');
     $this->assertEquals('<input src="http://localhost/foo/bar" type="image" name="foo" id="foo">', $form1);
     $this->assertEquals('<input class="span2" src="http://localhost/foo/bar" type="image" name="foo" id="foo">', $form2);
     $this->assertEquals('<input src="http://google.com/foobar" type="image" name="foobar">', $form3);
 }
    <h1>List All Member Here</h1>


    <?php 
foreach ($members as $member) {
    ?>
        <h1><a href="<?php 
    echo e(url('/member', $member->id));
    ?>
"><?php 
    echo e($member->name);
    ?>
</a></h1>

        <?php 
    /*<h3>  <?php echo e(Form::image($member->image, '',array('height'=>80, 'width'=> 80)   )); ?>*/
    ?>

        <h3>  <?php 
    echo Form::image($member->image, '', array('height' => 80, 'width' => 80));
    ?>


        </h3>
    <?php 
}
?>

<?php 
$__env->stopSection();
echo $__env->make('main', array_except(get_defined_vars(), array('__data', '__path')))->render();
Example #6
0
 /**
  * This function generates an HTML form control using the field's metadata.
  *
  * @access public
  * @param string $name                          the name of the field
  * @param array $attributes                     the HTML form tag's attributes
  * @return string                               the HTML form control
  */
 public function control($name, array $attributes)
 {
     if (!$this->metadata['savable'] and $this->metadata['control'] != 'label') {
         $attributes['disabled'] = 'disabled';
         //$attributes['readonly'] = 'readonly';
     }
     switch ($this->metadata['control']) {
         case 'auto':
             if (isset($this->metadata['enum'])) {
                 return Form::select($name, $this->metadata['enum'], $this->value, $attributes);
             }
             return Form::input($name, $this->value, $attributes);
         case 'button':
             return Form::button($name, $this->value, $attributes);
         case 'checkbox':
             return Form::checkbox($name, 1, $this->value, $attributes);
         case 'file':
             return Form::file($name, $attributes);
         case 'hidden':
             return Form::hidden($name, $this->value, $attributes);
         case 'image':
             return Form::image($name, $this->value, $attributes);
         case 'label':
             return Form::label($name, $this->value, $attributes);
         case 'password':
             return Form::password($name, '', $attributes);
             // Note: Don't set password for security reasons
         // Note: Don't set password for security reasons
         case 'select':
             return Form::select($name, $this->metadata['enum'], $this->value, $attributes);
         case 'submit':
             return Form::submit($name, $this->value, $attributes);
         case 'textarea':
             return Form::textarea($name, $this->value, $attributes);
         case 'text':
             return Form::input($name, $this->value, $attributes);
         default:
             throw new Throwable_Exception('Message: Unable to create HTML form control. Reason: Invalid type of HTML form control.', array(':control' => $this->metadata['control'], ':field' => $name));
             break;
     }
 }