<fieldset>
	<legend>Content With Image</legend>

	<div class="alert alert-info">Your selected image will automatically be left or right aligned at the top of your page with content wrapping around it.
	It will also be optimized for the desired size.</div>
</fieldset>

<div class="row">
	<div class="<?php echo(THREE_COL); ?>">
		<fieldset>
			<legend>Image Settings</legend>
			<div class="<?php echo(FORM_ROW); ?>">
				<label for="field_image" class="<?php echo(LABEL_COL); ?>">Image File</label>

				<div class="<?php echo(FIELD_COL); ?>">
					<div class="<?php echo(FIELD_COL); ?>"><input type="file" name="field_image" id="field_image" /></div>
					<div class="<?php echo(FIELD_COL); ?>"><input type="hidden" name="field_image" value="<?php echo($page->field("image")); ?>" /></div>
				</div>
			</div>

			<div class="<?php echo(FORM_ROW); ?>">
				<label for="field_image-alignment" class="<?php echo(LABEL_COL); ?>">Image Alignment</label>

				<div class="<?php echo(FIELD_COL); ?>">
					<?php angularMultipleChoice("field_image-alignment", "params['image-alignment'].value", "left", ["left" => "Left", "right" => "Right"]); ?>
				</div>
			</div>
		</fieldset>
	</div>

	<div class="<?php echo(THREE_COL); ?>">
		<fieldset>
			<legend>Image Size</legend>
			<div class="<?php echo(FORM_ROW); ?>">
				<label for="field_image_width" class="<?php echo(LABEL_COL); ?>">Image Width</label>
				<div class="<?php echo(FIELD_COL); ?>"><input type="text" name="field_image_width" id="field_image_width" ng-model="params.image_width.value" data-default="400" class="form-control" required /></div>
			</div>
			<div class="<?php echo(FORM_ROW); ?>">
				<label for="field_image_height" class="<?php echo(LABEL_COL); ?>">Image Height</label>
				<div class="<?php echo(FIELD_COL); ?>"><input type="text" name="field_image_height" id="field_image_height" ng-model="params.image_height.value" data-default="300" class="form-control" required /></div>
			</div>

			<div class="alert alert-info d-none"></div>
		</fieldset>
	</div>

	<div class="<?php echo(THREE_COL); ?>">
		<fieldset>
			<legend>Image Preview</legend>

			<?php
			$image = $page->field("image");
			if($image)
			{
				?>
				<img src="<?php echo($image); ?>" style="width: 100%" />
				<?php
			}
			?>
		</fieldset>
	</div>
</div>

<fieldset>
	<legend>Content</legend>
	<?php
	FeralTextArea("field_content1", $page->field("content1"), "form-control");
	full_wysiwyg("field_content1");
	?>
</fieldset>
