<?php
/**
 * This is a core PHP file. For customization, create a file in the folder /custom/.
 * Files with the same filename in this folder will automatically be loaded instead of the current file
 */

if(Settings_Model::get('CLIENTAREA_HOSTING_PASSWORD_RESET') == 'yes')
{
	?>
	<!-- Modal -->
	<div class="modal fade" id="service-change-password" tabindex="-1" role="dialog" aria-labelledby="service-change-password" aria-hidden="true">
		<div class="modal-dialog" role="form">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">
						<?php echo __('hosting change password - title'); ?>
					</h4>
				</div>

				<?php
				if (isset($message) && isset($_POST['PasswordNew']))
				{
					echo $message;
					unset($message);
				}
				?>

				<form id="form-terminate-subscription" class="" method="post" action="<?php echo __SITE_URL . '/' . __('hosting', 'url') . '/' . __('changePassword', 'url') . '/' . $service->id; ?>">

					<div class="modal-body">
						<div class="form-group row">
							<label class="col-sm-4 form-control-label"><?php echo __('new password'); ?></label>
							<div class="col-sm-5">
								<input class="form-control" type="password" name="PasswordNew" value="" autocomplete="off">
							</div>
							<label class="col-sm-2 form-control-label"><a tabindex="1" role="button" onclick="generatePassword($('input[name=PasswordNew]'), '<?php echo __SITE_URL . '/' . __('hosting', 'url') . '/generateRandomPassword'; ?>')"><?php echo __('random'); ?></a></label>
						</div>
						<i><?php echo __('hosting change password - text'); ?></i>
						<br /><br /><br />

						<?php echo __('hosting change password - confirm'); ?>
						<br /><br />

						<div class="form-group row">
							<label class="col-sm-4 form-control-label"><?php echo __('password'); ?></label>
							<div class="col-sm-5">
								<input class="form-control" type="password" name="Password" value="" autocomplete="off">
							</div>
						</div>


					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-secondary pull-left" data-dismiss="modal"><?php echo __('cancel'); ?></button>
						<button type="submit" class="btn btn-primary"><?php echo __('confirm'); ?></button>
					</div>

				</form>

				<?php validate_input($service->ErrorFields); ?>

			</div>
		</div>
	</div>
	<?php
}