<div id="primary_header">
	<h1><?php print $this->translate('iOS Configuration Profiles')?></h1>
</div>

<div id="primary_content">
	<div id="primary_content_inner">

		<div id="Flash" class="flash_notice"><?php print $this->translate('The settings have been updated') ?></div>

		<form id="settingsForm" method="post" action="<?php echo $this->moduleBaseUrl ?>/services/iossave">
			<input type="hidden" name="save" value="1" />
			<table class="settings">
				<tr>
					<td class="label"><?php print $this->translate('Enable Configuration Profiles')?></td>
					<td>
						<input name="fields[iosProfiles]" type='hidden' value="0"/>
						<input name="fields[iosProfiles]" type="checkbox" class="iphoneStyle" value="1" <?php echo ($this->global['iosProfiles'] == '1') ? 'checked' : '' ?>>
						<small><?php print $this->translate('Allow iPhone/iPad clients to download a .mobileconfig profile.')?></small>
					</td>
				</tr>
			</table>
			<div class="divider"></div>
			<table class="settings">
				<tr>
					<td class="label"><?php print $this->translate('Organization')?></td>
					<td>
						<input type="text" class="large" name='fields[iosOrganization]' id='iosOrganization' value="<?php echo $this->global['iosOrganization']; ?>"/>
						<small><?php print $this->translate('Describes the issuing organization of the profile, as displayed to the user.')?></small>
					</td>
				</tr>
				<tr>
					<td class="label"><?php print $this->translate('Display Name')?></td>
					<td>
						<input type="text" class="large" name='fields[iosDisplayName]' id='iosDisplayName' value="<?php echo $this->global['iosDisplayName']; ?>"/>
						<small><?php print $this->translate('
						A very short string to be displayed to the user describing the profile, such as "Mail Settings". It does not have to be unique.
						')?></small>
					</td>
				</tr>
				<tr>
					<td class="label"><?php print $this->translate('Description')?></td>
					<td>
						<input type="text" class="large" name='fields[iosDescription]' id='iosDescription' value="<?php echo $this->global['iosDescription']; ?>"/>
						<small><?php print $this->translate('
						Descriptive, free-form text that will be shown to the user on the Detail screen for the
						entire profile. This string should clearly identify the profile so the user can decide whether to install it.
						')?></small>
					</td>
				</tr>
			</table>
			<div class="divider"></div>
			<table class="settings">
				<tr>
					<td class="label"><?php print $this->translate('Server Hostname')?></td>
					<td>
						<input type="text" class="medium" name="fields[mailserver_hostname]" id="mailserver_hostname" value="<?php echo $this->global['mailserver_hostname'] ?>" />
						<small><?php print $this->translate('Specify the mail-server hostname used in the profile URL references for users to connect via IMAP/SMTP/CalDAV/CardDAV. Leave blank for the server to try calculate automatically.')?></small>
					</td>
				</tr>
			</table>
		</form>
		<div class="divider"></div>
		<div id="back_button">
			<a href="#">
				<span class="stronglastword"><?php echo $this->translate('Save Settings') ?></span>
			</a>
		</div>
	</div>
</div>

<script type="text/javascript">
$( function(){
	var tabId = "#iOS_Profiles";
	perform_service_common_binds(tabId);
});

</script>
