<div class="row">
	<div class="col-12">
		<h1 class="h4 mb-3">{{ title }}</h1>
		<form action="{{ admin_dir }}/settings/public/" method="post" class="needs-validation" autocomplete="off" novalidate>
			<div class="row">
				<div class="col-12 col-md-6">
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="anonymous_generator" name="opt[anonymous_generator]" value="true" {{ anonymous_generator ? 'checked' : '' }}>
							<label class="custom-control-label" for="anonymous_generator">Enable Public Video Generator</label>
						</div>
						<small class="form-text text-muted">If you enable this option, people can use this website to play their videos.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="embed_only" name="opt[embed_only]" value="true" {{ embed_only ? 'checked' : '' }}>
							<label class="custom-control-label" for="embed_only">Embed Only</label>
						</div>
						<small class="form-text text-muted">If you enable this option, the embed url must be accessed with an iframe.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="enable_download_page" name="opt[enable_download_page]" value="true" {{ enable_download_page ? 'checked' : '' }}>
							<label class="custom-control-label" for="enable_download_page">Enable Download Page</label>
						</div>
						<small class="form-text text-muted">If you enable this option, people can download videos from the download page.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="hide_sub_download" name="opt[hide_sub_download]" value="true" {{ hide_sub_download ? 'checked' : '' }}>
							<label class="custom-control-label" for="hide_sub_download">Hide Subtitles on Download Page</label>
						</div>
						<small class="form-text text-muted">If you enable this option, subtitles will not be displayed on the download page.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="save_public_video" name="opt[save_public_video]" value="true" {{ save_public_video ? 'checked' : '' }}>
							<label class="custom-control-label" for="save_public_video">Save Public Video</label>
						</div>
						<small class="form-text text-muted">If you enable this option, any videos submitted by the public will be stored in the database.</small>
					</div>
					<div class="form-group">
						<label for="public_video_user">Save Public Videos As User</label>
						<select name="opt[public_video_user]" id="public_video_user" class="form-control select2">
							{% for val in user_list %}
                                <option value="{{ val.id }}" {{ val.id == public_video_user ? 'selected' : '' }}>{{ val.name }}</option>
                            {% endfor %}
						</select>
						<small class="form-text text-muted">Any videos submitted by the public will be stored in the database using this user.</small>
					</div>
				</div>
				<div class="col-12 col-md-6">
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="enable_gsharer" name="opt[enable_gsharer]" value="true" {{ enable_gsharer ? 'checked' : '' }}>
							<label class="custom-control-label" for="enable_gsharer">Enable Google Sharer Page</label>
						</div>
						<small class="form-text text-muted">If you enable this option, the public can bypass their Google Drive file limit via the Bypass Limit page.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="enable_gdrive_downloader" name="opt[enable_gdrive_downloader]" value="true" {{ enable_gdrive_downloader ? 'checked' : '' }}>
							<label class="custom-control-label" for="enable_gdrive_downloader">Enable Google Drive Downloader via Ajax</label>
						</div>
						<small class="form-text text-muted">If you enable this option, the public can download the Google Drive bypass file via ajax via the Bypass Limit page.</small>
					</div>
					<div class="form-group">
						<div class="custom-control custom-checkbox">
							<input type="checkbox" class="custom-control-input" id="disable_registration" name="opt[disable_registration]" value="true" {{ disable_registration ? 'checked' : '' }}>
							<label class="custom-control-label" for="disable_registration">Disable Registration Page</label>
						</div>
						<small class="form-text text-muted">If you enable this option, the public cannot register.</small>
					</div>
					<div class="form-group">
						<label for="dmca_page_link">DMCA Page URL</label>
						<input type="url" name="opt[dmca_page_link]" id="dmca_page_link" class="form-control" placeholder="Insert DMCA page URL" value="{{ dmca_page_link }}">
					</div>
					<div class="form-group">
						<label for="contact_page_link">Contact Page URL</label>
						<input type="url" name="opt[contact_page_link]" id="contact_page_link" class="form-control" placeholder="Insert contact page URL" value="{{ contact_page_link }}">
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-12">
					<button type="submit" class="btn btn-success">
						<em class="fas fa-save mr-2"></em>Update
					</button>
				</div>
			</div>
		</form>
	</div>
</div>
