Ignore:
Timestamp:
2001-05-15T11:08:08+12:00 (23 years ago)
Author:
sjboddie
Message:

re-added the "set preferences" button to the preferences page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/pageaction.cpp

    r2370 r2415  
    6060  arg_ainfo.savedarginfo = cgiarginfo::mustnot;
    6161  argsinfo.addarginfo (NULL, arg_ainfo);
     62
     63  arg_ainfo.shortname = "bp";
     64  arg_ainfo.longname = "set preferences button";
     65  arg_ainfo.multiplechar = true;
     66  arg_ainfo.defaultstatus = cgiarginfo::weak;
     67  arg_ainfo.argdefault = "";
     68  arg_ainfo.savedarginfo = cgiarginfo::mustnot;
     69  argsinfo.addarginfo (NULL, arg_ainfo);
    6270}
    6371
     
    6573}
    6674
    67 bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &/*args*/,
     75bool pageaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, cgiargsclass &args,
    6876                ostream &/*logout*/) {
    69   // don't want to check anything yet.
     77
     78  if (args["p"] == "preferences" && !args["bp"].empty()) {
     79    if (args["hd"] != "0") args["hd"] = args["hdn"];
     80  }
     81
    7082  return true;
    7183}
     
    306318  // _numbrowseoptions_    the number of browsing options
    307319
     320  // _prefschanged_        will be set to _textprefschanged_ if the "set preferences" button
     321  //                       was pressed
     322
    308323
    309324  // if page is "help"
     
    472487      encodingoption += "</select>\n";
    473488      disp.setmacro ("encodingoption", "preferences", encodingoption);
     489    }
     490
     491    // _prefschanged_
     492    if (!args["bp"].empty()) {
     493      disp.setmacro ("prefschanged", "preferences", "_textprefschanged_");
    474494    }
    475495   
Note: See TracChangeset for help on using the changeset viewer.