Skip to content

Commit 40cd9e1

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents 5fdbe1c + 14c6dd5 commit 40cd9e1

File tree

2 files changed

+65
-116
lines changed

2 files changed

+65
-116
lines changed

assets/vue/components/installer/Step3.vue

Lines changed: 59 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -87,128 +87,69 @@
8787
"
8888
/>
8989

90-
<div class="field">
91-
<div class="p-float-label">
92-
<InputText
93-
id="person_name"
94-
v-model="contact.personName"
95-
size="30"
96-
type="text"
97-
/>
98-
<label
99-
v-t="'Name'"
100-
for="person_name"
101-
/>
102-
</div>
103-
</div>
90+
<BaseInputText
91+
id="person_name"
92+
v-model="contact.personName"
93+
:label="t('Name')"
94+
/>
10495

105-
<div class="field">
106-
<div class="p-float-label">
107-
<InputText
108-
id="person_email"
109-
v-model="contact.personEmail"
110-
size="30"
111-
type="email"
112-
/>
113-
<label
114-
v-t="'E-mail'"
115-
for="person_email"
116-
/>
117-
</div>
118-
</div>
96+
<BaseInputText
97+
id="person_email"
98+
v-model="contact.personEmail"
99+
:label="t('E-mail')"
100+
/>
119101

120-
<div class="field">
121-
<div class="p-float-label">
122-
<InputText
123-
id="company_name"
124-
v-model="contact.companyName"
125-
size="30"
126-
type="text"
127-
/>
128-
<label
129-
v-t="'Your company\'s name'"
130-
for="company_name"
131-
/>
132-
</div>
133-
</div>
102+
<BaseInputText
103+
id="company_name"
104+
v-model="contact.companyName"
105+
:label="t('Your company\'s name')"
106+
/>
134107

135-
<div class="field">
136-
<div class="p-float-label">
137-
<Dropdown
138-
v-model="contact.companyActivity"
139-
:options="installerData.stepData.activitiesList"
140-
:placeholder="t('Select one')"
141-
input-id="company_activity"
142-
/>
143-
<label
144-
v-t="'Your company\'s activity'"
145-
for="company_activity"
146-
/>
147-
</div>
148-
</div>
149-
<div class="field">
150-
<div class="p-float-label">
151-
<Dropdown
152-
v-model="contact.jobRole"
153-
:options="installerData.stepData.rolesList"
154-
:placeholder="t('Select one')"
155-
input-id="person_role"
156-
/>
157-
<label
158-
v-t="'Your job\'s description'"
159-
for="person_role"
160-
/>
161-
</div>
162-
</div>
108+
<BaseDropdown
109+
v-model="contact.companyActivity"
110+
:label="t('Your company\'s activity')"
111+
:options="installerData.stepData.activitiesList"
112+
input-id="company_activity"
113+
name="company_activity"
114+
option-label="0"
115+
option-value="0"
116+
/>
163117

164-
<div class="field">
165-
<div class="p-float-label">
166-
<Dropdown
167-
v-model="contact.companyCountry"
168-
:filter="true"
169-
:options="installerData.stepData.countriesList"
170-
:placeholder="t('Select one')"
171-
input-id="country"
172-
/>
173-
<label
174-
v-t="'Your company\'s home country'"
175-
for="country"
176-
/>
177-
</div>
178-
</div>
118+
<BaseDropdown
119+
v-model="contact.jobRole"
120+
:label="t('Your job\'s description')"
121+
:options="installerData.stepData.rolesList"
122+
input-id="person_role"
123+
name="person_role"
124+
option-label="0"
125+
option-value="0"
126+
/>
179127

180-
<div class="field">
181-
<div class="p-float-label">
182-
<InputText
183-
id="company_city"
184-
v-model="contact.companyCity"
185-
size="30"
186-
type="text"
187-
/>
188-
<label
189-
v-t="'Company city'"
190-
for="company_city"
191-
/>
192-
</div>
193-
</div>
128+
<BaseDropdown
129+
v-model="contact.companyCountry"
130+
:label="t('Your company\'s home country')"
131+
:options="installerData.stepData.countriesList"
132+
input-id="country"
133+
name="country"
134+
option-label="0"
135+
option-value="0"
136+
/>
194137

195-
<div class="field">
196-
<div class="p-float-label">
197-
<Dropdown
198-
v-model="contact.contactLanguage"
199-
:filter="true"
200-
:options="installerData.stepData.languagesList"
201-
:placeholder="t('Select one')"
202-
input-id="language"
203-
option-label="1"
204-
option-value="0"
205-
/>
206-
<label
207-
v-t="'Preferred contact language'"
208-
for="language"
209-
/>
210-
</div>
211-
</div>
138+
<BaseInputText
139+
id="company_city"
140+
v-model="contact.companyCity"
141+
:label="t('Company city')"
142+
/>
143+
144+
<BaseDropdown
145+
v-model="contact.contactLanguage"
146+
:label="t('Preferred contact language')"
147+
:options="installerData.stepData.languagesList"
148+
input-id="language"
149+
name="country"
150+
option-label="1"
151+
option-value="0"
152+
/>
212153

213154
<label v-t="'Do you have the power to take financial decisions on behalf of your company?'" />
214155
<div class="formgroup-inline">
@@ -294,6 +235,8 @@ import Dropdown from "primevue/dropdown"
294235
import InputText from "primevue/inputtext"
295236
import RadioButton from "primevue/radiobutton"
296237
import Button from "primevue/button"
238+
import BaseInputText from "../basecomponents/BaseInputText.vue"
239+
import BaseDropdown from "../basecomponents/BaseDropdown.vue"
297240
298241
const { t } = useI18n()
299242

public/main/admin/access_url_edit.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* @author Julio Montoya <gugli100@gmail.com>
77
*/
88

9+
use Chamilo\CoreBundle\Framework\Container;
10+
use Chamilo\CoreBundle\ServiceHelper\AccessUrlHelper;
911
use Symfony\Component\HttpFoundation\Request as HttpRequest;
1012

1113
$cidReset = true;
@@ -52,6 +54,10 @@
5254
$submit_name = get_lang('Add URL');
5355
}
5456

57+
$form->addHidden(
58+
'parentResourceNodeId',
59+
Container::$container->get(AccessUrlHelper::class)->getFirstAccessUrl()->resourceNode->getId()
60+
);
5561
$form->addButtonCreate($submit_name);
5662

5763
//the first url with id = 1 will be always active

0 commit comments

Comments
 (0)