Skip to content
Snippets Groups Projects
Commit 19dc320e authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

rename templates according to action names

parent 7367ee1e
No related branches found
No related tags found
No related merge requests found
nobase_templates_DATA = \
accountProfiles/valid-accounts.php.tt2 \
mail/send_authentication_token.tt2.eml \
web/account_wizard.tt2.html \
web/content.tt2.html \
web/errors.tt2.html \
web/generate_token.tt2.html \
web/home.tt2.html \
web/index.tt2.html \
web/index-nobanner.tt2.html \
web/notices.tt2.html \
web/select_sp.tt2.html \
web/validate_token.tt2.html
web/select_email.tt2.html \
web/complete_challenge.tt2.html \
web/create_accounts.tt2.html
EXTRA_DIST = $(nobase_templates_DATA)
<script type="text/javascript">
jQuery(document).ready(function($){
var form = $("#create-account-form").show();
form.steps({
headerTag: "h3",
bodyTag: "fieldset",
stepsOrientation: "vertical",
transitionEffect: "slideLeft",
//saveState: true,
onStepChanging: function (event, currentIndex, newIndex)
{
// Trigger loading of the 'select_sp' with the selected SP entityid as parameter
// Result gets included in the next tab
if (currentIndex === 0 && newIndex === 1)
{
form.steps("remove", 1);
form.steps("insert", 1, {
title: "Select your email address",
contentMode: "async",
contentUrl: "[% conf.app_url %]?action=select_email&style=nobanner&entityid="+
encodeURIComponent($('#entityid').val())
});
}
// Trigger loading of the 'generate_token' with the selected SP entityid as parameter
// Result gets included in the next tab
if (currentIndex === 1 && newIndex === 2)
{
form.steps("remove", 2);
form.steps("insert", 2, {
title: "Complete email challenge",
contentMode: "async",
contentUrl: "[% conf.app_url %]?action=complete_challenge&style=nobanner&entityid="+
encodeURIComponent($('#entityid').val())+"&email="+encodeURIComponent($("input:checked[name='email']").val())
});
}
// Trigger loading of the 'validate_token' with the list of test accounts created
// Result gets included in the next tab
if (currentIndex === 2 && newIndex === 3)
{
window.location="[% conf.app_url %]?action=create_accounts&entityid="+
encodeURIComponent($('#entityid').val())+"&token="+encodeURIComponent($('#token').val());
}
// Allways allow previous action even if the current form is not valid!
if (currentIndex > newIndex)
{
return true;
}
// Needed in some cases if the user went back (clean up)
if (currentIndex < newIndex)
{
// To remove error styles
form.find(".body:eq(" + newIndex + ") label.error").remove();
form.find(".body:eq(" + newIndex + ") .error").removeClass("error");
}
form.validate().settings.ignore = ":disabled,:hidden";
return form.valid();
},
onStepChanged: function (event, currentIndex, priorIndex)
{
},
onFinishing: function (event, currentIndex)
{
form.validate().settings.ignore = ":disabled";
return form.valid();
},
onFinished: function (event, currentIndex)
{
alert("Submitted!");
}
});
form.validate({
errorPlacement: function errorPlacement(error, element) { element.before(error); },
});
});
$(function() {
$( "#entityid" ).combobox();
$( "#toggle" ).click(function() {
$( "#combobox" ).toggle();
});
});
</script>
<form id ="create-account-form"
action="[% env.SCRIPT_NAME %]"
method="POST">
<h3>Select your Service Provider</h3>
<fieldset>
<h3>Select your Service Provider</h3>
<div>
Please search and select the Service Provider that you want to test in
the list below. You must be an administrator of that Service Provider to
continue afterwards.
<br/><br/>
<label for="entityid">Type the SP name or entityID to search for it.</label>
Note that only Service Providers are in the list which are included in the eduGAIN metadata.<br/>
<select id="entityid" name="entityid" class="required">
<option value="">Select your Service Provider below</option>
[% FOREACH entity IN metadata.sort('display_name') %]
<option value="[% entity.entityid %]">[% IF entity.display_name %][% entity.display_name %] [% END %]([% entity.entityid %])</option>
[% END %]
</select>
<br/>
</div>
</fieldset>
<h3>Select your email address</h3>
<fieldset>
<div data-mode="async" data-url="/rest/service/0"></div>
</fieldset>
<h3>Complete email challenge</h3>
<fieldset></fieldset>
<h3>Test accounts</h3>
<fieldset></fieldset>
</form>
......@@ -2,28 +2,28 @@
[% IF action == 'select_sp' %]
[% TRY %]
[% PROCESS 'web/account_wizard.tt2.html' %]
[% PROCESS 'web/select_sp.tt2.html' %]
[% CATCH %]
An error occured
[% END %]
[% ELSIF action == 'select_email' %]
[% TRY %]
[% PROCESS 'web/select_sp.tt2.html' %]
[% PROCESS 'web/select_email.tt2.html' %]
[% CATCH %]
An error occured
[% END %]
[% ELSIF action == 'complete_challenge' %]
[% TRY %]
[% PROCESS 'web/generate_token.tt2.html' %]
[% PROCESS 'web/complete_challenge.tt2.html' %]
[% CATCH %]
An error occured
[% END %]
[% ELSIF action == 'create_accounts' %]
[% TRY %]
[% PROCESS 'web/validate_token.tt2.html' %]
[% PROCESS 'web/create_accounts.tt2.html' %]
[% CATCH %]
An error occured
[% END %]
......
<h3>Select your email address</h3>
<div>
Before you can create test accounts at this Identity Provider, we need to ensure you are a legitimate administrator of "[% provider.displayname %]".
</div>
<fieldset class="scrollable">
[% IF provider.contacts.defined %]
<legend>Select your email address</legend>
<label for="entityid">The email addresses below have been extracted from your SP SAML metadata.<br/>Please select the email address where an email challenge
can be sent to validate your identity</label>
<div class="radio_inline">
[% FOREACH email IN provider.contacts.sort %]
<input name="email" value="[% email %]" type="radio" class="required"/><label for="email">[% email %]</label><br/>
<input type="hidden" name="entityid" value="[% provider.entityid %]" id="entityid"/>
[% END %]
</div>
[% ELSE %]
No ContactPerson elements could be found in your SP SAML metadata. Therefore we are unable to provide test accounts for your SP. Please contact your local federation
administrator to add ContactPerson information to the SAML metadata.
[% END %]
</fieldset>
<script type="text/javascript">
$(function() {
$('label[for="email"]').on('click', function() {
var input = $(this).prev();
input.val([input.attr('value')]);
});
});
</script>
<h3>Select your email address</h3>
<div>
Before you can create test accounts at this Identity Provider, we need to ensure you are a legitimate administrator of "[% provider.displayname %]".
</div>
<script type="text/javascript">
<fieldset class="scrollable">
[% IF provider.contacts.defined %]
<legend>Select your email address</legend>
<label for="entityid">The email addresses below have been extracted from your SP SAML metadata.<br/>Please select the email address where an email challenge
can be sent to validate your identity</label>
jQuery(document).ready(function($){
var form = $("#create-account-form").show();
form.steps({
headerTag: "h3",
bodyTag: "fieldset",
stepsOrientation: "vertical",
transitionEffect: "slideLeft",
//saveState: true,
onStepChanging: function (event, currentIndex, newIndex)
{
<div class="radio_inline">
[% FOREACH email IN provider.contacts.sort %]
<input name="email" value="[% email %]" type="radio" class="required"/><label for="email">[% email %]</label><br/>
// Trigger loading of the 'select_sp' with the selected SP entityid as parameter
// Result gets included in the next tab
if (currentIndex === 0 && newIndex === 1)
{
form.steps("remove", 1);
form.steps("insert", 1, {
title: "Select your email address",
contentMode: "async",
contentUrl: "[% conf.app_url %]?action=select_email&style=nobanner&entityid="+
encodeURIComponent($('#entityid').val())
});
}
<input type="hidden" name="entityid" value="[% provider.entityid %]" id="entityid"/>
// Trigger loading of the 'generate_token' with the selected SP entityid as parameter
// Result gets included in the next tab
if (currentIndex === 1 && newIndex === 2)
{
form.steps("remove", 2);
form.steps("insert", 2, {
title: "Complete email challenge",
contentMode: "async",
contentUrl: "[% conf.app_url %]?action=complete_challenge&style=nobanner&entityid="+
encodeURIComponent($('#entityid').val())+"&email="+encodeURIComponent($("input:checked[name='email']").val())
});
}
[% END %]
</div>
// Trigger loading of the 'validate_token' with the list of test accounts created
// Result gets included in the next tab
if (currentIndex === 2 && newIndex === 3)
{
window.location="[% conf.app_url %]?action=create_accounts&entityid="+
encodeURIComponent($('#entityid').val())+"&token="+encodeURIComponent($('#token').val());
}
[% ELSE %]
No ContactPerson elements could be found in your SP SAML metadata. Therefore we are unable to provide test accounts for your SP. Please contact your local federation
administrator to add ContactPerson information to the SAML metadata.
[% END %]
// Allways allow previous action even if the current form is not valid!
if (currentIndex > newIndex)
{
return true;
}
// Needed in some cases if the user went back (clean up)
if (currentIndex < newIndex)
{
// To remove error styles
form.find(".body:eq(" + newIndex + ") label.error").remove();
form.find(".body:eq(" + newIndex + ") .error").removeClass("error");
}
form.validate().settings.ignore = ":disabled,:hidden";
return form.valid();
},
onStepChanged: function (event, currentIndex, priorIndex)
{
},
onFinishing: function (event, currentIndex)
{
form.validate().settings.ignore = ":disabled";
return form.valid();
},
onFinished: function (event, currentIndex)
{
alert("Submitted!");
}
});
form.validate({
errorPlacement: function errorPlacement(error, element) { element.before(error); },
});
</fieldset>
});
<script type="text/javascript">
$(function() {
$('label[for="email"]').on('click', function() {
var input = $(this).prev();
input.val([input.attr('value')]);
});
$(function() {
$( "#entityid" ).combobox();
$( "#toggle" ).click(function() {
$( "#combobox" ).toggle();
});
});
</script>
<form id ="create-account-form"
action="[% env.SCRIPT_NAME %]"
method="POST">
<h3>Select your Service Provider</h3>
<fieldset>
<h3>Select your Service Provider</h3>
<div>
Please search and select the Service Provider that you want to test in
the list below. You must be an administrator of that Service Provider to
continue afterwards.
<br/><br/>
<label for="entityid">Type the SP name or entityID to search for it.</label>
Note that only Service Providers are in the list which are included in the eduGAIN metadata.<br/>
<select id="entityid" name="entityid" class="required">
<option value="">Select your Service Provider below</option>
[% FOREACH entity IN metadata.sort('display_name') %]
<option value="[% entity.entityid %]">[% IF entity.display_name %][% entity.display_name %] [% END %]([% entity.entityid %])</option>
[% END %]
</select>
<br/>
</div>
</fieldset>
<h3>Select your email address</h3>
<fieldset>
<div data-mode="async" data-url="/rest/service/0"></div>
</fieldset>
<h3>Complete email challenge</h3>
<fieldset></fieldset>
<h3>Test accounts</h3>
<fieldset></fieldset>
</form>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment