#556 new
Michael Gibson

increase the length of the options' text input

Reported by Michael Gibson | April 13th, 2012 @ 04:26 PM

  • Issue Type: Improvement
  • Rundeck version: 1.4.2

Issue:

We have a need to input text into options that is greater in length than the maxlength="256".
Perhaps an option to make the text box a textarea input with a configurable maxlength would be better?
If this isn't possible or the preferred method, ticket 214 would also provide a workaround for what we need:
http://rundeck.lighthouseapp.com/projects/59277-development/tickets...


Reproduce: (Enter steps to reproduce bug here.)

Comments and changes to this ticket

  • Michael Gibson

    Michael Gibson April 13th, 2012 @ 04:26 PM

    • no changes were found...
  • Michael Gibson

    Michael Gibson April 23rd, 2012 @ 03:26 PM

    One workaround is to put javascript in the option's description that replaces the option's input element with a textarea element.

    < elem.attributes.length; i++) { var attrib = elem.attributes[i]; if (attrib.specified == true) { newNode.setAttribute(attrib.name,attrib.value); } } parent.replaceChild(newNode,elem); } tagId=document.getElementsByName("extra.option.opt1")[0].id; transformTag(tagId); document.getElementsByName("extra.option.opt1")[0].setAttribute('rows','25'); document.getElementsByName("extra.option.opt1")[0].setAttribute('cols','50'); document.getElementsByName("extra.option.opt1")[0].setAttribute('maxlength','10000');
  • Michael Gibson

    Michael Gibson April 23rd, 2012 @ 03:29 PM

    re-formatting :(

    
    function transformTag(tagId){
        var elem = document.getElementById(tagId);
        var children = elem.childNodes;
        var parent = elem.parentNode;
        var newNode = document.createElement("textarea");
        for(var i=0;i<children.length;i++){
            newNode.appendChild(children[i]);
        }
        for (var i = 0; i < elem.attributes.length; i++) {
            var attrib = elem.attributes[i];
            if (attrib.specified == true) {
               newNode.setAttribute(attrib.name,attrib.value);
            }
        }
        parent.replaceChild(newNode,elem);
    }
    
    
    tagId=document.getElementsByName("extra.option.opt1")[0].id;
    transformTag(tagId);
    
    document.getElementsByName("extra.option.opt1")[0].setAttribute('rows','25');
    document.getElementsByName("extra.option.opt1")[0].setAttribute('cols','50');
    document.getElementsByName("extra.option.opt1")[0].setAttribute('maxlength','10000');
    

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

(DEPRECATED) Please use github issues for issue tracking at http://github.com/dtolabs/rundeck/issues

Shared Ticket Bins

People watching this ticket

Pages