freeipa/install/ui/reset_password.html

110 lines
4.0 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html class="login-pf">
<head>
<meta charset="utf-8">
<title>IPA: Identity Policy Audit</title>
Load updated Web UI files after server upgrade Issue: * There was no caching policy specified. * -> Browsers use their own default policy. * -> After upgrade, some Web UI files might have been actualized some not. * -> With schema change may result into weird bugs in Web UI Solution considerations: 1. Detect server version change and hard-reload at runtime Detection is easy. Problem is the reload. Obvious candidate 'window.location.reload(true)' works in Firefox but not in Chrome because expected behavior when parameter is used is not in standard and therefore Chromium/WebKit authors did not implement it. 2. Application Cache HTML 5 technology which lets web apps to run offline. Besides weird issues with event handlers which I encountered, this would be an ideal candidate. Simple change of manifest file would lead to reload of all files (requires reload of page to used the new files). Showstopper was usage with untrusted certificate. If user did not add exception for the cert or its CA and would visit the page for a second time, all AJAX calls would fail. 3. Set Expires to now() for everything Web UI rarely changes so this is an overkill. Setting it to different value is not a solution either. We can't predict when the upgrade will happen and when new Web UI will be needed. Solution: * Implemented a mini loader which loads basic resources. Dojo loader takes action after Dojo is loaded. * The loader adds a version parameter (?v=__NUM_VERSION__) to all requests. * Version is defined in the loader. It's set to current in `make version-update`. * All static pages use this loader to fetch their resources. * Version is also passed to dojo loader as cache-bust for the same effect. * Expire header was set to 'access time plus 1 year' for /ui folder. Exceptions are HTML files and loader (set to immediate expiration). Possible issues: * Images are cached but not requested with version param. * Images with version and without are considered different * -> We would have to attach version to all URIs - in CSS and in JS. But we should avoid changing jQuery UI CSS. * Proposed solution is to change image name when changing image. Image change is done rarely. * Version is set by build and therefore updated just on server update. It might cause trouble with different update schedule of plugins. * No action taken to address this issue yet. * We might leave it on plugin devs (own .conf in /etc/httpd/conf.d/) * or set expires to now for all plugins * running `make version-update` is required in order to use static version of UI for testing https://fedorahosted.org/freeipa/ticket/3798
2013-08-29 08:19:02 -05:00
<script type="text/javascript" src="js/libs/loader.js"></script>
<script type="text/javascript">
(function() {
var styles = [
'../ui/css/patternfly.css',
'../ui/css/ipa.css',
'../ui/ipa.css'
];
ipa_loader.styles(styles);
Load updated Web UI files after server upgrade Issue: * There was no caching policy specified. * -> Browsers use their own default policy. * -> After upgrade, some Web UI files might have been actualized some not. * -> With schema change may result into weird bugs in Web UI Solution considerations: 1. Detect server version change and hard-reload at runtime Detection is easy. Problem is the reload. Obvious candidate 'window.location.reload(true)' works in Firefox but not in Chrome because expected behavior when parameter is used is not in standard and therefore Chromium/WebKit authors did not implement it. 2. Application Cache HTML 5 technology which lets web apps to run offline. Besides weird issues with event handlers which I encountered, this would be an ideal candidate. Simple change of manifest file would lead to reload of all files (requires reload of page to used the new files). Showstopper was usage with untrusted certificate. If user did not add exception for the cert or its CA and would visit the page for a second time, all AJAX calls would fail. 3. Set Expires to now() for everything Web UI rarely changes so this is an overkill. Setting it to different value is not a solution either. We can't predict when the upgrade will happen and when new Web UI will be needed. Solution: * Implemented a mini loader which loads basic resources. Dojo loader takes action after Dojo is loaded. * The loader adds a version parameter (?v=__NUM_VERSION__) to all requests. * Version is defined in the loader. It's set to current in `make version-update`. * All static pages use this loader to fetch their resources. * Version is also passed to dojo loader as cache-bust for the same effect. * Expire header was set to 'access time plus 1 year' for /ui folder. Exceptions are HTML files and loader (set to immediate expiration). Possible issues: * Images are cached but not requested with version param. * Images with version and without are considered different * -> We would have to attach version to all URIs - in CSS and in JS. But we should avoid changing jQuery UI CSS. * Proposed solution is to change image name when changing image. Image change is done rarely. * Version is set by build and therefore updated just on server update. It might cause trouble with different update schedule of plugins. * No action taken to address this issue yet. * We might leave it on plugin devs (own .conf in /etc/httpd/conf.d/) * or set expires to now for all plugins * running `make version-update` is required in order to use static version of UI for testing https://fedorahosted.org/freeipa/ticket/3798
2013-08-29 08:19:02 -05:00
ipa_loader.scripts([
'js/libs/jquery.js',
'reset_password.js'
]);
})();
</script>
</head>
<body>
<div class="login-pf-body">
<span id="badge">
<img src="images/login-screen-logo.png" alt="" />
</span>
<div class="container">
<div class="row">
<div class="col-sm-12">
<div id="brand">
<img src="images/product-name.png" alt="">
</div>
</div>
<div class="col-sm-7 col-md-6 col-lg-5 login">
<form class="form-horizontal" role="form" action="/ipa/session/change_password" method="post" id="reset_password">
<div class="form-group validation-summary-group">
<div class="col-sm-12 controls">
<div class="widget validation-summary">
<div class="alert alert-success" style="display:none;">
<span class="fa fa-check-circle-o"></span><p></p>
</div>
<div class="alert alert-danger" style="display:none;">
<span class="fa fa-exclamation-circle"></span><p></p>
</div>
<div class="alert alert-warning" style="display:none;">
<span class="fa fa-warning"></span><p></p>
</div>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 control-label">
<label for="user">Username</label>
</div>
<div class="col-sm-8 controls">
<div class="widget text-widget">
<input type="text" class="form-control" name="user" id="user" title="Username" accesskey="u">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 control-label">
<label for="old_password">Current Password</label>
</div>
<div class="col-sm-8 controls">
<div class="widget text-widget">
<input type="password" class="form-control" name="old_password" id="old_password" accesskey="p">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 control-label">
<label for="new_password">New Password</label>
</div>
<div class="col-sm-8 controls">
<div class="widget text-widget">
<input type="password" class="form-control" name="new_password" id="new_password" accesskey="n">
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-4 control-label">
<label for="verify_password">Verify Password</label>
</div>
<div class="col-sm-8 controls">
<div class="widget text-widget">
<input type="password" class="form-control" id="verify_password" accesskey="v">
</div>
</div>
</div>
<div class="form-group">
<div class="col-xs-4 col-sm-offset-4 col-sm-8 submit">
<input name="submit" class="btn btn-primary btn-lg" value="Reset" type="submit" />
</div>
</div>
</form>
</div>
<div class="col-sm-5 col-md-6 col-lg-7 details">
</div>
</div>
</div>
</div>
</body>
</html>