<?php

/** @var bool $signup */
/** @var \App\Models\User $user */
$signup = $signup ?? false;
Form::model($user);
//TODO: find a better way to share form fields
?>

<?php 
echo Form::labelInput('name', _('Name'), 'text', null, ['input' => ['autofocus']]);
?>

<?php 
echo Form::labelInput('email', _('E-mail'), 'email');
?>

<?php 
echo Form::labelInput('username', _('Username'), 'text', null, ['input' => ['data-unset' => 'true', 'prefix' => preg_replace('|https?://|', '', act('user@profile', ['id_slug' => '123']) . '-')], 'help' => _('Use a uniquely identifying name for you. This will also help you to be found in the search. Use only letters, numbers and underlines, from 4 to 30 chars.')]);
?>

<?php 
if ($signup) {
    ?>
    <?php 
    echo Form::labelInput('password', _('Choose a password'), 'password', null, ['help' => _('Use at least 6 chars here. Preferably, with numbers and letters! Bonus points if you include lower-case and upper-case letters, as well as symbols.')]);
    ?>

    <?php 
    echo Form::labelInput('password_confirmation', _('Confirm the password'), 'password', null, ['help' => _('Just to be sure there\'s no typo, could you please repeat that password?')]);
}
Example #2
0
            <div class="panel-heading">
                <h4 class="panel-title"><?php 
echo _('Personal data');
?>
</h4>
            </div>

            <div class="panel-body">
                @include('user._common_fields')

                <?php 
echo Form::labelSelect('gender', _('Gender'), ['M' => _('Male'), 'F' => _('Female'), '' => _('Not informed')]);
?>

                <?php 
echo Form::labelInput('birthday', _('Birthday'), 'date', $user->birthday ? $user->birthday->format('Y-m-d') : null);
?>
            </div>
        </div>
    </div>

    <div class="col-md-12">
        <div class="row buttons-row text-center">
            <a href="javascript:history.back()" class="btn btn-theme btn-theme-lg btn-theme-grey-dark">
                <?php 
echo _('Go back');
?>
            </a>
            <?php 
echo Form::submit(_('Save'), ['class' => 'btn btn-theme btn-theme-lg']);
?>
Example #3
0
        <div class="widget">
            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><?php 
echo _('Where & When');
?>
</h4>
                    </div>
                    <div class="panel-body">
                        <?php 
echo Form::labelInput('address', _('Address'), 'textarea', null, ['input' => ['rows' => 2]]);
?>

                        <?php 
echo Form::labelInput('postal_code', _('Postal code'));
?>

                        @include('event.forms._basic_fields', ['fields' => ['location', 'begin', 'end']])
                    </div>
                </div>

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><?php 
echo _('Additional options');
?>
</h4>
                    </div>
                    <div class="panel-body">
                        @include('event.forms._checkboxes')
Example #4
0
</div>

<hr class="page-divider transparent visible-xs" />

<div class="col-md-4">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h4 class="panel-title"><?php 
echo sizeof($links) ? _('Add another one') : _('Add the first one');
?>
</h4>
        </div>

        <div class="panel-body">
            <?php 
echo Form::labelInput('link', _('New URL:'), 'url');
?>
            <div class="form-group text-center">
                <?php 
echo Form::submit(_('Add link'), ['class' => 'btn btn-theme btn-theme-sm']);
?>
            </div>

            <hr/>

            <?php 
//TODO: in case the user adds all networks, the button will appear empty. Instead, there should be a message thanking for the user having added all available networks
?>
            <p class="help-block">
                <?php 
echo _('You can also associate your account to a network. Not all of them will appear in your profile, but they all can be used to login the next time you come back:');
<?php 
if ($showField('location')) {
    ?>
    <?php 
    echo Form::labelInput('location', _('City'), 'text');
}
?>

<?php 
if ($showField('event_type_id')) {
    ?>
    <?php 
    echo Form::labelSelect('event_type_id', _('Event type'), EventType::toTransList(_('Select an option')));
}
?>

<?php 
if ($showField('begin')) {
    ?>
    <?php 
    echo Form::labelInput('begin', _('Begin'), 'date', $event->begin ? $event->begin->format('Y-m-d') : null);
}
?>

<?php 
if ($showField('end')) {
    ?>
    <?php 
    echo Form::labelInput('end', _('End'), 'date', $event->end ? $event->end->format('Y-m-d') : null, ['help' => _('You only need to fill this field if the event lasts for more than one day.')]);
}
                        <li><?php 
echo _('Save the file and select it in the field below');
?>
;</li>
                        <li><?php 
echo _('Submit the file and you\'re done!');
?>
</li>
                    </ol>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-body">
                    <?php 
echo Form::labelInput('schedule_file', 'Schedule file', 'file');
?>
                </div>
            </div>
        </section>

        <hr class="page-divider transparent visible-xs"/>

        <aside id="sidebar-info" class="sidebar col-sm-12 col-md-4 col-lg-3">

            <div class="widget">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title"><?php 
echo _('Schedule file');
?>
Example #7
0
@section('title', $title)
@section('header-title', $header)
@section('header-subtitle', $subheader)

@section('form')
@include('auth._providers_list')

<?php 
echo Form::model(new \App\Models\User(), ['action' => 'AuthController@postLogin', 'novalidate' => true]);
?>
    @include('components.form_errors')
    <?php 
echo Form::labelInput('email', _('Username') . ' / ' . _('E-mail'), 'email', null, ['help' => _('Here you can use either your username or your e-mail: both works!')]);
?>
    <?php 
echo Form::labelInput('password', _('Password'), 'password');
?>

    <div id="buttons-row">
        <a href="<?php 
echo act('auth@signUp');
?>
" class="pull-left"><?php 
echo _('I don\'t have an account');
?>
</a>
        <?php 
echo Form::submit(_('Let me in'), ['class' => 'btn btn-theme btn-theme-lg pull-right']);
?>
    </div>
Example #8
0
    <?php 
}
?>

    <?php 
if ($provider == 'twitter') {
    ?>
        <?php 
    echo Form::labelInput('email', _('E-mail'), 'email');
    ?>
    <?php 
}
?>

    <?php 
echo Form::labelInput('username', _('Username'), 'text', null, ['input' => ['data-unset' => 'true', 'prefix' => preg_replace('|https?://|', '', act('user@profile', ['id_slug' => '123']) . '-')], 'help' => _('Use a uniquely identifying name for you. This will also help you to be found in the search. Use only letters, numbers and underlines, from 4 to 30 chars.')]);
?>

    <div class="row">
        <div class="col-xs-8">
            <?php 
echo Form::submit(_('Go to my profile'), ['class' => 'btn btn-theme btn-theme-lg']);
?>
        </div>
    </div>

<?php 
echo Form::close();
?>
@endsection