Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
initial commit
root committed Oct 19, 2017
1 parent 4ccef62 commit 4e5f963
Showing 10 changed files with 429 additions and 0 deletions.
187 changes: 187 additions & 0 deletions assets/dsroot/css/default-styles.css
@@ -0,0 +1,187 @@
/* Copyright (c) 2014, SWITCH */
h1 {
font-family:Verdana, sans-serif;
font-size: 13px;
padding-bottom: 6px;
text-align: left;
}

p {
font-family:Verdana, sans-serif;
font-size: 12px;
text-align: left;
}

a {
color: #00247D;
text-decoration: underline;
}

a:visited {
color: #00247D;
text-decoration: underline;
}

a:focus, a:hover, a:active {
color: #F39800;
text-decoration: underline;
}

pre {
text-align: left;
}


.promptMessage {
margin-top: 0;
}

.selectOptions {
margin-bottom: 0;
}

.box
{
width: 720px;
text-align: center;
background-color: #FFFFFF;
box-shadow: 1px 1px 8px #999999;
border-radius: 13px;
-webkit-box-shadow: 1px 1px 8px #999999;
-webkit-border-radius: 13px;
-moz-box-shadow: 1px 1px 8px #999999;
-moz-border-radius: 13px;
padding: 10px 24px 10px 24px;
}


/* IE 6 hack */
* html .box { border: 2px #969696 solid; }

/* IE 7 hack */
*+html .box { border: 2px #969696 solid; }


/* IE 8 hack */
@media \0screen {
.box { border: 2px #969696 solid; }
}

.menu {
width: 100%;
padding-left: 2px;
margin-top: 10px;
margin-left: 0;
float: left;
background: url("{$imageURL}/dual_line.png") repeat-x scroll 0 100% transparent;
font-family: Verdana, sans-serif;
font-size: 12px;
line-height: 45px;
}

.menu li {
float: left;
list-style:none;
line-height:35px;
margin-right:10px;
}

.menu li.last {
background: url("{$imageURL}/separator.png") no-repeat scroll left center transparent;
padding-left: 8px;
float: left;
list-style:none;
}

.serviceName {
font-weight: bold;
}

.hostName {
font-weight: bold;
}


#container, .container {
position: absolute;
left: 50%;
top: 50%;
margin-left: -370px;
margin-top: -200px;
}

#content, .content {
width: 98%;
}

#header {
width: 100%;
display: inline-block;
text-align: left;
}

#federationLogo {
border: 0;
float: left;
}

#organisationLogo
{
border: 0;
float: right;
}

#userInputArea, .userInputArea {
width: 100%;
margin-left: auto;
margin-right: auto;
background-color: #F0F0F0;
border-color: #969696;
border-width: 1px;
border-style: solid;
padding: 6px;
}

#userIdPSelection, .userIdPSelection {
width: 480px;
font-size: 12px;
}

/* Device specific styles */
@media only screen and (max-device-width: 720px){
.box {
width: auto;
box-shadow: none;
border-radius: 0;
-webkit-box-shadow: none;
-webkit-border-radius: 0;
-moz-box-shadow: none;
-moz-border-radius: 0;
padding: 0;
}

#content, .content {
width: 96%;
}

#container, .container {
width: 96%;
position: auto;
left: auto;
top: auto;
margin-left: 0;
margin-top: 0;
}

#userIdPSelection, .userIdPSelection {
width: 60%;
}

#userIdPSelection_iddwrap input {
width:90%!important;
}
}

html, body, form, fieldset, p, div, h1, h2, h3, h4, h5, h6 {
-webkit-text-size-adjust:none;
}
32 changes: 32 additions & 0 deletions assets/dsroot/custom-body.php
@@ -0,0 +1,32 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>

