<div class="serv">
	<h1 class="serv__title">{header-title}</h1>

	<div class="serv__section form">
		<div class="form__row">
		<label class="form__label form__label--important" for="title">Titlu:  (acesta se va adăuga automat - daca e nevoie il poți schimba manual).</label>
			<input type="text" id="title" name="title" value="{title}" maxlength="150" placeholder="Enter title" required />
			<button class="form__find-related" onclick="find_relates(); return false;">Track-uri Similare</button>
			<div id="related_news" class="serv__links"></div>
		</div> 
		<div class="form__row">
			<label class="form__label">Genul de Muzică:</label>
			{category}
		</div>
	</div> 
	 <div class="form group">
		<div class="attachmentsHeading">
			Alege fișierul MP3
		</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">
					Alege fisier audio
				</div>
			</div>
							
			<div class="attachmentsHeading">
				Fișier încărcat.
			</div>
			<div class="attachmentsContainer" id="attachmentsList"></div>
		</div>
	</div>
	 

	<div class="serv__subtitle">Câmpuri suplimentare</div>
	<div class="serv__section form">
		<div class="form__row form__row--wide has-checkbox-slider">
			<table class="form__table">{xfields}</table>
		</div>
	</div>

	<div class="serv__subtitle">Opțiuni Fișier</div>
	<div class="serv__section form">
		<div class="form__row">
			<label class="form__label" for="tags">Tags:</label>
			<input class="form__input" type="text" name="tags" id="tags" value="{tags}" maxlength="150" autocomplete="off" />
		</div>
		<div class="form__row has-checkbox-slider form__row--checkboxes-group">{admintag}</div>
		[question]
		<div class="form__row form__row--protect">
			<label class="form__label form__label--important" for="question_answer">{question}</label>
			<input class="form__input" type="text" name="question_answer" id="question_answer" placeholder="Introduceți răspunsul la întrebare" required />
		</div>
		[/question]
		[sec_code]
		<div class="form__row form__row--protect">
			<label class="form__label form__label--important" for="sec_code">Introdu codul afisat in imagine:</label>
			<div class="form__sec-code d-flex">
				<input class="form__input" type="text" name="sec_code" id="sec_code" placeholder="Introdu codul afisat in imagine:" maxlength="45" required />
				{sec_code}
			</div>
		</div>
		[/sec_code]
		[recaptcha]
		<div class="form__row form__row--protect">
			<label class="form__label form__label--important" for="">Confirmați că nu sunteți un robot!</label>
			{recaptcha}
		</div>
		[/recaptcha]
		<div class="form__row form__row--submit d-flex serv__gap">
			<button class="flex-grow-1" name="add" type="submit">Publică</button>
			<button class="flex-grow-1 btn-secondary" name="nview" onclick="preview()" type="submit">Previzualizare</button>
			 
		</div>
		<div class="form__vote d-none" style="margin-top: 20px;">
			<div class="form">
				<div class="form__row">
					<label class="form__label">Titlu:</label>
					<input style="box-shadow: none;" class="form__input" type="text" name="vote_title" value="{votetitle}" maxlength="150" placeholder="titlu sondaj"  />
				</div>
				<div class="form__row">
					<label class="form__label">Întrebare de sondaj:</label>
					<input style="box-shadow: none;" class="form__input" type="text" name="frage" value="{frage}" maxlength="150" placeholder="Intrebare" />
				</div>
				<div class="form__row form__row--textarea">
					<label class="form__label">Opțiuni de răspuns (fiecare linie nouă este o nouă alegere de răspuns):</label>
					<textarea style="box-shadow: none;" class="form__textarea form__textarea--height" name="vote_body" rows="10">{votebody}</textarea>
				</div>
				<div class="form__row form__row--wide has-checkbox">
					<label class="checkbox">
						<input type="checkbox" name="allow_m_vote" value="1" {allowmvote}>
						Permite selecții multiple
					</label>
				</div>
			</div>
		</div>
	</div>
	
</div>

