<div class="form-wrap">
	<h1>Upload Music</h1>
	<div class="form-item clearfix imp">
		<label for="title">Title:</label>
		<input type="text" id="title" name="title" value="{title}" maxlength="150" placeholder="Enter title" required />
	</div>
	<div class="form-buts clearfix">
        <input title="Find Similar" onclick="find_relates(); return false;" type="button" value="Find Similar" />
        <a href="#" class="button" onclick="$('.form-vote').toggle();return false;">Add Poll</a>
	</div>
    <div id="related_news"></div>
	<div class="form-vote" style="display:none;">
		<div class="form-item clearfix">
			<label>Poll Title:</label>
			<input type="text" name="vote_title" value="{votetitle}" maxlength="150" placeholder="Poll Title" />
		</div>
		<div class="form-item clearfix">
			<label>The question:</label>
			<input type="text" name="frage" value="{frage}" maxlength="150" placeholder="The question" />
		</div>
		<div class="form-textarea">
			<label>Answer Options (Each new line is a new answer option):</label>
			<textarea name="vote_body" rows="10">{votebody}</textarea>
		</div>
        <div class="form-checks">
            <input type="checkbox" name="allow_m_vote" value="1" {allowmvote}>
            <label>Allow multiple selections</label>
        </div>
	</div>
	[urltag]
	<div class="form-item clearfix" style="display:none;">
		<label for="alt_name">URL news:</label>
		<input type="text" name="alt_name" value="{alt-name}" maxlength="150" placeholder="URL news" />
	</div>
	[/urltag]
	<div class="form-textarea">
		<label>Select Category:</label>
		{category}
	</div>
	<div class="form-textarea imp" style="display:none;">
		<label>Introduction:</label>
		[not-wysywyg]
            {bbcode}
            <textarea name="short_story" id="short_story" onfocus="setFieldName(this.name)" rows="10">{short-story}</textarea>
		[/not-wysywyg] 
		{shortarea}
	</div>
	<!--div class="form-textarea">
		<label>Подробная часть:</label>
		[not-wysywyg]
            {bbcode}
            <textarea name="full_story" id="full_story" onfocus="setFieldName(this.name)" rows="20">{full-story}</textarea>
		[/not-wysywyg] 
		{fullarea}
	</div-->
	
	[available=full-story]
		available
	[/available]
	
	
	<div class="form group">
		<div class="attachmentsHeading">
			Upload file
		</div>
		<textarea name="full_story" id="full_story" onfocus="setFieldName(this.name)" rows="12" class="wide" style="display:none !important">{full-story}</textarea>
		<input type="file" name="file" id="fileuploadInput" accept=".mp3" style="display:none;">
			<script src="/jquery-3.2.1.min.js"></script> 
    <script>
        $(document).ready(function() {
    $("#fileuploadInput").change(function() {
        var input_upload = $('#fileuploadInput').val().replace(/C:\\fakepath\\/i, '');
        var clean = input_upload.replace(/.mp3/i, '');
        $("#title").val(clean);
    });
});
    </script>
		<div class="uploadForm">
			<div class="nodragDrop" id="browseFiles">
				<div class="nodragdropIcon">
					<i class="fas fa-cloud-upload"></i>
				</div>
				<div class="nodragdropText">
					Click to browse files
				</div>
			</div>
							
			<div class="attachmentsHeading">
				Attachment
			</div>
			<div class="attachmentsContainer" id="attachmentsList"></div>
		</div>
	</div>
	
	
	<div class="form-xfield"><table class="tableform">{xfields}</table></div>
	<div class="form-item clearfix">
		<label for="tags">Tags:</label>
        <input type="text" name="tags" id="tags" value="{tags}" maxlength="150" autocomplete="off" />
	</div>
	<div class="form-checks">{admintag}</div>
	[question]
	<div class="form-item clearfix imp">
		<label>Вопрос:</label>
		<div class="form-secur"><div style="margin-bottom:10px;">{question}</div>
        <input type="text" name="question_answer" placeholder="Впишите ответ на вопрос" required />
		</div>
	</div>
	[/question]
	[sec_code]
	<div class="form-item clearfix imp">
		<label>Enter the code from the image:</label>
		<div class="form-secur">
            <input type="text" name="sec_code" id="sec_code" placeholder="Enter the code from the image" maxlength="45" required />{sec_code}
		</div>
	</div>
	[/sec_code]
	[recaptcha]
	<div class="form-item clearfix imp">
		<label>Enter two words from the picture:</label>
		<div class="form-secur">
			{recaptcha}
		</div>
	</div>
	[/recaptcha]
    <div class="form-submit">
        <button name="add" type="submit">Post</button>
        <button name="nview" onclick="preview()" type="submit">Preview</button>
    </div>
</div>