@extends('layouts.content')
@section('title')
	New Download page
@stop
@section('content')
	<div class="content contentAdmin">
		<div class="container">
			<div class="row">
				<div class="cntadmin">
					<ol class="breadcrumb">
					  <li><a href="/admin">Admin</a></li>
					  <li><a href="/admin/media">Media</a></li>
					  <li class="active">Add New Media Download</li>
					</ol>	
					<h3><i class="glyphicon glyphicon-download-alt" aria-hidden="true"></i>&nbsp;&nbsp;&nbsp;<b>New Download</b></h3>
					<div class="container adminpage">
						<div class="cntaddMedia">
						{!! Form::open(array('action' =>array('AdminController@addnewmedia') , 'class'=>'form-horizontal formadddownload','enctype'=>'multipart/form-data')) !!}							
							<div class="form-row">
								{!!Form::text('title', null,array('id'=>'title', 'class'=>'form-control', 'placeholder'=>'Title'))!!}
								{!! $errors->first('title', '<span class="help-inline" style="color:red;">:message</span>') !!}
							</div>						
							<div class="form-row" style="margin: 15px 0 0;">
								{!! Form::select('category', $categories, '' , array('class'=>'form-control')) !!}
								{!! $errors->first('category', '<span class="help-inline" style="color:red;">:message</span>') !!}
							</div>
							<div class="form-row">
								{!!Form::label('imgdownload' , 'Image of Download' , array('class'=>'control-label'))!!}
								<div class="upimage">
									{!!Form::file('upimage', null,array('id'=>'imageupload', 'class'=>'form-control'))!!}
									{!! $errors->first('upimage', '<span class="help-inline" style="color:red;">:message</span>') !!}
								</div>
							</div>
							<div class="col-sm-12 divider"></div>
							<div class="form-row">
								{!!Form::label('filedownload' , 'Download File' , array('class'=>'control-label'))!!}
								<div class="upfile">
									{!!Form::file('upfile', null,array('id'=>'fileupload', 'class'=>'form-control'))!!}
									<span>or</span>
								</div>
								{!!Form::text('urldownload', null,array('id'=>'urldownload', 'class'=>'form-control', 'placeholder'=>'Paste Download URL'))!!}
							</div>
							<div class="form-row descript">
								{!!Form::textarea('description', null,array('id'=>'description', 'class'=>'form-control', 'placeholder'=>'Description'))!!}
								{!! $errors->first('description', '<span class="help-inline" style="color:red;">:message</span>') !!}
							</div>
							<div class="form-row">
								{!!Form::text('tags', null,array('id'=>'tag', 'class'=>'form-control', 'placeholder'=>'Tags (comma separated)'))!!}
							</div>
							<div class="form-row">
								{!!Form::submit('Add Download', array('id'=>'submit', 'class'=>'btn btn-success submit-media'))!!}
							</div>
							</div>
						{!! Form::close() !!}
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
@stop