mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Added localization support
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
@extends('layout.default')
|
||||
|
||||
@if($mode == 'edit')
|
||||
@section('title', 'Edit habit')
|
||||
@section('title', $L('Edit habit'))
|
||||
@else
|
||||
@section('title', 'Create habit')
|
||||
@section('title', $L('Create habit'))
|
||||
@endif
|
||||
|
||||
@section('viewJsName', 'habitform')
|
||||
@@ -22,35 +22,35 @@
|
||||
<form id="habit-form">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">Name</label>
|
||||
<label for="name">{{ $L('Name') }}</label>
|
||||
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $habit->name }}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description">Description</label>
|
||||
<label for="description">{{ $L('Description') }}</label>
|
||||
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $habit->description }}@endif</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="period_type">Period type</label>
|
||||
<label for="period_type">{{ $L('Period type') }}</label>
|
||||
<select required class="form-control input-group-habit-period-type" id="period_type" name="period_type">
|
||||
@foreach($periodTypes as $periodType)
|
||||
<option @if($mode == 'edit' && $periodType == $habit->period_type) selected="selected" @endif value="{{ $periodType }}">{{ $periodType }}</option>
|
||||
<option @if($mode == 'edit' && $periodType == $habit->period_type) selected="selected" @endif value="{{ $periodType }}">{{ $L($periodType) }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="period_days">Period days</label>
|
||||
<label for="period_days">{{ $L('Period days') }}</label>
|
||||
<input type="number" class="form-control input-group-habit-period-type" id="period_days" name="period_days" value="@if($mode == 'edit'){{ $habit->period_days }}@endif">
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<p id="habit-period-type-info" class="help-block text-muted"></p>
|
||||
|
||||
<button id="save-habit-button" type="submit" class="btn btn-default">Save</button>
|
||||
<button id="save-habit-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
|
||||
|
||||
</form>
|
||||
|
||||
|
Reference in New Issue
Block a user