1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-12 23:09:03 +01:00
fab-manager/app/frontend/templates/spaces/_form.html

132 lines
6.4 KiB
HTML
Raw Normal View History

2017-02-14 13:36:10 +01:00
<uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="form-group m-b-lg" ng-class="{'has-error': spaceForm['space[name]'].$dirty && spaceForm['space[name]'].$invalid}">
2019-12-17 18:06:56 +01:00
<label for="space_name" class="col-sm-2 control-label">{{ 'app.shared.space.name' | translate }} *</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-4">
<input ng-model="space.name"
type="text"
name="space[name]"
class="form-control"
id="space_name"
2019-12-17 18:06:56 +01:00
placeholder="{{'app.shared.space.name' | translate}}"
2017-02-14 13:36:10 +01:00
required>
2019-12-17 18:06:56 +01:00
<span class="help-block" ng-show="spaceForm['space[name]'].$dirty && spaceForm['space[name]'].$error.required" translate>{{ 'app.shared.space.name_is_required' }}</span>
2017-02-14 13:36:10 +01:00
</div>
</div>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="form-group m-b-lg">
2019-12-17 18:06:56 +01:00
<label for="space_image" class="col-sm-2 control-label">{{ 'app.shared.space.illustration' | translate }} *</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-10">
<div class="fileinput" data-provides="fileinput" ng-class="fileinputClass(space.space_image)">
<div class="fileinput-new thumbnail" style="width: 334px; height: 250px;">
2020-09-29 14:27:49 +02:00
<img src="data:image/png;base64," data-src="holder.js/100%x100%/text:&#xf03e;/font:'Font Awesome 5 Free'/icon" bs-holder ng-if="!space.space_image">
2017-02-14 11:28:07 +01:00
</div>
2017-02-14 13:36:10 +01:00
<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 334px;">
<img ng-src="{{ space.space_image }}" alt="" />
2017-02-14 11:28:07 +01:00
</div>
2017-02-14 13:36:10 +01:00
<div>
<span class="btn btn-default btn-file">
2019-12-17 18:06:56 +01:00
<span class="fileinput-new">{{ 'app.shared.space.add_an_illustration' | translate }} <i class="fa fa-upload fa-fw"></i></span>
<span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span>
2017-02-14 13:36:10 +01:00
<input type="file"
id="space_image"
ng-model="space.space_image"
name="space[space_image_attributes][attachment]"
accept="image/jpeg,image/gif,image/png"
2017-02-14 13:36:10 +01:00
required
bs-jasny-fileinput>
</span>
<a class="btn btn-danger fileinput-exists" data-dismiss="fileinput" translate>{{ 'app.shared.buttons.delete' }}</a>
2017-02-14 11:28:07 +01:00
</div>
2017-02-14 13:36:10 +01:00
</div>
</div>
</div>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="form-group m-b-xl" ng-class="{'has-error': spaceForm['space[default_places]'].$dirty && spaceForm['space[default_places]'].$invalid}">
2019-12-17 18:06:56 +01:00
<label for="default_places" class="col-sm-2 control-label">{{ 'app.shared.space.default_places' | translate }} *</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-10">
<input type="number"
name="space[default_places]"
ng-model="space.default_places"
id="default_places"
class="form-control"
required>
2019-12-17 18:06:56 +01:00
<span class="help-block" ng-show="spaceForm['space[default_places]'].$dirty && spaceForm['space[default_places]'].$error.required" translate>{{ 'app.shared.space.default_places_is_required' }}</span>
2017-02-14 13:36:10 +01:00
</div>
</div>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="form-group m-b-xl">
2019-12-17 18:06:56 +01:00
<label for="space_description" class="col-sm-2 control-label" translate>{{ 'app.shared.space.description' }}</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-10">
<input type="hidden"
name="space[description]"
ng-value="space.description" />
<summernote ng-model="space.description"
id="space_description"
placeholder=""
config="summernoteOpts"
name="space[description]">
</summernote>
</div>
</div>
<div class="form-group m-b-xl">
2019-12-17 18:06:56 +01:00
<label for="space_characteristics" class="col-sm-2 control-label" translate>{{ 'app.shared.space.characteristics' }}</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-10">
<input type="hidden"
name="space[characteristics]"
ng-value="space.characteristics" />
<summernote ng-model="space.characteristics"
id="space_characteristics"
placeholder=""
config="summernoteOpts"
name="space[characteristics]">
</summernote>
</div>
</div>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="form-group m-b-xl">
2019-12-17 18:06:56 +01:00
<label class="col-sm-2 control-label" translate>{{ 'app.shared.space.attached_files_pdf' }}</label>
2017-02-14 13:36:10 +01:00
<div class="col-sm-10">
<div ng-repeat="file in space.space_files_attributes" ng-show="!file._destroy">
<input type="hidden" ng-model="file.id" name="space[space_files_attributes][][id]" ng-value="file.id" />
<input type="hidden" ng-model="file._destroy" name="space[space_files_attributes][][_destroy]" ng-value="file._destroy"/>
2017-02-14 11:28:07 +01:00
2017-02-14 13:36:10 +01:00
<div class="fileinput input-group" data-provides="fileinput" ng-class="fileinputClass(file.attachment)">
<div class="form-control" data-trigger="fileinput">
<i class="glyphicon glyphicon-file fileinput-exists"></i> <span class="fileinput-filename">{{file.attachment}}</span>
2017-02-14 11:28:07 +01:00
</div>
<span class="input-group-addon btn btn-default btn-file">
<span class="fileinput-new" translate>{{ 'app.shared.space.attach_a_file' }}</span>
<span class="fileinput-exists" translate>{{ 'app.shared.buttons.change' }}</span>
<input type="file" name="space[space_files_attributes][][attachment]" accept="application/pdf">
</span>
2017-02-14 13:36:10 +01:00
<a class="input-group-addon btn btn-danger fileinput-exists" data-dismiss="fileinput" ng-click="deleteFile(file)"><i class="fa fa-trash-o"></i></a>
2017-02-14 11:28:07 +01:00
</div>
</div>
2019-12-17 18:06:56 +01:00
<a class="btn btn-default" ng-click="addFile()" role="button"> {{ 'app.shared.space.add_an_attachment' | translate }} <i class="fa fa-file-o fa-fw"></i></a>
2017-02-14 13:36:10 +01:00
</div>
</div>
2017-10-11 14:58:38 +02:00
<div class="form-group">
<label for="space[disabled]" class="control-label col-sm-2" translate>
2019-12-17 18:06:56 +01:00
{{ 'app.shared.space.disable_space' }}
2017-10-11 14:58:38 +02:00
</label>
<div class="col-sm-10">
<input bs-switch
ng-model="space.disabled"
name="space[disabled]"
id="space[disabled]"
type="checkbox"
class="form-control"
2019-12-17 18:06:56 +01:00
switch-on-text="{{ 'app.shared.buttons.yes' | translate }}"
switch-off-text="{{ 'app.shared.buttons.no' | translate }}"
2017-10-11 14:58:38 +02:00
switch-animate="true"/>
<input type="hidden" name="space[disabled]" value="{{space.disabled}}">
</div>
</div>