Skip to content

Commit

Permalink
Add translation and placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
felixheidecke authored and DeepDiver1975 committed Aug 14, 2019
1 parent ffcc384 commit 1760e12
Showing 1 changed file with 24 additions and 17 deletions.
41 changes: 24 additions & 17 deletions apps/files/src/components/FileLinkForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</div>
<label class="uk-width-expand" @click="permissions = 1">
<span>Viewer</span><br>
<span class="uk-text-meta">Recipients can view and download contents.</span>
<span class="uk-text-meta" v-translate>Recipients can view and download contents.</span>
</label>
</div>
<div v-if="$_isFolder" class="uk-margin uk-grid-small" uk-grid>
Expand All @@ -27,16 +27,16 @@
</div>
<label class="uk-width-expand" @click="permissions = 15">
<span v-translate>Contributor</span><br>
<span class="uk-text-meta">Recipients can view, download and upload contents.</span>
<span class="uk-text-meta" v-translate>Recipients can view, download and upload contents.</span>
</label>
</div>
<div v-if="$_isFolder" class="uk-margin uk-grid-small" uk-grid>
<div class="uk-width-auto">
<input type="radio" class="uk-radio" v-model="permissions" value="5" />
</div>
<label class="uk-width-expand" @click="permissions = 5">
<span>Editor</span><br>
<span class="uk-text-meta">Recipients can view, download, edit, delete and upload contents.</span>
<span v-translate>Editor</span><br>
<span class="uk-text-meta" v-translate>Recipients can view, download, edit, delete and upload contents.</span>
</label>
</div>
<div v-if="$_isFolder" class="uk-margin uk-grid-small" uk-grid>
Expand All @@ -45,39 +45,39 @@
</div>
<label class="uk-width-expand" @click="permissions = 4">
<span v-translate>Uploader</span><br>
<span class="uk-text-meta">Receive files from multiple recipients without revealing the contents of the folder.</span>
<span class="uk-text-meta" v-translate>Receive files from multiple recipients without revealing the contents of the folder.</span>
</label>
</div>
<h4 class="uk-margin-medium-top uk-heading-divider">
<h4 class="uk-margin-medium-top uk-heading-divider" v-translate>
Security settings
</h4>
<div class="uk-margin uk-grid-small uk-flex uk-flex-middle" uk-grid>
<div v-if="$_expirationDate" class="uk-width-1-1 uk-width-2-5@m">
<label class="uk-form-label" for="">Expiration date<em v-if="$_expirationDate.enforced" class="uk-margin-small-left">(required)</em></label>
<input type="text" class="uk-input" :class="{ 'uk-form-danger': !$_expirationIsValid }" v-model="expireDate" />
<label class="uk-form-label" for=""><span v-translate>Expiration date</span><em v-if="$_expirationDate.enforced" class="uk-margin-small-left">(<span v-translate>required</span>)</em></label>
<input type="text" class="uk-input" :class="{ 'uk-form-danger': !$_expirationIsValid }" v-model="expireDate" :placeholder="placeholder.expireDate" />
</div>
<div class="uk-width-1-1 uk-width-3-5@m">
<label class="uk-form-label" for="">Password<em v-if="$_passwordEnforced" class="uk-margin-small-left">(required)</em></label>
<input type="password" class="uk-input" :class="{ 'uk-form-danger': !$_passwordIsValid }" v-model="password" :placeholder="hasPassword && password === null? '********' : ''"/>
<label class="uk-form-label" for=""><span v-translate>Password</span><em v-if="$_passwordEnforced" class="uk-margin-small-left">(<span v-translate>required</span>)</em></label>
<input type="password" class="uk-input" :class="{ 'uk-form-danger': !$_passwordIsValid }" v-model="password" :placeholder="hasPassword && password === null? '********' : placeholder.password"/>
</div>
</div>
<!-- @TODO: Enable Mail API to use the following
++++++++++++++++++++++++++++++++++++
<template v-if="$_sendMailEnabled">
<h4 class="uk-margin-medium-top uk-heading-divider">
Send mail notification
</h4>
<div class="uk-margin">
<!-- <input type="text" class="uk-input" placeholder="E-Mail-Recipients" /> -->
<input type="text" class="uk-input" placeholder="E-Mail-Recipients (API MISSING)" disabled />
<input type="text" class="uk-input" :placeholder="placeholder.mailTo" />
</div>
<div class="uk-margin">
<!-- <textarea class="uk-textarea" placeholder="Personal note" rows="4"></textarea> -->
<textarea class="uk-textarea" placeholder="Personal note (API MISSING)" rows="4" disabled></textarea>
<textarea class="uk-textarea" :placeholder="placeholder.mailBody rows="4"></textarea>
</div>
<div class="uk-margin">
<!-- <label><input type="checkbox" class="uk-checkbox uk-margin-small-right"> Send a copy to myself</label> -->
<label><input type="checkbox" class="uk-checkbox uk-margin-small-right" disabled> Send a copy to myself</label>
<label><input type="checkbox" class="uk-checkbox uk-margin-small-right" v-translate>Send a copy to myself</label>
</div>
</template>
-->
<div class="uk-text-right">
<oc-button @click="$_closeForm">Cancel</oc-button>
<oc-button v-if="!sharesLoading && $_isNew" :disabled="!$_isValid" variation="primary" @click="$_addLink" v-translate>Create</oc-button>
Expand All @@ -96,7 +96,14 @@ export default {
data () {
return {
password: null,
...this.params
...this.params,
placeholder: {
expireDate: this.$gettext('Expiration date'),
password: this.$gettext('Password'),
mailTo: this.$gettext('Mail recipients'),
mailBody: this.$gettext('Personal note')
}
}
},
title: ($gettext) => {
Expand Down

0 comments on commit 1760e12

Please sign in to comment.