|
@ -4,18 +4,55 @@ |
|
|
|
|
|
|
|
|
<input type="hidden" name="_token" value={ state.csrfToken } if={ state.csrfToken } /> |
|
|
<input type="hidden" name="_token" value={ state.csrfToken } if={ state.csrfToken } /> |
|
|
|
|
|
|
|
|
<!-- title --> |
|
|
|
|
|
|
|
|
<!-- name --> |
|
|
<div class="field is-horizontal"> |
|
|
<div class="field is-horizontal"> |
|
|
<div class="field-label is-normal"> |
|
|
<div class="field-label is-normal"> |
|
|
<label class="label" for="title"> |
|
|
|
|
|
title |
|
|
|
|
|
|
|
|
<label class="label required" for="name"> |
|
|
|
|
|
name |
|
|
</label> |
|
|
</label> |
|
|
</div> |
|
|
</div> |
|
|
<div class="field-body"> |
|
|
<div class="field-body"> |
|
|
<div class="field"> |
|
|
<div class="field"> |
|
|
<p class="control"> |
|
|
<p class="control"> |
|
|
<input id="title" class={ getClasses('title', 'input') } type="text" name="title" value={ props.title } onkeyup={ (event) => { state.validator.handle(event, 'title') }} /> |
|
|
|
|
|
<field-error errors={ state.validator.errors('title') } ></field-error> |
|
|
|
|
|
|
|
|
<input id="name" class={ getClasses('name', 'input') } type="text" name="name" value={ props.name } onkeyup={ (event) => { state.validator.handle(event, 'name') }} /> |
|
|
|
|
|
<field-error errors={ state.validator.errors('name') } ></field-error> |
|
|
|
|
|
</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- description --> |
|
|
|
|
|
<div class="field is-horizontal"> |
|
|
|
|
|
<div class="field-label is-normal"> |
|
|
|
|
|
<label class="label" for="description"> |
|
|
|
|
|
description |
|
|
|
|
|
</label> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="field-body"> |
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
<p class="control"> |
|
|
|
|
|
<textarea id="description" class={ getClasses('description', 'textarea') } name="description" value={ props.description } onkeyup={ (event) => { state.validator.handle(event, 'description') }}></textarea> |
|
|
|
|
|
<field-error errors={ state.validator.errors('description') } ></field-error> |
|
|
|
|
|
</p> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- path --> |
|
|
|
|
|
<div class="field is-horizontal"> |
|
|
|
|
|
<div class="field-label is-normal"> |
|
|
|
|
|
<label class="label" for="name"> |
|
|
|
|
|
path |
|
|
|
|
|
</label> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="field-body"> |
|
|
|
|
|
<div class="field"> |
|
|
|
|
|
<p class="control"> |
|
|
|
|
|
<input id="path" class={ getClasses('path', 'input') } type="text" name="path" value={ props.path } onkeyup={ (event) => { state.validator.handle(event, 'path') }} /> |
|
|
|
|
|
<field-error errors={ state.validator.errors('path') } ></field-error> |
|
|
|
|
|
<span class="help"> |
|
|
|
|
|
path for storage files, if empty default path will be used |
|
|
|
|
|
</span> |
|
|
</p> |
|
|
</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -31,6 +68,9 @@ |
|
|
<div class="field-body"> |
|
|
<div class="field-body"> |
|
|
<div class="field"> |
|
|
<div class="field"> |
|
|
<input id="public" type="checkbox" name="public" value="1" checked={ props.public }> |
|
|
<input id="public" type="checkbox" name="public" value="1" checked={ props.public }> |
|
|
|
|
|
<span class="help"> |
|
|
|
|
|
everyone can see bucket, files and download them |
|
|
|
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -69,8 +109,16 @@ |
|
|
*/ |
|
|
*/ |
|
|
onBeforeMount(props, state) { |
|
|
onBeforeMount(props, state) { |
|
|
state.validator = new Validator({ |
|
|
state.validator = new Validator({ |
|
|
title: { |
|
|
|
|
|
presence: true |
|
|
|
|
|
|
|
|
name: { |
|
|
|
|
|
presence: true, |
|
|
|
|
|
length: { |
|
|
|
|
|
maximum: 255 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
description: { |
|
|
|
|
|
length: { |
|
|
|
|
|
maximum: 255 |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, this) |
|
|
}, this) |
|
|
|
|
|
|
|
|