Changeset 5375

Show
Ignore:
Timestamp:
12/08/07 10:45:25 (1 year ago)
Author:
p_lindheimer
Message:

add warning and red highlight to Unknown Destinations that was the previous Custom App field (drawselect)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php

    r5332 r5375  
    17001700        //display a custom goto field 
    17011701        if ($custom_selected || $show_custom) { 
    1702         $radioid = uniqid("drawselect"); 
    1703         $selectHtml .= '<input type="radio" id="'.$radioid.'" name="goto'.$i.'" value="custom" '. 
     1702                if ($show_custom) { 
     1703                        $custom_style = ""; 
     1704                        $custom_background = ""; 
     1705                } else { 
     1706                        $custom_style      = " style='color:red' "; 
     1707                        $custom_background = " style='background:red' readonly='yes' "; 
     1708                } 
     1709                $radioid = uniqid("drawselect"); 
     1710                $selectHtml .= '<input type="radio" id="'.$radioid.'" name="goto'.$i.'" value="custom" '. 
    17041711                       //'onclick="javascript:this.form.goto'.$i.'.value=\'custom\';" '. 
    17051712                       //'onkeypress="javascript:if (event.keyCode == 0 || (document.all && event.keyCode == 13)) this.form.goto'.$i.'.value=\'custom\';" '. 
    17061713                       ($custom_selected ? 'CHECKED=CHECKED' : '').' />'; 
    1707         $selectHtml .= '<a href="#" class="info"> '._("Custom App<span><br>ADVANCED USERS ONLY<br><br>Uses Goto() to send caller to a custom context.<br><br>The context name should start with \"custom-\", and be in the format custom-context,extension,priority. Example entry:<br><br><b>custom-myapp,s,1</b><br><br>The <b>[custom-myapp]</b> context would need to be created and included in extensions_custom.conf</span>").'</a>:'; 
    1708         $selectHtml .= '<input type="text" size="15" name="custom'.$i.'" value="'.($custom_selected ? $goto : '').'" onfocus="document.getElementById(\''.$radioid.'\').checked = true;" />'; 
     1714               $selectHtml .= '<a href="#" class="info" '.$custom_style.'>'._("Unknown Destination").'&nbsp;<span>'._("ERROR: You have an unknown destination. If this was carried over as a Custom App from an earlier version, you must go register the destination in the Custom Destination tab provided by the Custom Applications module.<br />This will remain active until you change it but you can no longer edit or add a new one here.").'</span></a>:'; 
     1715               $selectHtml .= '<input '.$custom_background.' type="text" size="15" name="custom'.$i.'" value="'.($custom_selected ? $goto : '').'" onfocus="document.getElementById(\''.$radioid.'\').checked = true;" />'; 
    17091716 
    17101717        //close off our row