×

Notice

The forum is in read only mode.

default country selection when loading page

15 years 5 months ago #441 by Ahmad
Please wait for new release.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
13 years 7 months ago #1742 by Ábaco Creación
Dear Sir:
We tested the new version (1.0.7) and see that several problems have been fixed, but we still have some questions:
One of them is similar to the issue of this post

We want load the default country in the search form, and we edited the file
com_jsjobs / views / jobseekers / tmpl / jobsearch.php
with the line:
window.onload = modsearchjob_dochange ('country', '180 ') / / value in first dropdown
where 180 is the ID of our country, Spain, but does not work.
The drop-down list of countries is shown "**ALL** to load the page and the "state" is displayed as an input box,, not as a drop-down list..

Note: we have "Spain" as the default country in the area of administration, in jsbobs-> configuration tab

Thanks in advance, Alvaro
13 years 7 months ago #1743 by Ahmad
You may do this

Edit the modules/jsjobs.php, function listSearchAddressData

Replace this line
$query  = "SELECT code, name FROM ".$db->nameQuote('#__js_job_countries')." WHERE enabled = 'Y' ORDER BY name ASC";
With
if($val == -1) $query  = "SELECT code, name FROM ".$db->nameQuote('#__js_job_countries')." WHERE enabled = 'Y' ORDER BY name ASC";
                        else $query  = "SELECT code, name FROM ".$db->nameQuote('#__js_job_countries')." WHERE enabled = 'Y' AND code= ".$db->quote($val)." ORDER BY name ASC";

Edit the view/jobseeker/tmpl/jobserach
window.onLoad=dochange('country', 'ES');

It list only Spain in country list.

Please write your valuable review JS Jobs and JS Support Ticket at JED.
13 years 7 months ago #1746 by Ábaco Creación
Hi all:

Thanks for your answer.
We have do the changes, but the field "state" is a text file yet, not a drop-down menu with a list of states in the default country.

For if someone helps, we solve it by adding the line:

Replacing:
window.onLoad=dochange('country', 'ES');
with:
window.onLoad=modsearchjob_dochange('country', 'ES');
window.onLoad=modsearchjob_dochange('state', 'ES');

See you soon...
Time to create page: 0.065 seconds

Please publish modules in offcanvas position.