<!-- Identity Provider Selection: Start -->
<h1><?php echo getLocalString('header'); ?></h1>
<form id="IdPList" name="IdPList" method="post" onSubmit="return checkForm()" action="<?php echo $actionURL ?>">
<div id="userInputArea">
<p class="promptMessage"><?php echo $promptMessage ?></p>
<div style="text-align: center">
<select name="user_idp" id="userIdPSelection">
<option value="-" <?php echo $defaultSelected ?>><?php echo getLocalString('select_idp') ?> ...</option>
<?php printDropDownList($IDProviders, $selectedIDP) ?>
</select>
<input type="submit" name="Select" accesskey="s" value="<?php echo getLocalString('select_button') ?>">
</div>
<div style="text-align: left">
<p class="selectOptions">
<input type="checkbox" <?php echo $rememberSelectionChecked ?> name="session" id="rememberForSession" value="true">
<label for="rememberForSession"><?php echo getLocalString('remember_selection') ?></label><br>
<?php if ($showPermanentSetting) : ?>
<!-- Value permanent must be a number which is equivalent to the days the cookie should be valid -->
<input type="checkbox" name="permanent" id="rememberPermanent" value="100">
<label for="rememberPermanent"><?php echo getLocalString('permanently_remember_selection') ?></label>
<?php endif ?>
</p>
</div>
</div>
</form>

<!-- no message -->

<!-- Identity Provider Selection: End -->
12 changes: 12 additions & 0 deletions assets/dsroot/custom-error.php
@@ -0,0 +1,12 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>

<!-- Error Message: Start-->
<h1><?php echo getLocalString('invalid_query') ?></h1>
<p>
<?php echo $message ?>
</p>
<p>
<?php echo sprintf(getLocalString('contact_assistance'), $supportContactEmail, $supportContactEmail) ?>
</p>
<!-- Error Message: End-->
16 changes: 16 additions & 0 deletions assets/dsroot/custom-footer.php
@@ -0,0 +1,16 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>







<!-- Body: End -->
</div>
</div>

</div>
</body>
</html>
99 changes: 99 additions & 0 deletions assets/dsroot/custom-header.php
@@ -0,0 +1,99 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>
<!DOCTYPE HTML>
<html>
<head>
<title><?php echo getLocalString('title') ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="keywords" content="Home Organisation, Discovery Service, WAYF, Shibboleth, Login, AAI">
<meta name="description" content="Choose your home organisation to authenticate">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
<link rel="stylesheet" href="<?php echo $_SERVER['SCRIPT_NAME'] ?>/styles.css" type="text/css">
<link rel="stylesheet" href="<?php echo $_SERVER['SCRIPT_NAME'] ?>/ImprovedDropDown.css" type="text/css">
<script type="text/javascript" src="<?php echo $javascriptURL ?>/jquery.js"></script>
<script type="text/javascript" src="<?php echo $javascriptURL ?>/improvedDropDown.js"></script>
<script type="text/javascript">
<!--

// Prevent that WAYF is loaded in an IFRAME
function preventIframeEmbedding(){
if (top != self) {
top.location = self.location;
}
}

// Set focus to submit button or drop down list
function setFocus(){
// Skip this if we cannot access the form elements
if (
!document.IdPList ||
!document.IdPList.Select
){
return;
}

if (
document.IdPList.user_idp &&
document.IdPList.user_idp.selectedIndex == 0
){
// Set focus to select
document.IdPList.user_idp.focus();
} else {
// Set focus to submit button
document.IdPList.Select.focus();
}
}

// Perform input validation on WAYF form
function checkForm(){
if(
document.IdPList.user_idp &&
document.IdPList.user_idp.selectedIndex == 0
){
alert(unescape('<?php echo getLocalString('make_selection', 'js') ?>'));
return false;
} else {
return true;
}
}

// Init WAYF
function init(){
preventIframeEmbedding();

setFocus();

if (<?php echo ($useImprovedDropDownList) ? 'true' : 'false' ?>){

var searchText = '<?php echo getLocalString('search_idp', 'js') ?>';
$("#userIdPSelection:enabled option[value='-']").text(searchText);

// Convert select element into improved drop down list
$("#userIdPSelection:enabled").improveDropDown({
iconPath:'<?php echo $imageURL ?>/drop_icon.png',
noMatchesText: '<?php echo getLocalString('no_idp_found', 'js') ?>',
noItemsText: '<?php echo getLocalString('no_idp_available', 'js') ?>',
disableRemoteLogos: <?php echo ($disableRemoteLogos) ? 'true' : 'false' ?>
});
}
}

// Call init function when DOM is ready
$(document).ready(init);

-->
</script>
</head>

<body>

