Skip to content
Snippets Groups Projects
Commit b1888550 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Usability improvement by Thomas Graff.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1431 44740490-163a-0410-bde0-09ae8108e29a
parent 8e7fb20e
No related branches found
No related tags found
No related merge requests found
...@@ -54,11 +54,10 @@ $this->data['header'] = $this->t('{consent:consent:consent_header}'); ...@@ -54,11 +54,10 @@ $this->data['header'] = $this->t('{consent:consent:consent_header}');
$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/consent/style.css" />' . "\n"; $this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/consent/style.css" />' . "\n";
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
?> ?>
<p> <p>
<?php <?php
echo $this->t('{consent:consent:consent_accept}', array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName )); echo $this->t('{consent:consent:consent_accept}', array( 'SPNAME' => $dstName, 'IDPNAME' => $srcName ));
...@@ -72,12 +71,6 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -72,12 +71,6 @@ $this->includeAtTemplateBase('includes/header.php');
?> ?>
</p> </p>
<p>
<?php
?>
</p>
<form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>"> <form style="display: inline; margin: 0px; padding: 0px" action="<?php echo htmlspecialchars($this->data['yesTarget']); ?>">
<p style="margin: 1em"> <p style="margin: 1em">
...@@ -87,29 +80,26 @@ $this->includeAtTemplateBase('includes/header.php'); ...@@ -87,29 +80,26 @@ $this->includeAtTemplateBase('includes/header.php');
$checked = ($this->data['checked'] ? 'checked="checked"' : ''); $checked = ($this->data['checked'] ? 'checked="checked"' : '');
echo('<input type="checkbox" name="saveconsent" ' . $checked . ' value="1" /> ' . $this->t('{consent:consent:remember}') . ''); echo('<input type="checkbox" name="saveconsent" ' . $checked . ' value="1" /> ' . $this->t('{consent:consent:remember}') . '');
} }
?>
<?php
// Embed hidden fields... // Embed hidden fields...
foreach ($this->data['yesData'] as $name => $value) { foreach ($this->data['yesData'] as $name => $value) {
echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'); echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />');
} }
?> ?>
</p> </p>
<input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{consent:consent:yes}')) ?>" /> <input type="submit" name="yes" id="yesbutton" value="<?php echo htmlspecialchars($this->t('{consent:consent:yes}')) ?>" />
</form> </form>
<form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['noTarget']); ?>" method="get"> <form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['noTarget']); ?>" method="get">
<?php <?php
foreach ($this->data['noData'] as $name => $value) { foreach ($this->data['noData'] as $name => $value) {
echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'); echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />');
} }
?> ?>
<input type="submit" style="display: inline" name="no" id="nobutton" value="<?php echo htmlspecialchars($this->t('{consent:consent:no}')) ?>" /> <input type="submit" style="display: inline" name="no" id="nobutton" value="<?php echo htmlspecialchars($this->t('{consent:consent:no}')) ?>" />
</form> </form>
...@@ -117,7 +107,7 @@ foreach ($this->data['noData'] as $name => $value) { ...@@ -117,7 +107,7 @@ foreach ($this->data['noData'] as $name => $value) {
<?php <?php
if ($this->data['sppp'] !== FALSE) { if ($this->data['sppp'] !== FALSE) {
echo "<p>" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " "; echo "<p>" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " ";
echo "<a target='_new_window' href='" . htmlspecialchars($this->data['sppp']) . "'>" . htmlspecialchars($dstName) . "</a>"; echo "<a target='_blank' href='" . htmlspecialchars($this->data['sppp']) . "'>" . htmlspecialchars($dstName) . "</a>";
echo "</p>"; echo "</p>";
} }
?> ?>
...@@ -127,8 +117,6 @@ if ($this->data['sppp'] !== FALSE) { ...@@ -127,8 +117,6 @@ if ($this->data['sppp'] !== FALSE) {
foreach ($this->data['noData'] as $name => $value) { foreach ($this->data['noData'] as $name => $value) {
echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'); echo('<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />');
} }
?>
<?php
function present_list($attr) { function present_list($attr) {
if (is_array($attr) && count($attr) > 1) { if (is_array($attr) && count($attr) > 1) {
...@@ -159,8 +147,15 @@ foreach ($this->data['noData'] as $name => $value) { ...@@ -159,8 +147,15 @@ foreach ($this->data['noData'] as $name => $value) {
function present_attributes($t, $attributes, $nameParent) { function present_attributes($t, $attributes, $nameParent) {
$alternate = array('odd', 'even'); $i = 0; $alternate = array('odd', 'even'); $i = 0;
$parentStr = (strlen($nameParent) > 0)? strtolower($nameParent) . '_': ''; if(strlen($nameParent) > 0){
$str = (strlen($nameParent) > 0)? '<table class="attributes">': '<table id="table_with_attributes" class="attributes">'; $parentStr = strtolower($nameParent) . '_';
$str = '<table class="attributes">';
}else{
$parentStr = '';
$summary = 'summary="' . $t->t('{consent:consent:table_summary}') . '"';
$str = '<table id="table_with_attributes" class="attributes" '. $summary .'>';
$str .= '<caption>' . $t->t('{consent:consent:table_caption}') . '</caption>';
}
foreach ($attributes as $name => $value) { foreach ($attributes as $name => $value) {
$nameraw = $name; $nameraw = $name;
...@@ -203,7 +198,6 @@ foreach ($this->data['noData'] as $name => $value) { ...@@ -203,7 +198,6 @@ foreach ($this->data['noData'] as $name => $value) {
?> ?>
<!-- Show attributes that are sent to the service in a fieldset. <!-- Show attributes that are sent to the service in a fieldset.
This fieldset is not expanded by default, but can be shown by clicking on the legend. This fieldset is not expanded by default, but can be shown by clicking on the legend.
--> -->
...@@ -219,24 +213,12 @@ foreach ($this->data['noData'] as $name => $value) { ...@@ -219,24 +213,12 @@ foreach ($this->data['noData'] as $name => $value) {
</div> </div>
--> -->
<?php <?php
echo(present_attributes($this, $attributes, '')); echo(present_attributes($this, $attributes, ''));
?> ?>
</fieldset> </fieldset>
<!-- end attribute view --> <!-- end attribute view -->
</form> </form>
<?php <?php
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
?> ?>
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