#set( $labelValue = $i18n.getText($parameters.label) )
#if( !$labelValue )
    #set( $labelValue = $parameters.label )
#end

#if (!$parameters.id)
    #set( $parameters.id = $parameters.name)
#end

<div>
    <label id="${parameters.id}-label" for="$parameters.id">
        ${labelValue}:
    </label>
    #if ($editMode == false)
        #if ($parameters.renderWiki)
        <span class="field-value">$parameters.renderWiki.render($parameters.nameValue)</span>
        #else
        <span class="field-value">$!webwork.htmlEncode($parameters.nameValue)</span>
        #end
    #else
    <textarea id="textarea" name="$!webwork.htmlEncode($parameters.name)"
              cols="$!webwork.htmlEncode($parameters.cols)"
              rows="$!webwork.htmlEncode($parameters.rows)"

            #if ($parameters.disabled && $parameters.disabled == true) disabled="disabled"                                      #end
            #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
              style="#if ($width)width:$width; #end"
              class="monospaceInput"
            >$!webwork.htmlEncode($parameters.nameValue)</textarea>
    #end
    #if ($parameters.description)
        #set($html = $parameters.description)
        <span class="description">$html</span>
    #end
</div>