<div id="container">
<div class="box">
<div id="header">
<a href="<?php echo sprintf($federationURL, $language) ?>"><img src="./images/logo.png" alt="Federation Logo" id="federationLogo"></a>


</div>
<div id="content">

<!-- Body: Start -->
28 changes: 28 additions & 0 deletions assets/dsroot/custom-notice.php
@@ -0,0 +1,28 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>

<!-- Identity Provider Selection: Start -->
<h1><?php echo getLocalString('settings'); ?></h1>
<form id="IdPList" name="IdPList" method="post" onSubmit="return checkForm()" action="<?php echo $actionURL ?>">
<div id="userInputArea">
<p class="promptMessage"><?php echo getLocalString('confirm_permanent_selection'); ?></p>
<p><?php echo getLocalString('permanent_cookie_notice'); ?></p>
<div style="text-align: center">
<select name="permanent_user_idp" id="userIdPSelection">
<option value="<?php echo $permanentUserIdP ?>" logo="<?php echo $permanentUserIdPLogo ?>"><?php echo $permanentUserIdPName ?></option>
</select>
<input type="submit" accesskey="c" name="clear_user_idp" value="<?php echo getLocalString('delete_permanent_cookie_button') ?>">
<?php if (isValidShibRequest()) : ?>
<br /><br />
<input type="submit" accesskey="s" name="Select" name="permanent" value="<?php echo getLocalString('goto_sp') ?>">
<?php endif ?>
<p>
<?php $scriptURL = "https://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ?>
<?php $fullURL = "<br /><a href=".$scriptURL.">".$scriptURL."</a>" ?>
<?php echo sprintf(getLocalString('permanent_cookie_note'), $fullURL) ?>
</p>
</div>
</div>
</form>

<!-- Identity Provider Selection: End -->
23 changes: 23 additions & 0 deletions assets/dsroot/custom-settings.php
@@ -0,0 +1,23 @@
<?php // Copyright (c) 2016, SWITCH
// CAF 2016 ?>

<!-- Identity Provider Selection: Start -->
<h1><?php echo getLocalString('permanent_select_header'); ?></h1>
<form id="IdPList" name="IdPList" method="post" onSubmit="return checkForm()" action="<?php echo $actionURL ?>">
<div id="userInputArea">
<p class="promptMessage"><?php echo getLocalString('permanent_cookie'); ?></p>
<p><?php echo getLocalString('select_idp'); ?></p>
<div style="text-align: center">
<select name="user_idp" id="userIdPSelection">
<option value="-" <?php echo $defaultSelected ?>><?php echo getLocalString('select_idp') ?> ...</option>
<?php printDropDownList($IDProviders, $selectedIDP) ?>
</select>
<input type="submit" name="Select" accesskey="s" value="<?php echo getLocalString('save_button') ?>" >
</div>
<!-- Value permanent must be a number which is equivalent to the days the cookie should be valid -->
<input name="permanent" type="hidden" value="100">
</div>
</form>


<!-- Identity Provider Selection: End -->
Binary file added assets/dsroot/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions do_overlay.sh
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
set -u
set -e
set -x

# Source the build variables of the container so we can be abstracted
. /root/env

WORKDIR="${CDS_BASE}/_work"

# it is implied that the do_overlay.sh is invoked inside at the root of overlay
MYPATH="${PWD}"
SRC_DSROOT="${MYPATH}/assets/dsroot"

##
## do the 'act of overlaying'
##
#move actual DS php executable to our legacy location
# mv ${CDS_HTMLROOTDIR}/${CDS_HTMLWAYFDIR}/${CDS_WAYFORIGINFILENAME} ${CDS_HTMLROOTDIR}/${CDS_HTMLWAYFDIR}/${CDS_WAYFDESTFILENAME}

# update the images directory

cp ${SRC_DSROOT}/images/logo.png ${CDS_HTMLROOTDIR}/images/

cp ${SRC_DSROOT}/css/default-styles.css ${CDS_HTMLROOTDIR}/css/

# overlay PHP files
cp ${SRC_DSROOT}/*.php ${CDS_HTMLROOTDIR}/



1 change: 1 addition & 0 deletions env
@@ -0,0 +1 @@
overlayFormatVersion=1.0

0 comments on commit 4e5f963

Please sign in to comment.