/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(); ?> <fieldset> <?php echo Form::control_group(Form::input('name', $this->tag->name, array('class' => 'input-xxlarge', 'maxlength' => 32)), array('name' => __('Name')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::input('description', $this->tag->description, array('class' => 'input-xxlarge')), array('description' => __('Short description')), Arr::get($this->errors, 'description')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo HTML::anchor(Request::back(Route::url('tags'), true), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); $gallery = $this->image->gallery(); echo Form::open(Route::url('gallery_image', array('gallery_id' => Route::model_id($gallery), 'id' => $this->image->id, 'action' => 'report')), array('class' => Request::current()->is_ajax() ? 'ajaxify' : '')); ?> <fieldset> <?php echo Form::control_group(Form::input('reason', null, array('class' => 'input-block-level')), array('name' => __('Reason')), null, __('You can enter an optional reason for reporting this image, e.g. why it should be removed')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', __('Report'), array('type' => 'submit', 'class' => 'btn btn-danger btn-large')); ?> <?php echo Request::current()->is_ajax() ? '' : HTML::anchor(Route::url('gallery_image', array('gallery_id' => Route::model_id($gallery), 'id' => $this->image->id, 'action' => '')), __('Cancel'), array('class' => 'cancel')); ?> <?php echo Form::csrf(); ?> </fieldset> <?php return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo $this->message; echo Form::open(); echo Form::control_group(Form::input('email', $this->email, array('class' => 'input input-xxlarge', 'placeholder' => __('Username or email'))), array('email' => __('Send my new password to')), null, __('We will send you a "new" password generated from your old forgotten password.<br /><em>Please change your password after signing in!</em>')); echo Form::button(null, '<i class="icon-envelope icon-white"></i> ' . __('Send'), array('class' => 'btn btn-primary')); echo Form::close(); ?> <hr /> <blockquote cite="http://dilbert.com/strips/comic/1996-09-05/"> <dl class="dl-horizontal"> <dt>Asok:</dt> <dd>I have forgotten my password. I humbly beg for assistance.</dd> <dt>Dogbert:</dt> <dd>I have no time for boring administrative tasks, you fool! I'm too busy upgrading the network.</dd> <dt>Asok:</dt> <dd>You could have given me a new password in the time it took to belittle me.</dd> <dt>Dogbert:</dt> <dd>Yeah, but which option would give me job satisfaction?</dd> </dl> <small class="pull-right"><a href="http://dilbert.com/strips/comic/1996-09-05/">Dilbert</a></small> </blockquote> <?php return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); $tags = $this->group->tags(); if (empty($tags)) { ?> <div class="empty"> <?php echo __('No tags yet.'); ?> </div> <?php } else { ?> <ul> <?php foreach ($tags as $tag) { ?> <li><?php echo HTML::anchor(Route::model($tag), $tag->name); ?> </li> <?php } ?> </ul> <?php } echo Form::open(); ?> <fieldset> <?php echo Form::control_group(Form::input('name', $this->group->name, array('class' => 'input-xxlarge', 'maxlength' => 32)), array('name' => __('Name')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::input('description', $this->group->description, array('class' => 'input-xxlarge')), array('description' => __('Short description')), Arr::get($this->errors, 'description')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo HTML::anchor(Request::back(Route::url('tags'), true), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(); ?> <fieldset> <?php echo Form::control_group(Form::input('name', $this->blog_entry->name, array('class' => 'input-xxlarge')), array('name' => __('Title')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::textarea_editor('content', $this->blog_entry->content, array('class' => 'input-xxlarge'), true), array('content' => __('Content')), Arr::get($this->errors, 'content')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::csrf(); ?> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : ''; ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(); ?> <fieldset> <legend><?php echo __('Almost there!'); ?> </legend> <?php echo Form::control_group(Form::input('username', $this->user->userame, array('class' => 'input-small', 'placeholder' => __('JohnDoe'))), array('username' => __('Username')), Arr::get($this->errors, 'username'), __('Choose a unique username with at least <var>:length</var> characters. No special characters, thank you.', array(':length' => Kohana::$config->load('visitor.username.length_min')))); ?> <?php echo Form::control_group(Form::password('password'), array('password' => __('Password')), Arr::get($this->errors, 'password')); ?> <?php echo Form::control_group(Form::password('password_confirm'), array('password_confirm' => __('Confirm')), Arr::get($this->errors, 'password_confirm'), __('Try to use letters, numbers and special characters for a stronger password, with at least <var>8</var> characters.')); ?> <?php echo Form::control_group(Form::input('email', $this->user->email, array('disabled' => 'disabled', 'class' => 'input-xxlarge', 'placeholder' => __('*****@*****.**'))), array('email' => __('Email')), Arr::get($this->errors, 'email'), __('Please remember: sign up is available only with a valid, invited email.')); ?> </fieldset> <fieldset> <?php echo Form::hidden('code', $this->code); ?> <?php echo Form::button('register', __('Sign up!'), array('type' => 'submit', 'class' => 'btn btn-primary btn-large')); ?> <?php echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
@layout('layouts/main') @section('content') <h1>Configure Solder</h1> <hr> @if (Session::has('success')) <div class="alert alert-success"> {{ Session::get('success') }} </div> @endif <h2>Repository Settings</h2> {{ Form::horizontal_open() }} {{ Form::hidden("edit-solder", 1) }} <?php echo Form::control_group(Form::label('mirror_url', 'Mirror URL'), Form::xxlarge_text('mirror_url', Config::get('solder.mirror_url')), '', Form::block_help('This is where the launcher will be told to search for your files. If your repo location is already a URL you can use the same location here. Include a trailing slash!')); echo Form::control_group(Form::label('repo_location', 'Repository Location'), Form::xxlarge_text('repo_location', Config::get('solder.repo_location')), '', Form::block_help('This is the location of your mod reposistory. INCLUDE a trailing slash! This can be a URL or an absolute file location. This is only required for your initial repository import.')); ?> <h2>Platform Settings</h2> <?php echo Form::control_group(Form::label('platform_key', 'Platform API Key'), Form::xxlarge_text('platform_key', Config::get('solder.platform_key')), '', Form::block_help(' Enter your platform API key if you would like to link Solder to your Platform account.')); echo Form::actions(array(Button::primary_submit('Save changes'))); ?> {{ Form::close() }} @endsection
@if(!empty($message)) <div class="alert alert-success fade in"> {{ $message }} <button type="button" class="close" data-dismiss="alert">×</button> </div> @endif {{ Form::horizontal_open() }} <div class="span5"> <?php if ($errors->has('username')) { echo Form::control_group(Form::label('username', 'Société'), Form::xlarge_text('username', '', array('Placeholder' => 'Societe')), 'error', Form::inline_help($errors->first('username'))); } else { echo Form::control_group(Form::label('username', 'Société'), Form::xlarge_text('username', '', array('Placeholder' => 'Societe')), ''); } if ($errors->has('password')) { echo Form::control_group(Form::label('password', 'Password'), Form::password('password', array('class' => 'input-large')), 'error'), Form::inline_help($errors->first('nom')); } else { echo Form::control_group(Form::label('password', 'Password'), Form::password('password', array('class' => 'input-large')), ''); } echo Form::control_group(Form::label('group', 'Groupe'), Form::select('group', array('1' => 'Admin', '2' => 'Client'), '2')); echo Form::actions(array(Buttons::primary_submit('Create Client'))); ?> </div> {{ Form::close() }} </div> </div> @endsection
/** * Render view. * * @return string */ public function content() { ob_start(); // Build available groups list $groups = array(); foreach (Model_Forum_Group::factory()->find_all() as $_group) { $groups[$_group->id] = $_group->name; } echo Form::open(); ?> <fieldset> <?php echo Form::control_group(Form::select('forum_group_id', $groups, $this->area->id), array('forum_group_id' => __('Group')), Arr::get($this->errors, 'forum_group_id')); ?> <?php echo Form::control_group(Form::input('name', $this->area->name), array('name' => __('Name')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::input('description', $this->area->description), array('description' => __('Description')), Arr::get($this->errors, 'description')); ?> <?php echo Form::control_group(Form::input('sort', $this->area->sort, array('class' => 'input-mini')), array('sort' => __('Sort')), Arr::get($this->errors, 'sort')); ?> </fieldset> <fieldset> <legend><?php echo __('Settings'); ?> </legend> <?php echo Form::control_group(Form::select('access_read', array(Model_Forum_Area::READ_NORMAL => __('Everybody'), Model_Forum_Area::READ_MEMBERS => __('Members only')), $this->area->access_read), array('access_read' => __('Read access')), Arr::get($this->errors, 'access_read')); ?> <?php echo Form::control_group(Form::select('access_write', array(Model_Forum_Area::WRITE_NORMAL => __('Members'), Model_Forum_Area::WRITE_ADMINS => __('Admins only')), $this->area->access_write), array('access_write' => __('Write access')), Arr::get($this->errors, 'access_write')); ?> <?php echo Form::control_group(Form::select('type', array(Model_Forum_Area::TYPE_NORMAL => __('Normal'), Model_Forum_Area::TYPE_BIND => __('Bind, topics bound to content')), $this->area->type), array('type' => __('Type')), Arr::get($this->errors, 'type')); ?> <?php echo Form::control_group(Form::select('bind', array('' => __('None')) + Model_Forum_Area::get_binds(), $this->area->bind), array('bind' => __('Bind config')), Arr::get($this->errors, 'bind')); ?> <?php echo Form::control_group(Form::select('status', array(Model_Forum_Area::STATUS_NORMAL => __('Normal'), Model_Forum_Area::STATUS_HIDDEN => __('Hidden')), $this->area->status), array('status' => __('Status')), Arr::get($this->errors, 'status')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo HTML::anchor(Request::back(Route::url('forum_group'), true), __('Cancel'), array('class' => 'cancel')); ?> <?php echo Form::csrf(); ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); // Event form echo Form::open(null, array('onsubmit' => 'return false')); echo Form::control_group(Form::input('name', $this->event->name, array('id' => 'field-name', 'class' => 'input-xxlarge', 'placeholder' => __('Event name'))), array('field-name' => __('Select event for the gallery')), Arr::get($this->errors, 'name'), __('Enter at least 3 characters')); echo Form::close(); // Suggestions if ($this->events) { ?> <p> <?php echo __('.. or select one of your recent favorites:'); ?> <ul class="unstyled"> <?php foreach ($this->events as $event) { ?> <li> <time title="<?php echo Date::format(Date::DATETIME, $event->stamp_begin) . ($event->stamp_end ? ' - ' . Date::format(Date::TIME, $event->stamp_end) : ''); ?> "><?php echo Date::format(Date::DM_PADDED, $event->stamp_begin); ?> </time> <?php echo HTML::anchor(Route::url('galleries', array('action' => 'upload')) . '?from=' . $event->id, HTML::chars($event->name)); ?> </li> <?php } ?> </ul> </p> <?php } ?> <script> // Name autocomplete head.ready('anqh', function() { $('#field-name').autocompleteEvent({ action: function(event, ui) { window.location = '<?php echo URL::site(Route::url('galleries', array('action' => 'upload'))); ?> ?from=' + ui.item.id; } }); }); </script> <?php return ob_get_clean(); }
} echo Form::actions(array(Buttons::success_submit('Add new'))); ?> </div> <div class="span4"> <?php $value = isset($marker->rem1) ? $marker->rem1 : ''; echo Form::control_group(Form::label('rem1', 'Remarque #1'), Form::xmedium_textarea('rem1', Input::old('rem1'), array('rows' => '2'))); $value = isset($marker->rem2) ? $marker->rem2 : ''; echo Form::control_group(Form::label('rem2', 'Remarque #2'), Form::xmedium_textarea('rem2', Input::old('rem2'), array('rows' => '2'))); $value = isset($marker->rem3) ? $marker->rem3 : ''; echo Form::control_group(Form::label('rem3', 'Remarque #3'), Form::xmedium_textarea('rem3', Input::old('rem3'), array('rows' => '2'))); $value = isset($marker->rem4) ? $marker->rem4 : ''; echo Form::control_group(Form::label('rem4', 'Remarque #4'), Form::xmedium_textarea('rem4', Input::old('rem4'), array('rows' => '2'))); $value = isset($marker->rem5) ? $marker->rem5 : ''; echo Form::control_group(Form::label('rem5', 'Remarque #5'), Form::xmedium_textarea('rem5', Input::old('rem5'), array('rows' => '2'))); ?> </div> {{ Form::close() }} <div class="span3 offset1 img_thumb"> @if ( !empty($marker->img_url) ) <h5>Votre image:</h5> <div class="img_wrapper"><img src="http://www.alys.be/googlemaps/public{{ $marker->img_url }}"></div> @endif </div> </div><!-- / .Span9 --> <div class="span3"> <ul class="nav nav-list"> <li class="nav-header">Actions</li> <li class=""><a href="{{ URL::to_route(strtolower(Auth::user()->username)) }}"><i class="icon-home"></i> Accueil</a></li>
/** * Render view. * * @return string */ public function content() { ob_start(); echo $this->message; // Send invite echo Form::open(); ?> <fieldset> <legend><?php echo __('Not yet invited?'); ?> </legend> <?php echo Form::control_group(Form::input('email', $this->invitation->email, array('class' => 'input-xxlarge', 'placeholder' => __('*****@*****.**'))), array('email' => __('Send an invitation to')), Arr::get($this->errors, 'email'), __('Please remember: sign up is available only with a valid, invited email.')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('invite', '<i class="icon-envelope icon-white"></i> ' . __('Send invitation'), array('type' => 'submit', 'class' => 'btn btn-primary btn-large')); ?> <?php echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); // Enter code echo Form::open(); ?> <fieldset> <legend><?php echo __('Got my invitation!'); ?> </legend> <?php echo Form::control_group(Form::input('code', null, array('class' => 'input-xxlarge', 'placeholder' => __('M0573XC3LL3N751R'))), array('code' => __('Enter your invitation code')), Arr::get($this->errors, 'code'), __('Your invitation code is included in the mail you received, 16 characters.')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::hidden('signup', true); ?> <?php echo Form::button('invited', __('Final step!') . ' <i class="icon-arrow-right icon-white"></i>', array('type' => 'submit', 'class' => 'btn btn-primary btn-large')); ?> <?php echo HTML::anchor(Request::back('/', true), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); return ob_get_clean(); }
echo Form::actions(array(Buttons::success_submit('Edit'), Buttons::link_danger('Delete', '#myModal', array('role' => 'button', 'data-toggle' => 'modal')))); ?> </div> <div class="span5"> <?php $value = isset($marker->rem1) ? $marker->rem1 : ''; echo Form::control_group(Form::label('rem1', 'Remarque #1'), Form::xlarge_textarea('rem1', $value, array('rows' => '2'))); $value = isset($marker->rem2) ? $marker->rem2 : ''; echo Form::control_group(Form::label('rem2', 'Remarque #2'), Form::xlarge_textarea('rem2', $value, array('rows' => '2'))); $value = isset($marker->rem3) ? $marker->rem3 : ''; echo Form::control_group(Form::label('rem3', 'Remarque #3'), Form::xlarge_textarea('rem3', $value, array('rows' => '2'))); $value = isset($marker->rem4) ? $marker->rem4 : ''; echo Form::control_group(Form::label('rem4', 'Remarque #4'), Form::xlarge_textarea('rem4', $value, array('rows' => '2'))); $value = isset($marker->rem5) ? $marker->rem5 : ''; echo Form::control_group(Form::label('rem5', 'Remarque #5'), Form::xlarge_textarea('rem5', $value, array('rows' => '2'))); ?> </div> {{ Form::close() }} <div class="span3 offset1 img_thumb"> @if ( !empty($marker->img_url) ) <h5>Votre image:</h5> <div class="img_wrapper"><img src="http://www.alys.be/googlemaps/public{{ $marker->img_url }}"></div> @endif </div> <div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3 id="myModalLabel">Confirmation de suppresion</h3> </div>
<div id="image-upload"> @include('litmus::partials.message') <?php $url = isset($url) ? $url : NULL; $verb = isset($verb) ? $verb : 'POST'; echo Form::horizontal_open_for_files($url, $verb); //echo Form::token(); foreach ($fields as $field) { if (isset($field['values'])) { $form = Form::$field['type']($field['name'], $field['values']); } else { $attributes = array(); $attributes['value'] = isset($object) && isset($object->{$field['name']}) ? $object->{$field['name']} : NULL; $attributes['value'] = Input::had($field['name']) ? Input::old($field['name']) : $attributes['value']; $form = Form::$field['type']($field['name'], $attributes['value'], $attributes); } $label = Form::label($field['name'], $field['label']); echo Form::control_group($label, $form); } echo Form::actions(array(Button::primary_submit('Submit'), Form::button('Cancel'))); echo Form::close(); ?> </div>
/** * Render content. * * @return string */ public function content() { ob_start(); echo Form::open(null, array('id' => 'form-event', 'class' => 'row')); ?> <!-- <?php if ($this->event_errors) { ?> <ul class="errors"> <?php foreach ($this->event_errors as $error) { ?> <li><?php echo $error; ?> </li> <?php } ?> </ul> <?php } ?> <?php if ($this->venue_errors) { ?> <ul class="errors"> <?php foreach ($this->venue_errors as $error) { ?> <li><?php echo $error; ?> </li> <?php } ?> </ul> <?php } ?> --> <div class="span8"> <fieldset id="fields-primary"> <?php echo Form::control_group(Form::input('name', $this->event->name, array('class' => 'input-block-level')), array('name' => __('Event')), Arr::get($this->event_errors, 'name')); ?> <?php echo Form::control_group(Form::textarea('dj', $this->event->dj, array('class' => 'input-block-level'), true), array('dj' => __('Line-up')), Arr::get($this->event_errors, 'dj')); ?> <?php echo Form::control_group(Form::textarea_editor('info', $this->event->info, array('class' => 'input-block-level'), true), array('info' => __('Other information')), Arr::get($this->event_errors, 'info')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', __('Save event'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : ''; ?> <?php echo Form::csrf(); ?> <?php echo Form::hidden('latitude', $this->venue->latitude); ?> <?php echo Form::hidden('longitude', $this->venue->longitude); ?> <?php echo Form::hidden('venue_id', $this->venue->id); ?> </fieldset> </div> <div class="span4"> <fieldset id="fields-when" class="row"> <?php echo Form::control_group(Form::input('stamp_begin[date]', is_numeric($this->event->stamp_begin) ? Date::format('DMYYYY', $this->event->stamp_begin) : $this->event->stamp_begin, array('class' => 'date', 'maxlength' => 10, 'placeholder' => 'd.m.yyyy')), array('stamp_begin[date]' => __('Date')), Arr::get($this->event_errors, 'stamp_begin'), null, array('class' => 'span1')); ?> <?php echo Form::control_group(Form::select('stamp_begin[time]', array_reverse(Date::hours_minutes(30, true)), is_numeric($this->event->stamp_begin) ? Date::format('HHMM', $this->event->stamp_begin) : (empty($this->event->stamp_begin) ? '22:00' : $this->event->stamp_begin), array('class' => 'time')), array('stamp_begin[time]' => __('From')), Arr::get($this->event_errors, 'stamp_begin'), null, array('class' => 'span1')); ?> <?php echo Form::control_group(Form::select('stamp_end[time]', Date::hours_minutes(30, true), is_numeric($this->event->stamp_end) ? Date::format('HHMM', $this->event->stamp_end) : (empty($this->event->stamp_end) ? '04:00' : $this->event->stamp_end), array('class' => 'time')), array('stamp_end[time]' => __('To')), Arr::get($this->event_errors, 'stamp_end'), null, array('class' => 'span1')); ?> </fieldset> <?php echo Form::control_group(Form::input('homepage', $this->event->homepage, array('class' => 'input-block-level', 'placeholder' => 'http://')), array('homepage' => __('Homepage')), Arr::get($this->event_errors, 'homepage')); ?> <fieldset id="fields-venue"> <legend> <?php echo Form::control_group('<label class="checkbox">' . Form::checkbox('venue_hidden', 'true', (bool) $this->event->venue_hidden, array('id' => 'field-ug')) . ' ' . __('Underground') . '</label>', null, null, null, array('class' => 'span2')); ?> <?php echo __('Venue'); ?> </legend> <?php echo Form::control_group(Form::input('venue_name', $this->event->venue_name, (bool) $this->event->venue_hidden ? array('class' => 'input-block-level', 'disabled' => 'disabled') : array('class' => 'input-block-level')), array('venue_name' => __('Venue')), Arr::get($this->event_errors, 'venue_name'), null, array('id' => 'group-venue')); ?> <?php echo Form::control_group(Form::input('city_name', $this->event->city_name, array('class' => 'input-block-level')), array('city_name' => __('City')), Arr::get($this->event_errors, 'city_name')); ?> </fieldset> <fieldset id="fields-tickets"> <legend> <?php echo Form::control_group('<label class="checkbox">' . Form::checkbox('free', 'true', $this->event->price === '0.00', array('id' => 'field-free')) . ' ' . __('Free entry') . '</label>', null, null, null, array('class' => 'span2')); ?> <?php echo __('Tickets'); ?> </legend> <?php echo Form::control_group('<div class="input-append">' . Form::input('price', $this->event->price, $this->event->price === '0.00' ? array('class' => 'input-mini', 'disabled' => 'disabled') : array('class' => 'input-mini')) . '<span class="add-on">€</span>' . '</div>', array('price' => __('Tickets')), Arr::get($this->event_errors, 'price'), null, array('id' => 'group-price')); ?> <?php echo Form::control_group('<div class="input-append">' . Form::input('age', $this->event->age, array('class' => 'input-mini')) . '<span class="add-on">years</span>' . '</div>', array('age' => __('Age limit')), Arr::get($this->event_errors, 'age')); ?> </fieldset> <fieldset id="fields-music"> <legend><?php echo __('Music'); ?> </legend> <?php echo Form::checkboxes_wrap('tag', $this->tags(), $this->event->tags(), null, $this->event_errors, null, 'block-grid three-up'); ?> </fieldset> </div> <?php echo Form::close(); echo $this->javascript(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(null, array('class' => 'row')); ?> <div class="span4"> <fieldset id="fields-basic"> <legend><?php echo __('Basic information'); ?> </legend> <?php echo Form::control_group(Form::input('name', $this->user->name, array('class' => 'input-large')), array('name' => __('Name')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::input('email', $this->user->email, array('class' => 'input-large')), array('email' => __('Email')), Arr::get($this->errors, 'email')); ?> <?php echo Form::control_group(Form::input('homepage', $this->user->homepage, array('class' => 'input-large')), array('homepage' => __('Homepage')), Arr::get($this->errors, 'homepage')); ?> <?php echo Form::radios_wrap('gender', array('f' => __('Female'), 'm' => __('Male')), $this->user, null, __('Gender'), $this->errors); ?> <?php echo Form::control_group(Form::input('dob', Date::format('DMYYYY', $this->user->dob), array('class' => 'date input-small', 'maxlengt' => 10, 'placeholder' => __('d.m.yyyy'))), array('dob' => __('Date of Birth')), Arr::get($this->errors, 'dob')); ?> <?php echo Form::control_group(Form::input('title', $this->user->title, array('class' => 'input-large')), array('title' => __('Title')), Arr::get($this->errors, 'title')); ?> <?php echo Form::control_group(Form::textarea('description', $this->user->description, array('class' => 'input-large', 'rows' => 3), true), array('description' => __('Description')), Arr::get($this->errors, 'description')); ?> </fieldset> </div> <div class="span4"> <fieldset id="fields-contact"> <legend><?php echo __('Contact information'); ?> </legend> <?php echo Form::control_group(Form::input('address_street', $this->user->address_street), array('address_street' => __('Street address')), Arr::get($this->errors, 'address_street')); ?> <?php echo Form::control_group(Form::input('address_zip', $this->user->address_zip), array('address_zip' => __('Zip code')), Arr::get($this->errors, 'address_zip')); ?> <?php echo Form::control_group(Form::input('address_city', $this->user->address_city), array('address_city' => __('City')), Arr::get($this->errors, 'address_city')); ?> </fieldset> <fieldset id="fields-forum"> <legend><?php echo __('Forum settings'); ?> </legend> <?php echo Form::control_group(Form::textarea('signature', $this->user->signature, array('class' => 'input-large', 'rows' => 5), true), array('signature' => __('Signature')), Arr::get($this->errors, 'signature')); ?> </fieldset> </div> <fieldset class="span8 form-actions"> <?php echo Form::hidden('latitude', $this->user->latitude); ?> <?php echo Form::hidden('longitude', $this->user->longitude); ?> <?php echo Form::csrf(); ?> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo HTML::anchor(URL::user($this->user), __('Cancel'), array('class' => 'cancel')); ?> </fieldset> <?php echo Form::close(); echo $this->javascript(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(null, array('id' => 'form-venue', 'class' => 'row')); ?> <div class="span8"> <fieldset> <?php echo Form::control_group(Form::input('name', $this->venue->name, array('class' => 'input-block-level')), array('name' => __('Venue')), Arr::get($this->errors, 'name')); ?> <?php echo Form::control_group(Form::input('homepage', $this->venue->homepage, array('class' => 'input-block-level')), array('homepage' => __('Homepage')), Arr::get($this->errors, 'homepage')); ?> <?php echo Form::control_group(Form::input('description', $this->venue->description, array('class' => 'input-block-level')), array('description' => __('Short description')), Arr::get($this->errors, 'description')); ?> <?php echo Form::control_group(Form::textarea('hours', $this->venue->hours, array('class' => 'input-block-level'), true), array('hours' => __('Opening hours')), Arr::get($this->errors, 'hours')); ?> <?php echo Form::control_group(Form::textarea('info', $this->venue->info, array('class' => 'input-block-level'), true), array('info' => __('Other information')), Arr::get($this->errors, 'info')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::hidden('city_id', $this->venue->city_id); ?> <?php echo Form::hidden('latitude', $this->venue->latitude); ?> <?php echo Form::hidden('longitude', $this->venue->longitude); ?> <!--<?php echo Form::hidden('foursquare_id', $this->venue->foursquare_id); ?> --> <!--<?php echo Form::hidden('foursquare_category_id', $this->venue->foursquare_category_id); ?> --> <?php echo Form::csrf(); ?> <?php echo Form::button('save', __('Save'), array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : ''; ?> </fieldset> </div> <div class="span4"> <fieldset id="fields-location"> <?php echo Form::control_group(Form::input('city_name', $this->venue->city_name, array('class' => 'input-block-level')), array('city_name' => __('City')), Arr::get($this->errors, 'city_name')); ?> <?php echo Form::control_group(Form::input('address', $this->venue->address, array('class' => 'input-block-level')), array('address' => __('Address')), Arr::get($this->errors, 'address')); ?> </fieldset> </div> <?php echo Form::close(); ?> <script> head.ready('anqh', function() { $('#fields-location').append('<div id="map"><?php echo __('Loading map..'); ?> </div>'); var loader; function initMap() { if ('maps' in google && 'Geocoder' in google.maps) { clearTimeout(loader); } else { loader = setTimeout(initMap, 500); return; } $('#map').googleMap(<?php echo $this->venue->latitude ? json_encode(array('marker' => true, 'lat' => $this->venue->latitude, 'long' => $this->venue->longitude)) : ''; ?> ); } initMap(); $('input[name=city_name]').autocompleteGeo(); $('input[name=address], input[name=city_name]').on('blur', function geoCode(event) { var address = $("input[name=address]").val() , city = $("input[name=city_name]").val(); if (city != '') { var geocode = city; if (address != '') { geocode = address + ", " + geocode; } Anqh.geocoder.geocode({ address: geocode }, function geoCoded(results, status) { if (status == google.maps.GeocoderStatus.OK && results.length) { Anqh.map.setCenter(results[0].geometry.location); $('input[name=latitude]').val(results[0].geometry.location.lat()); $('input[name=longitude]').val(results[0].geometry.location.lng()); var marker = new google.maps.Marker({ position: results[0].geometry.location, map: Anqh.map }); } }); } }); }); </script> <?php return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); echo Form::open(); if ($this->venue_duplicate) { // Confirm $venue = new View_Venue_Info($this->venue); $duplicate = new View_Venue_Info($this->venue_duplicate); ?> <div class="span2"> <h3><?php echo HTML::anchor(Route::model($this->venue_duplicate), HTML::chars($this->venue_duplicate->name)); ?> </h3> #<?php echo $this->venue_duplicate->id; ?> <?php echo $duplicate->content(); ?> </div> <div class="span1"> <h3><?php echo __('to'); ?> </h3> </div> <div class="span2"> <h3><?php echo HTML::anchor(Route::model($this->venue), HTML::chars($this->venue->name)); ?> </h3> #<?php echo $this->venue->id; ?> <?php echo $venue->content(); ?> </div> <div class="span1"> <?php echo HTML::anchor(Route::model($this->venue, 'combine') . '/' . $this->venue_duplicate->id . '?' . Security::csrf_query(), __('Merge'), array('class' => 'btn btn-primary')); ?> </div> <?php } else { // Select duplicate echo Form::control_group(Form::input('venue'), array(__('Combine to'))); ?> <script> head.ready('anqh', function() { var venues = <?php echo json_encode(Model_Venue::factory()->find_all_autocomplete($this->venue->id)); ?> ; $('input[name=venue]').autocompleteVenue({ source: venues, action: function(event, ui) { window.location = window.location + '/' + ui.item.id; } }); }); </script> <?php } echo Form::close(); return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); // Create form attributes $attributes = array('class' => 'form-horizontal small-labels'); if ($this->form_id) { $attributes['id'] = $this->form_id; } $button = __('Save'); if (!$this->form_action) { switch ($this->mode) { case self::QUOTE: $this->form_action = Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => $this->forum_topic->id, 'id' => $this->forum_post->parent_id, 'action' => 'quote')); $button = __('Reply'); break; case self::REPLY: $this->form_action = Route::model($this->forum_topic, 'reply'); $button = __('Reply'); break; case self::EDIT_POST: $this->form_action = Route::url($this->private ? 'forum_private_post' : 'forum_post', array('topic_id' => $this->forum_topic->id, 'id' => $this->forum_post->id, 'action' => 'edit')); break; } } echo Form::open($this->form_action ? $this->form_action : null, $attributes); // Progressively add content, note that we don't break switch ($this->mode) { // Adding new topic case self::NEW_TOPIC: // Editing an old topic // Editing an old topic case self::EDIT_TOPIC: $is_admin = self::$_user->has_role(array('admin', 'moderator', 'forum moderator')); if ($is_admin) { ?> <fieldset class="row"> <div class="span3"> <?php echo Form::control_group(Form::select('status', array(Model_Forum_Topic::STATUS_NORMAL => __('Normal'), Model_Forum_Topic::STATUS_SINK => __('Sink'), Model_Forum_Topic::STATUS_LOCKED => __('Locked')), $this->forum_topic->status, array('class' => 'input-small')), array('status' => __('Status')), Arr::get($this->errors, 'status')); ?> </div> <div class="span3"> <?php echo Form::control_group(Form::select('sticky', array(Model_Forum_Topic::STICKY_NORMAL => __('Normal'), Model_Forum_Topic::STICKY_STICKY => __('Sticky')), $this->forum_topic->sticky, array('class' => 'input-small')), array('sticky' => __('Stickyness')), Arr::get($this->errors, 'sticky')); ?> </div> </fieldset> <?php } ?> <?php echo Form::control_group(Form::input('name', $this->forum_topic->name, array('class' => 'input-block-level')), array('name' => __('Topic')), Arr::get($this->errors, 'name')); ?> <?php if ($this->private) { echo Form::control_group(Form::textarea('recipients', $this->recipients, array('rows' => 3, 'placeholder' => __('Required'), 'class' => 'input-block-level'), true), array('recipients' => __('Recipients')), Arr::get($this->errors, 'recipients')); } ?> <?php if ($this->mode === self::EDIT_TOPIC && !$is_admin) { break; } // Replying to a topic // Replying to a topic case self::REPLY: case self::QUOTE: ?> <div class="pull-left"> <?php echo HTML::avatar(self::$_user->avatar, self::$_user->username); ?> </div> <div class="arrow"></div> <?php // Editing old post // Editing old post case self::EDIT_POST: ?> <div class="post-edit media-body form-vertical"> <header> <?php echo HTML::user(self::$_user); ?> </header> <fieldset> <?php echo Form::control_group(Form::textarea_editor('post', $this->forum_post->post, array('id' => uniqid(), 'class' => 'input-block-level'), true), null, Arr::get($this->errors, 'post')); ?> </fieldset> <fieldset class="form-actions"> <?php echo Form::button('save', $button, array('type' => 'submit', 'class' => 'btn btn-success btn-large')); ?> <?php echo $this->cancel ? HTML::anchor($this->cancel, __('Cancel'), array('class' => 'cancel')) : ''; ?> <?php echo Form::csrf(); ?> </fieldset> </div> <?php } echo Form::close(); // Auto-complete recipients if ($this->private) { ?> <script> head.ready('anqh', function() { $('textarea[name=recipients]').autocompleteUser({ user: <?php echo self::$_user_id; ?> , maxUsers: 100 }); }); </script> <?php } return ob_get_clean(); }
/** * Get edit form. * * @return string */ public function form() { ob_start(); // Map options $options = array('marker' => HTML::chars($this->venue->name), 'infowindow' => HTML::chars($this->venue->address) . '<br />' . HTML::chars($this->venue->city_name), 'lat' => $this->venue->latitude, 'long' => $this->venue->longitude); // Form echo Form::open(Route::url('venue', array('id' => Route::model_id($this->venue), 'action' => 'foursquare')), array('id' => 'form-foursquare-link', 'style' => 'display: none')); ?> <fieldset> <?php echo Form::control_group(Form::input('city_name', $this->venue->city_name, array('class' => 'input-large')), array('city_name' => __('City'))); ?> <?php echo Form::control_group(Form::input('name', $this->venue->name, array('class' => 'input-large', 'placeholder' => __('Fill city first'))), array('name' => __('Name'))); ?> <?php echo Form::control_group(Form::input('address', $this->venue->address, array('class' => 'input-large', 'placeholder' => __('Fill venue first'))), array('address' => __('Address'))); ?> <?php echo Form::control_group(Form::input('foursquare_id', $this->venue->foursquare_id, array('class' => 'input', 'readonly' => 'readonly')), array('foursquare_id' => __('Foursquare ID'))); ?> <?php echo Form::control_group(Form::input('foursquare_category_id', $this->venue->foursquare_category_id, array('class' => 'input', 'readonly' => 'readonly')), array('foursquare_category_id' => __('Foursquare Category ID'))); ?> </fieldset> <fieldset> <?php echo Form::hidden('latitude', Arr::pick($this->venue->latitude, $this->venue->city ? $this->venue->city->latitude : 0)); ?> <?php echo Form::hidden('longitude', Arr::pick($this->venue->longitude, $this->venue->city ? $this->venue->city->longitude : 0)); ?> <?php echo Form::csrf(); ?> <?php echo Form::button('save', __('Link'), array('type' => 'submit', 'class' => 'btn btn-success')); ?> </fieldset> <?php echo Form::close(); ?> <script> head.ready('anqh', function hookFoursquare() { $("#link-foursquare").on('click', function linkFoursquare(event) { event.preventDefault(); $(this).hide(); $('#foursquare .alert').hide(); $('#form-foursquare-link').show('fast'); $('#map').show('fast', function toggleMap() { $('#map').googleMap(<?php echo json_encode($options); ?> ); }); }); $('[name=city_name]:input').autocompleteGeo(); $('[name=name]:input').foursquareVenue({ venueId: 'foursquare_id', categoryId: 'foursquare_category_id', latitudeSearch: 'latitude', longitudeSearch: 'longitude' }); }); </script> <?php return ob_get_clean(); }
/** * Render view. * * @return string */ public function content() { ob_start(); ?> <div class="image"> <figure> <?php if ($this->url) { echo HTML::anchor($this->url, HTML::image($this->image->get_url(null, $this->gallery->dir)), array('title' => __('Next image'), 'class' => 'image')); } else { echo HTML::anchor(Route::model($this->gallery, $this->show_pending ? 'approve' : ''), HTML::image($this->image->get_url(null, $this->gallery->dir)), array('title' => __('Back to gallery'), 'class' => 'image')); } ?> <?php if ($this->can_note) { ?> <?php echo Form::open(Route::url('gallery_image', array('gallery_id' => Route::model_id($this->gallery), 'id' => $this->image->id, 'action' => 'note')), array('id' => 'form-note')); ?> <fieldset> <?php echo Form::control_group(Form::input('name')); ?> <?php echo Form::submit('save', __('Save'), array('class' => 'btn btn-success')); ?> <a class="cancel" href="#cancel"><?php echo __('Cancel'); ?> </a> <?php echo Form::hidden('x'); ?> <?php echo Form::hidden('y'); ?> <?php echo Form::hidden('width'); ?> <?php echo Form::hidden('height'); ?> <?php echo Form::hidden('user_id'); ?> </fieldset> <?php echo Form::close(); ?> <?php } ?> </figure> <?php echo $this->notes(); ?> </div> <?php return ob_get_clean(); }