- 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.
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
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.
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.
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.
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.
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.
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.
- 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>
- 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