Disable immutable inputs when editing a challenge (#9412)

* Disable uneditable inputs when editing a challenge

* Revert prize display when creating
This commit is contained in:
MathWhiz
2017-11-17 06:45:38 -06:00
committed by Keith Holliday
parent 67564317fb
commit 89e4cbcffe

View File

@@ -8,7 +8,7 @@
.form-group .form-group
label label
strong(v-once) {{$t('shortName')}} * strong(v-once) {{$t('shortName')}} *
b-form-input(type="text", :placeholder="$t('shortNamePlaceholder')", v-model="workingChallenge.shortName") b-form-input(type="text", :placeholder="$t('shortNamePlaceholder')", v-model="workingChallenge.shortName" :disabled="!creating")
.form-group .form-group
label label
strong(v-once) {{$t('challengeSummary')}} * strong(v-once) {{$t('challengeSummary')}} *
@@ -59,7 +59,7 @@
// see https://github.com/HabitRPG/habitica/blob/develop/website/views/options/social/challenges.jade#L134 // see https://github.com/HabitRPG/habitica/blob/develop/website/views/options/social/challenges.jade#L134
button.btn.btn-primary(v-once, v-if='creating', @click='createChallenge()') {{$t('createChallengeCloneTasks')}} button.btn.btn-primary(v-once, v-if='creating', @click='createChallenge()') {{$t('createChallengeCloneTasks')}}
button.btn.btn-primary(v-once, v-if='!creating', @click='updateChallenge()') {{$t('updateChallenge')}} button.btn.btn-primary(v-once, v-if='!creating', @click='updateChallenge()') {{$t('updateChallenge')}}
.col-12.text-center .col-12.text-center(v-if='creating')
p(v-once) {{$t('challengeMinimum')}} p(v-once) {{$t('challengeMinimum')}}
</template> </template>