Changeset 5892

Show
Ignore:
Timestamp:
07/03/08 05:49:34 (3 months ago)
Author:
lazytt
Message:

#1821 set default to generate a speed dial; also reorder name and number

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/phonebook/functions.inc.php

    r2881 r5892  
    8181                // Should we really automatically generate a speeddial ?  
    8282                // If yes I think we should start from 99 going down and leave easier speeddials to users  
    83                 if (empty($speeddial)) {  
     83                if (isset($_POST['needsd'])){ 
     84    if (empty($speeddial)) {  
    8485                        for ($nbr = 99; $nbr > 0; $nbr--) {  
    8586                                if ($astman->database_get("sysspeeddials",sprintf("%02d",$nbr))===false) { 
     
    8889                                } 
    8990                        } 
     91                } 
    9092                } 
    9193                $astman->database_put("cidname",$number, '"'.$name.'"'); 
  • modules/branches/2.5/phonebook/page.phonebook.php

    r4767 r5892  
    150150        <tr><td colspan="4"><h5><?php echo _("Add or replace entry") ?><hr></h5></td></tr> 
    151151 
     152 
     153        <tr> 
     154                <td><a href="#" class="info"><?php echo _("Name:")?><span><?php echo _("Enter the name")?></span></a></td> 
     155                <td><input type="text" name="name"></td> 
     156        </tr> 
     157 
    152158        <tr> 
    153159                <td><a href="#" class="info"><?php echo _("Number:")?> 
     
    155161                <td><input type="text" name="number"></td> 
    156162        </tr> 
    157  
    158         <tr> 
    159                 <td><a href="#" class="info"><?php echo _("Name:")?><span><?php echo _("Enter the name")?></span></a></td> 
    160                 <td><input type="text" name="name"></td> 
    161         </tr> 
    162  
     163         
    163164        <tr> 
    164165                <td><a href="#" class="info"><?php echo _("Speed dial code:")?><span><?php echo _("Enter a speed dial code<br/>Speeddial module is required to use speeddial codes")?></span></a></td> 
    165166                <td><input type="text" name="speeddial"></td> 
    166167        </tr> 
    167  
    168         <tr> 
    169                 <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>           
     168         
     169  <tr> 
     170                <td><a href="#" class="info"><?php echo _("Set Speed Dial?"); ?><span><?php echo _("Check to have a speed dial created automaticaly for this number"); ?></span></a></td> 
     171                <td><input type="checkbox" name="needsd" value="" CHECKED <?php echo $thisItem['needsd'] ?>  /></td> 
     172        </tr> 
     173         
     174  <tr> 
     175                <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6> 
    170176        </tr> 
    171177</form> 
     
    196202 
    197203var theForm = document.edit; 
    198 theForm.number.focus(); 
     204theForm.name.focus(); 
    199205 
    200206function edit_onsubmit() { 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads