Commit Graph

42 Commits

Author SHA1 Message Date
David Anderson 0d7d29e986 Web: various changes to remove PHP 8.1 warnings and errors
- implode() cares about arg order
- strlen(), strstr(), stripslashes() don't take null arg
- time() takes no args

There are probably others.
I don't currently have 8.1 set up, and am working off bug reports.
2022-06-11 00:00:08 -07:00
David Anderson de87ee031f web: make forms fluid
web: add optional "extra" arg to form_start, e.g. to allow file upload
web: change form div spacing to be 3+9 rather 4+8
    (could make this a parameter)
web: add form_focus() to initialize focus on a field
web: add optional nrows arg to form_input_textarea()

- add KW_CANADA keyword for WCG
- use https: for BOINC URL
2022-04-06 14:49:06 -07:00
David Anderson 01fc42f44a web: minor tweaks
- allow specification of panel body class
- say "Language: default" in language selector
2020-10-09 12:37:46 -07:00
David Anderson 62f25e4016 Web: make some strings translatable 2020-08-18 23:57:42 -07:00
David Anderson 4a3eb03b26 web: use signup.php instead of deprecated create_account_form.php 2019-04-05 20:34:55 -07:00
David Anderson 1f6b7d4e9d Web: let projects customize their certificate
define CERT_FILENAME in your project.inc to whatever you want;
default is "cert1.php"
2018-10-12 14:07:07 -07:00
David Anderson 2d1c815495 web: more changes related to host stats
- put link in standard menu under "Computing"
- put link in stats page
- change "Host" to "Computer"
2018-08-10 15:41:25 -07:00
Kevin Reed cfa5cd6723 web: Fix autofocus and tab order for the login form 2018-03-09 13:51:41 -06:00
David Anderson da601210c4
Merge branch 'master' into dpa_checkbox 2018-01-08 00:41:58 -08:00
David Anderson 5d37578ecc Add support for "visible password" checkbox
- make redundant password and country optional in create account.
- fix appearance of form items
- remove unused code
2018-01-08 00:35:53 -08:00
David Anderson 1ac3828563 web: change form_checkboxes() so you can specify the state of each one 2018-01-06 01:07:27 -08:00
David Anderson b49d072c9e Web: make it possible to have a single password field with "show" checkbox 2017-12-28 01:26:52 -08:00
David Anderson a8a4b63b8e web: update email and password forms to use bootstrap 2017-11-23 15:11:41 -08:00
David Anderson 76f94b66d7 web: improve password reset form
- call it "Reset password"
- move authenticator-based login to a new file, login_auth.php
  This is intended for admins, not users
- Use bootstrap forms
2017-11-21 15:32:42 -08:00
Michael Kulabuhov a7d322cb05 Fixed displaying the menu "Computing" 2017-08-22 00:59:43 +07:00
David Anderson bc536494dd Web: small changes
- make the filename of user home page configurable
- make some strings translatable
2017-07-13 01:17:21 -07:00
David Anderson 620ba64c72 web: add rules for private messages (similar to forum rules) 2017-07-01 13:43:43 -07:00
David Anderson e712c7af9a web: code shuffle, no functional changes
separate user-related code into:
    user.php (web display of accounts)
    user_util.php (creating/deleting accounts)
2017-06-22 01:07:25 -07:00
David Anderson 415ebacbd1 web: encapsulate PHP
In bootstrap.inc there are some functions for creating forms.
They conceal Bootstrap (and HTML itself) from the caller.
I changed a couple of forms (edit user into and create account) to use this API.
There are many other forms that we could change as well.
This is how I'd like the PHP code to evolve:
encapsulate HTML in utility functions.
We have this for tables, forms, and header/footer.

Also finish the NO_COMPUTING changes.
2017-06-20 00:38:11 -07:00
David Anderson 285ff99cde web: add "Preferences" items to Community, Computing, and Project menus 2017-06-06 15:31:59 -07:00
David Anderson ee3f8f1aa2 Web: paginate user/team lists ordered by per-app credit 2017-03-15 00:59:05 -07:00
UweBeckert 3a9d42e5d8 Update bootstrap.inc
container-fluid uses full window width for the content. Otherwise on big monitors 30% left and right is empty.
2017-03-01 21:38:46 +01:00
David Anderson 93c46ee5a8 web: user secure URL base if available 2017-02-12 01:03:16 -08:00
David Anderson 1e0631dc87 web: allow user URLs with https://
We need to let users have https:// URLs.
Originally http:// was assumed, and the URLs were stored without the prefix.
For compatibility, allow either form to exist in the DB

Also update the "other account info" form to user bootstrap.
2017-02-12 00:46:15 -08:00
David Anderson dfeeee23da Web: support pages in a subdirectory of html/user/.
... such as SETI@home's Nebula pages.
Prepend URL_BASE to URLs for login/logout/signup.
I may have missed some.
2017-02-01 11:54:10 -08:00
David Anderson a68c2b3842 web: add form_attr(); add key/val pair to form 2017-01-31 21:51:17 -08:00
David Anderson b3995e20c0 web: add bootstrap checkbox function 2017-01-23 21:37:30 -08:00
David Anderson 381e0caf14 Remote job submission: add support for per-job templates in submit requests
This supports the TACC use case,
in the jobs in a batch can use different Docker images
and different input and output file signatures,
none of which are known in advance.

Python API binding:
    - A JOB_DESC object can optionally contain wu_template and result_template
        elements, which are the templates (the actual XML) to use for that job.
        Add these to the XML request message if present.
    - Added the same capability to the PHP binding, but not C++.
    - Added and debugged test cases for both languages.

    Also, submit_batch() can take either a batch name (in which case
    the batch is created) or a batch ID
    (in which the batch was created prior to remotely staging files).

RPC handler:
    - in submit_batch(), check for jobs with templates specified
        and store them in files.
        For input templates (which are deleted after creating jobs)
        we put them in /tmp,
        and use a map so that if two templates are the same we use 1 file.
        For output templates (which have to last until all jobs are done)
        we put them in templates/tmp, with content-based filenames
        to economize.
    - When creating jobs, or generating SQL strings for multiple jobs,
        use these names as --wu_template_filename
        and --result_template_filename args to create_work
        (either cmdline args or stdin args)
    - Delete WU templates when done

create_work.cpp:
    handle per-job --wu_template and --result_template args in stdin job lines
    (the names of per-job WU and result templates).
    Maintain a map mapping WU template name to contents,
    to avoid repeatedly reading them.

    For jobs that don't specify templates, use the ones specified
    at the batch level, or the defaults.
2017-01-21 00:24:11 -08:00
David Anderson 5e858aca97 web: if project down for maintenance, say so and quit 2017-01-05 13:25:52 -08:00
David Anderson 0dda2fffa3 some PHP stuff for project X 2016-12-21 22:12:57 -08:00
David Anderson 91025d6b7a web: add utility functions for Bootstrap forms
Bootstrap forms require a bunch of <div>s and other stuff.
I wrapped these in functions like
form_start()
form_end()
form_submit()
form_select_multiple()
form_input_text()

General idea going forward:
put HTML (especially Bootstrap-specified) in utility functions,
e.g. in util.inc or bootstrap.inc.
This will make the higher-level code easier to read,
and will facilitate moving to CSS frameworks other than Bootstrap.
2016-12-16 12:05:30 -08:00
David Anderson 3641a319fc web: improve message display
In messages (forum or PM) a [pre] section with a long line
would stretch the table cell,
causing that message and others to run off the edge of the window.

The solution, as Juha pointed out, is to use table-layout:fixed
for those tables, and to explicitly set the width of the other columns.
This causes the long lines to be put in boxes with a horizontal scrollbar,
and nothing overflows.
2016-12-07 18:17:57 -08:00
David Anderson 391fcbe203 web: tweaks 2016-12-06 19:18:34 -08:00
David Anderson a1f624ceb2 web: add remote job submission link to navbar 2016-12-06 13:55:18 -08:00
David Anderson 91b4dcdc37 web: make some strings translatable
Also: on default home page, don't show the big green Join button
if the user is logged in; they're presumably running BOINC
on at least one computer.
However, in this case put a Join item in the Project menu
in case this is a new computer and they forgot where to download from.
2016-11-29 00:34:26 -08:00
David Anderson 5ea948224e web: make $master_url a global var 2016-11-25 20:41:09 -08:00
David Anderson a22b1e3136 web: various tweaks
- make selects 240px wide (kludge)
- in navbar, link user name to home page
- add Project to navbar, more Your Account there
- add maximum-scale to <meta>
2016-11-24 18:01:41 -08:00
David Anderson 7a492cedf3 project web: various enhancements:
- change default home page to replace text with a Join button,
    which links to a new page saying how to join.
- change default to show image to top of home page
- add form-control class to all <select>s so that text displays
    correctly with dark-background themes
- change args to page_head():
    - add $is_main; gets passed to project_banner()
    - remove $title_plain; not sure what it was for
- add arg for inverse navbar
2016-11-22 01:20:07 -08:00
David Anderson eacd111d75 web: allow customization of navbar "brand" (leftmost item in navbar) 2016-11-14 21:58:12 -08:00
David Anderson 9e5c8c7eb0 web: add optional left-column width arg to grid() 2016-11-14 14:47:40 -08:00
David Anderson 3df12e48a1 web: tweaks. disable "friends and family email" (abused by spammers) 2016-11-11 20:10:12 -08:00
David Anderson c5b948020d Initial commit for Bootstrap 2016-11-11 12:36:27 -08:00