Esempio n. 1
0
    if ($is_display_textarea) {
        ?>
			<p><?php 
        echo Form::textarea(sprintf($prefix . '_description[%d]', $file->id), isset($file->description) ? $file->description : '', array('rows' => 2, 'placeholder' => '写真の説明', 'class' => 'form-control', 'id' => sprintf($prefix . '_description_%d', $file->id)));
        ?>
</p>
<?php 
    }
    ?>
			<?php 
    echo Form::hidden(sprintf($prefix . '[%d]', $file->id), $file->name_prefix . $file->name, array('class' => $prefix));
    // select insert image size
    if (!empty($insert_target) && !empty($file->accept_sizes)) {
        ?>
			<p><?php 
        echo field_select(null, $value = null, Util_Array::set_key_from_value($file->accept_sizes), array('id' => 'select_size_' . $file->id));
        ?>
</p>
<?php 
    }
    // insert image tag button.
    if (!empty($insert_target)) {
        $data = array('class' => 'js-insert_img', 'id' => 'img_insert_btn_' . $file->id, 'data-id' => $file->id, 'data-body' => $insert_target, 'data-file_name' => $file->name, 'data-file_name_prefix' => $file->name_prefix);
        echo btn('form.insert_picture', '#', '', true, 'sm', null, $data, null, 'button', null, false);
    }
    ?>
		</div><!-- caption -->
	</div><!-- thumbnail -->
<?php 
}
?>
Esempio n. 2
0
    $label .= '<span class="required">*</span>';
    $atter['required'] = 'required';
}
$label_class = 'col-sm-' . $label_col_sm_size;
$input_col_sm_size = 12 - $label_col_sm_size;
if ($label_col_sm_size == 12) {
    $input_col_sm_size = 12;
} else {
    $label_class .= ' control-label';
}
$error_sm_size = 12 - $col_sm_size;
if (!$col_sm_size || $col_sm_size == 12 || $optional_public_flag) {
    $error_sm_size = 12;
}
if (!empty($is_merge_inputs2options) && Input::post($name)) {
    $posted_options = \Util_Array::set_key_from_value(Input::post($name));
    $options += $posted_options;
}
?>
<div class="form-group<?php 
if ($val->error($name)) {
    ?>
 has-error<?php 
}
?>
" id="<?php 
echo $atter['id'];
?>
_block">
	<?php 
echo Form::label($label, $name, array('class' => $label_class));