Radio buttons instead of a list box in the embedded DS?

Wessel, Keith kwessel at illinois.edu
Tue Jun 21 11:55:26 EDT 2016


Thanks, Rod.

For the record, I'd love to do static HTML, but that doesn't resolve my issue of endpoint validation against discoveryResponse endopints published in metadata unless I'm missing something. I agree that this is quite complex to just allow a user to select between three IDPs on a list that's static for the most part. If it wasn't used by so many SPs, I'd probably see what I could craft.

Thanks again, we'll see where this goes.

Keith


-----Original Message-----
From: dev [mailto:dev-bounces at shibboleth.net] On Behalf Of Rod Widdowson
Sent: Tuesday, June 21, 2016 10:34 AM
To: 'Shib Dev' <dev at shibboleth.net>
Subject: RE: Radio buttons instead of a list box in the embedded DS?

> Rod, you said it's pretty simple, as I expected, to change the "select
from a list"
> to radio buttons. If we do that, we'd also want to get rid of the link to
take users
> back to the type-ahead text box selection method.

Well I'm not sure that for 3 IdPs I wouldn't just do Peter's suggestion of
just growing some static HTML. 

But what you need to do is 

0) Get the EDS working.
1) Set the config file to be "this.showListFirst = true;"
2) In Idpselect.js (non minimized of course), Modify
buildIdPDropDownListTile to
 - Not build a select statement
 - In the loop do not call buildSelectOption, but rather grow an appropriate
radio button 

     var but = document.createElement('input');
     but.setAttribute('type', 'radio');
     but.value=getEntityId(idp);
     but.name=returnIDParam;

     var div = document.createElement('div');
     div.appendChild(but);
     var text = getLocalizedName(idp);
     if (text.length > maxIdPCharsDropDown) {
          text = text.substring(0, maxIdPCharsDropDown);
     }
     div.appendChild(document.createTextNode(text));

   - Insert the containing div directly into the form

   - make the button's onclick function set a value in the outer form 

	but.onclick = function() {
             	   form.selectedValue = this.value;
            	}

 - Initialize form.selectedValue to -1
 - change the form.onsubmit function to be
        form.onsubmit = function () {
            if (this.selectedValue < 1) {
                return false;
            }
            selectIdP(this.selectedValue);
            return true;
        };
  - supress the "Switcher <a>, and call buildHelpText with form as the
parameter.
3) You may then need to go in and modify the CSS - particularly for the help
text.

So not "pretty simple" as I said, but not mind boggling.

YMMV of course....

HTH

/R

-- 
To unsubscribe from this list send an email to dev-unsubscribe at shibboleth.net


More information about the dev mailing list