Location: PHPKode > projects > phpC Forum > RSamaium-phpcforum-bddd8d5/phpcforum-1.0/adm/styles/default/templates/adm_crud_forums.html
<h2><!-- IF MODE == "edit" -->{L_TAB_EDIT}<!-- ELSE -->{L_TAB_ADD}<!-- ENDIF --></h2>

<button type="button" id="previous">< {L_BACK}</button>

<div class="state hidden"></div>
<div class="tabs-layout">
	<ul>
		<li><a href="#tabs-1"><!-- IF MODE == "edit" -->{L_TAB_EDIT}<!-- ELSE -->{L_TAB_ADD}<!-- ENDIF --></a></li>
	</ul>
	
	<div id="tabs-1">
			<input type="hidden" value="{FORUM_ID}" name="forum_id" />
			<input type="hidden" value="{MODE}" name="mode" />
			<form id="forum_form">
				<fieldset><legend>{L_SETTING_FORUM}</legend>
				<table class="list_options">
					<tr>
						<td class="highlight"  width="60%"><label for="forum_name">{L_FORUM_NAME}</label></td>
						<td><input type="text" name="forum_name" id="forum_name" size="40" value="{VAL_FORUM_NAME}"></td>
					</tr>
					<tr>
						<td class="highlight"><label for="forum_desc">{L_FORUM_DESC}</label></td>
						<td><textarea name="forum_desc" id="forum_desc" cols="45" rows="6">{VAL_FORUM_DESC}</textarea></td>
					</tr>
					<tr>
						<td class="highlight"><label for="forum_rules">{L_FORUM_RULES}</label></td>
						<td><textarea name="forum_rules" id="forum_rules" cols="45" rows="6">{VAL_FORUM_RULES}</textarea></td>
					</tr>
					<tr>
						<td class="highlight"  width="60%"><label for="forum_image">{L_FORUM_IMAGE}</label></td>
						<td><input type="text" name="forum_image" id="forum_image" size="40" value="{VAL_FORUM_IMAGE}"></td>
					</tr>
					<tr>
						<td class="highlight"  width="60%"><label for="forum_status">{L_FORUM_STATUS}</label></td>
						<td><label><input type="radio"  name="forum_status" value="1" <!-- IF VAL_FORUM_STATUS == 1 -->checked=checked"<!-- ENDIF -->> {L_LOCKED}</label> <label><input type="radio" name="forum_status" value="0" <!-- IF VAL_FORUM_STATUS != 1 -->checked=checked"<!-- ENDIF -->> {L_OPEN}</label></td>
					</tr>
					<tr>
						<td class="highlight"><label for="forum_share_facebook">{L_FORUM_SHARE_FACEBOOK}</label></td>
						<td><label><input type="radio"  name="forum_share_facebook" value="1" <!-- IF VAL_FORUM_SHARE_FACEBOOK == 1 -->checked=checked"<!-- ENDIF -->> {L_YES}</label> <label><input type="radio" name="forum_share_facebook" value="0" <!-- IF VAL_FORUM_SHARE_FACEBOOK != 1 -->checked=checked"<!-- ENDIF -->> {L_NO}</label></td>
					</tr>
					<tr>
						<td class="highlight"><label for="forum_share_twitter">{L_FORUM_SHARE_TWITTER}</label></td>
						<td><label><input type="radio"  name="forum_share_twitter" value="1" <!-- IF VAL_FORUM_SHARE_TWITTER == 1 -->checked=checked"<!-- ENDIF -->> {L_YES}</label> <label><input type="radio" name="forum_share_twitter" value="0" <!-- IF VAL_FORUM_SHARE_TWITTER != 1 -->checked=checked"<!-- ENDIF -->> {L_NO}</label></td>
					</tr>
				</table>
				</fieldset>
				<fieldset><legend>{L_SETTING_ICON}</legend>
					<table class="list_options">
						<tr>
							<td class="highlight" width="60%"><label for="iconset_id">{L_ICONSET}</label></td>
							<td>
								<select name="iconset_id" id="iconset_id">
										<option value="0">{L_NULL}</option>
									<!-- IF NB_ICONSET > 0 -->
										<option value="0">-------------</option>
									<!-- ENDIF -->
									<!-- BEGIN iconset -->
										<option value="{iconset.ID}" <!-- IF iconset.SELECTED -->selected="selected"<!-- ENDIF -->>{iconset.NAME}</option>
									<!-- END iconset -->
								</select>
							</td>
						</tr>
						<tr>
							<td class="highlight"><label>{L_ICONSET_MANDATORY}</label></td>
							<td>
							<label><input type="radio"  name="forum_icon_mandatory" value="2" <!-- IF VAL_FORUM_ICON_MANDATORY == 2 -->checked=checked"<!-- ENDIF -->> {L_YES}</label>&nbsp;
							<label><input type="radio"  name="forum_icon_mandatory" value="1" <!-- IF VAL_FORUM_ICON_MANDATORY == 1 -->checked=checked"<!-- ENDIF -->> {L_NO}</label>&nbsp;
							<label><input type="radio" name="forum_icon_mandatory" value="0" <!-- IF VAL_FORUM_ICON_MANDATORY == 0 -->checked=checked"<!-- ENDIF -->> {L_DEFAULT}</label></td>
						</tr>
					</table>
				</fieldset>
				<button name="submit_forum" type="button">{L_VALID}</button>
				
		</form>

   </div>
</div>



<script>
$(function() {
	$("button, .button").button();
	$(".tabs-layout").tabs();


	$("#previous").click(function() {
		clickSlide('page=forums');
	});

	$("button[name='submit_forum']").click(function() {
		var mode = $("input[name='mode']").val();
		var forum_id = $("input[name='forum_id']").val();
		var data = $('#forum_form').serialize();
		
		$.post('../ajax/adm.php', 'f=settingForum&forum_id=' + forum_id + '&mode=edit&' + data, function(ret) {
			if (mode == 'add') {
				displayEtat(ret.success, "{L_FORUM_CREATE}", "{L_FORUM_NOT_CREATE}");
				$.ajax({
				  url: '../ajax/adm.php',
				  type: 'POST',
				  data: {f: "lastForum"},
				  success: function(data) {
					var regexp = new RegExp("([0-9]+)", "g")
					var match = regexp.exec(data);
					clickSlide('page=forums');
					$.ajax({
						  url: '../ajax/adm.php',
						  type: 'POST',
						  dataType: 'json',
						  data: {f: "insertPermission", id: match[1]},
						  success: function(ret) {
							registerOrderForum(false);
						  }
					});
					
				  }
				});
				
			
			}
			else {
				displayEtat(ret.success, "{L_FORUM_EDIT}", "{L_FORUM_NOT_EDIT}");
			}
			//clickSlide('page=forums');
		}, 'json');
	});

});
</script>
Return current item: phpC Forum