Вы находитесь на странице: 1из 5

radio.

cmp
<aura:component controller="radioapex">

<div class="slds-text-heading_large"><b><b>Career Path Survey</b></b></div>


<div class="slds-text-body_regular">Thank you for participating ion our career
path survey.
Findings from this survey will be used to determine your career path and
job interests
at this point in your life.Please share your feedback by filling in the
survey below.</div>

<aura:attribute name="newSurvey" type="Survey__c"


default="{ 'sobjectType': 'Survey__c',
'Name': '',
'Dept__c': '',
'years__c': 0,
'position__c': 0}"/>

<aura:attribute name="surveys" type="Survey__c[]"/>

<div>
<lightning:input aura:id="expenseform" label="Your name:"
name="Your name"
value="{!v.newSurvey.Name}"
required="true"/>
</div>
<div>
<lightning:input aura:id="expenseform" label="The department you work for:"
name="The department you work for"
value="{!v.newSurvey.Dept__c}"
required="true"/> </div>

<div>
<lightning:input aura:id="expenseform" label="How many years have you worked in
this company?"
name="How many years have you worked in this company"
value="{!v.newSurvey.years__c}"
required="true"/> </div>

<div>
<lightning:input aura:id="expenseform" label="How many years have you worked in
your current position?"
name="How many years have you worked in your current
position"
value="{!v.newSurvey.position__c}"
required="true"/> </div>

<div class="slds-text-heading_large"><b>How do you feel about your current


position</b> </div>

<c:radioRow mya="myanswer" question="I was trained adequately for my current


position" key="{! v.newSurvey.ansvalue__c }" />

<c:radioRow mya="myanswer1" question="I am skillfull enough to fulfill my


responsibilities" key="{!
v.newSurvey.I_am_skillfull_to_fulfill_responsibilit__c }" />

<c:radioRow mya="myanswer2" question="I have enough time to fufill all my


responsibilities" key="{! v.newSurvey.I_have_time_to_fufill_all_responsibility__c
}" />

<c:radioRow mya="myanswer3" question="I am required to work proper number of


hours" key="{! v.newSurvey.I_am_required_to_work_proper_no_of_hour__c }" />

<c:radioRow mya="myanswer4" question="I find my current position secure" key="{!


v.newSurvey.I_find_my_current_position_secure__c }" />

<c:radioRow mya="myanswer5" question="I think my work is appreciated enough"


key="{! v.newSurvey.I_think_my_work_is_appreciated_enough__c }" />

<div>
<lightning:textarea name="Comments" label="Comments" value="{!
v.newSurvey.comments__c}"/>
</div>

<div class="slds-text-heading_large"><b>How do you feel about your opportunities


for advancements?</b> </div>

<c:radioRow mya="myanswer6" question="I think that the employees at my level can


advance in this company " key="{! v.newSurvey.Employees_at_my_level_can_advance__c
}" />

<c:radioRow mya="myanswer7" question="I am aware of this skills I need to advance"


key="{! v.newSurvey.Aware_of_skills_I_need_to_advance__c }" />

<c:radioRow mya="myanswer8" question="I have access to the skills needed to


advance" key="{! v.newSurvey.Have_access_to_skills_I_need_to_advance__c }" />

<c:radioRow mya="myanswer9" question="I know exactly what the criteria for


promotion are" key="{! v.newSurvey.I_know_criteria_for_promotion__c }" />

<c:radioRow mya="myanswer10" question="I know I will be considered for advancement


if I meet the criteria for promotion " key="{!
v.newSurvey.I_will_be_advanced_if_I_meet_criteria__c }" />

<!--<aura:attribute name="options" type="List" default="[


{'label': 'Business
technology', 'value': 'Business technology'},
{'label': 'Leadership',
'value': 'Leadership'},
{'label': 'Management',
'value': 'Management'},

{'label': 'Sales techniques', 'value': 'Sales techniques'},


{'label': 'Software', 'value':
'Software'},
{'label': 'Teamwork', 'value':
'Teamwork'},
{'label': 'Technical
certifications', 'value': 'Technical certifications'},
{'label': 'Time management',
'value': 'Time management'},
{'label': 'Other (please
specify)', 'value': 'Other (please specify)'},
]"/>
<aura:attribute name="checkboxValue" type="List"/>
<aura:handler name="change" value="{!v.checkboxValue}" action="{!
c.checkboxHandler}"/>
<div>
<lightning:checkboxGroup
aura:id="mygroup"
name="checkboxGroup"
label="What skills do you still need in order to continue
your advancement?"
options="{! v.options }"
value="{! v.newSurvey.what_skills_need_to_improve__c }"
required="true"
onchange="{! c.checkboxHandler }"/>

<label for="other"></label>
<input type="text" id="other" />
</div> -->
<div class="slds-text-body_regular"><b> What skills do you still need in order
to continue your advancement? </b> </div>
<aura:attribute type="List" name="selectedCheckBoxes" default="[]" />
<lightning:input type="checkbox" label="Business technology" name="Business
technology" aura:id="Business technology" value="Business technology" onchange="{!
c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Leadership" name="Leadership"
aura:id="Leadership" value="Leadership" onchange="{! c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Management" name="Management"
aura:id="Management" value="Management" onchange="{! c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Sales techniques" name="Sales techniques"
aura:id="Sales techniques" value="Sales techniques" onchange="{!
c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Software" name="Software"
aura:id="Software" value="Software" onchange="{! c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Teamwork" name="Teamwork"
aura:id="Teamwork" value="Teamwork" onchange="{! c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Technical certifications" name="Technical
certifications" aura:id="Technical certifications" value="Technical certifications"
onchange="{! c.callCheckboxMethod }" />
<lightning:input type="checkbox" label="Time management" name="Time management"
aura:id="Time management" value="Time management" onchange="{! c.callCheckboxMethod
}" />
<lightning:input type="checkbox" label="Other (please specify)" name="Other (please
specify)" aura:id="Other (please specify)" value="Other (please specify)"
onchange="{! c.callCheckboxMethod }" />

<div class="slds-text-heading_large"><b>How do you feel about your current career


progress?</b> </div>

<c:radioRow mya="myanswer11" question="I can say I am satisfied with my career


progress so far" key="{!
v.newSurvey.I_am_satisfied_with_my_career_progress__c}" />

<c:radioRow mya="myanswer12" question="I declare myself satisfied with my personal


progress" key="{! v.newSurvey.satisfied_with_my_personal_progress__c }" />

<c:radioRow mya="myanswer13" question="I have an appropriate salary for someone at


my level" key="{! v.newSurvey.Have_appropriate_salary_for_someone__c }" />
<c:radioRow mya="myanswer14" question="I think I control my career" key="{!
v.newSurvey.I_think_I_control_my_career__c }" />

<c:radioRow mya="myanswer15" question="I am decided to continue my career at this


company" key="{! v.newSurvey.I_ll_continue_my_career_at_this_company__c}" />

<aura:attribute name="satisfy" type="List" default="[


{'label': 'Very Satisfied',
'value': 'Very Satisfied'},
{'label': 'Satisfied',
'value': 'Satisfied'},
{'label': 'Neutral',
'value': 'Neutral'},
{'label': 'Dissatisfied',
'value': 'Dissatisfied'},
{'label': 'Very
Dissatisfied', 'value': 'Very Dissatisfied'}
]"/>
<aura:attribute name="satisfyValue" type="String" />
<lightning:radioGroup name="mysatisfy"
label="How satisfied are you with your career?"
options="{! v.satisfy }"
value="{!
v.newSurvey.How_satisfied_with_your_career__c }"
type="radio"
/>

<div>
<lightning:textarea name="Feel free to add any comments" label="Feel free to add
any comments" value="{!v.newSurvey.Feel_free_to_add_any_comments__c}"/>
</div>

<lightning:layout horizontalAlign="center">
<lightning:button label="Submit"
class="slds-m-top--medium"
variant="brand"
onclick="{!c.clickCreate}"/>
</lightning:layout>

</aura:component>

radioRow.cmp

<aura:component >
<aura:attribute name="mya" type="String" />
<aura:attribute name="question" type="String" />
<aura:attribute name="key" type="String" />

<aura:attribute name="answer" type="List" default="[


{'label': 'Strongly Agree',
'value': 'Strongly Agree'},
{'label': 'Agree', 'value':
'Agree'},
{'label': 'Neutral',
'value': 'Neutral'},
{'label': 'Disagree',
'value': 'Disagree'},
{'label': 'Strongly
Disagree', 'value': 'Strongly Disagree'},
]"/>

<lightning:radioGroup name="{!v.mya}"
label="{!v.question}"
options="{! v.answer }"
value="{!v.key}"
type="radio"
class="customRadioCls"
/>
</aura:component>

Вам также может понравиться